From patchwork Fri Mar 1 23:05:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 777092 Delivered-To: patch@linaro.org Received: by 2002:adf:e94d:0:b0:33d:f458:43ce with SMTP id m13csp1602766wrn; Fri, 1 Mar 2024 15:13:22 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWLRl+WCNEFWTFrAKuBmXwhL/hcA/ap96O5ZN1uIyteDqF1IpkNtTZDOeC1TFK1n1J+++I8MoB1s1P9WEMkYum/ X-Google-Smtp-Source: AGHT+IEcHBjm51QpOL5IMEYEr2/KA9M+L5l0uCI9g7kW9pxLPXWI2nIr61zyaYdjVJ0jqIdezNvl X-Received: by 2002:a05:6830:18fa:b0:6e4:8eb6:dcef with SMTP id d26-20020a05683018fa00b006e48eb6dcefmr3292436otf.24.1709334802597; Fri, 01 Mar 2024 15:13:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709334802; cv=none; d=google.com; s=arc-20160816; b=nAGY0eFC01b6UMI4HdHVOQ8fSUMeLN0t+SyI8+gvBj/nsIJWpizTzL2g0yIPxcFvqt vY06jHoMF2bE0Q+PHBYmKKL+UCMfFGspaX1UgTLMtUTqNQBcltD0t+lq2e9Nl5iJuQ6E PBaHu8OrZIOiONyad3sQRszlaPLqLdS/aenCZPjcCAfawx0uOUfimHUmTaSDgsmRKUQX 5scBkFHoyRMlergejHjjEMj+/5MYHaZPw+Xe99p+/2EDk0/cC3CsqvCpD2/roGl6q5sd R5BXCo/hwVtxXl6n4xxJi1DAJf0gLeeiPOiCY9Tr4a/cOwXbPBmNAfoXCW3EuTXT7+AW 4i/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2CLMQSQQhuvxkYJMehybPxufQXltsEjsiCdZyGsMtXw=; fh=v7v6q89OJlq+NxHejbJ/ziw7VE+fSww09twjGPM2dQM=; b=FhFDLnvgm1pQrvfBCAViXGI8j7umec47No8pSdsOlBd3S94A8ifuk37f5GgnbYCvYx DXs8dum/GD+qzxhehmvj0fMb2LdOUmgMjRNioX/dwi1/x5cR5k72cf4ChJqDesb/j7J0 ++0IWkEhuYpLnYVoCYPRirO/+fJi5mosVFg4UrH27pBGsQWPZ7qnKvyiy+hmsXtNtjDm iU0qFMAc5RvL7mGDQTbofCNTR8hQStCKmeW99CiQ4jK2atrRmH13nV51WM9a1k+hjivl kiC0MKSNf8wXwxP6EALqYu8gyOPcEq0wLbhY9FPdvEBHa8xQF/1riFl8qKpcil4AxqHW WGWg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WUGWO6bO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l7-20020a05620a0c0700b00787a2d9be81si4469809qki.156.2024.03.01.15.13.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Mar 2024 15:13:22 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WUGWO6bO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rgByU-00067B-89; Fri, 01 Mar 2024 18:07:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rgBxv-0004xN-7A for qemu-devel@nongnu.org; Fri, 01 Mar 2024 18:06:56 -0500 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rgBxs-0004Gn-GF for qemu-devel@nongnu.org; Fri, 01 Mar 2024 18:06:54 -0500 Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-5cedfc32250so2310666a12.0 for ; Fri, 01 Mar 2024 15:06:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709334411; x=1709939211; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2CLMQSQQhuvxkYJMehybPxufQXltsEjsiCdZyGsMtXw=; b=WUGWO6bOH9q4Yr8A9dKtGy777iWoWKXjoGV/5add2D96Ey0DVLJNzWYHKH2lVUvyNK eCyRQ2SVEW1pz/E65v4a37NxiSBOETnF5Lxh4Uw2ACp393L7Sn6yzqO7bLgNnPyqbedX 0VO7DmeJ3kQ8516xOmb49HtKM8XTf9NLeOJ3ExROjD1eH1k1jKOgDIMEZP3Popif50f2 Lk7Q49LmRhMHGZVfDpesbuDk3PZGbQ4eAZufqBDJpUjePUfipSmVmC7BJ3nCm24aG2UW ceT0ECWJvOPug+MyZ5N7kpIRi6N+pbYxTDE3ZR/Cicu8zEknt2WWyu7sEjlFGUpNDtyU NYnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709334411; x=1709939211; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2CLMQSQQhuvxkYJMehybPxufQXltsEjsiCdZyGsMtXw=; b=eLfwYXjO/qV780pS1mG026unQji5RidHRTMOoriO80ibey+RU9o/tBcu/gkR4tTgVR Q5JwASSARSk8Og9XdHOOI6GzWHZK5scuQDeLdk7NLMKKdavLPUuW5Weei/C9FyHyNVmN K9I3XApatFuxm1TzMXGvUTaEY7OsDTnv2UndAuKX+jqe5dxwB0WU9s5oi8fcXAj5C3On vCB6l/vxP5h2N3IlA4u01biFkhffnanyOqnsqrEZ6eA6GY1qd68p2murHEogGd7CoSkb urvpe5vyaaNdA3aTr6seFKCCTJrjFfa8g2hsR+bAynF8w0Ta64sICl9PLFcmpyENSJP3 4f6A== X-Gm-Message-State: AOJu0YzB7GMfBzYlPVDBAkc1D6ygqMuBxwsjua7ugB+4HimW1oOwwgGa 83O2RpzCIi1DvH+VIp0ei3CRh3ZkgptU/TTO6i+aB2IOmaVshmyviwNLdXv7P5HgWJzqMmSRwFn I X-Received: by 2002:a17:902:e741:b0:1dc:30f1:b8d3 with SMTP id p1-20020a170902e74100b001dc30f1b8d3mr3825027plf.18.1709334411111; Fri, 01 Mar 2024 15:06:51 -0800 (PST) Received: from stoup.. (098-147-055-211.res.spectrum.com. [98.147.55.211]) by smtp.gmail.com with ESMTPSA id lc11-20020a170902fa8b00b001dc668e145asm3988580plb.200.2024.03.01.15.06.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 15:06:50 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Ilya Leoshkevich , Pierrick Bouvier , Helge Deller Subject: [PATCH 21/60] linux-user: Remove qemu_host_page_size from create_elf_tables Date: Fri, 1 Mar 2024 13:05:40 -1000 Message-Id: <20240301230619.661008-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240301230619.661008-1-richard.henderson@linaro.org> References: <20240301230619.661008-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::529; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x529.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org AT_PAGESZ is supposed to advertise the guest page size. The random adjustment made here using qemu_host_page_size does not match anything else within linux-user. The idea here is good, but should be done more systemically via adjustment to TARGET_PAGE_SIZE. Signed-off-by: Richard Henderson Reviewed-by: Ilya Leoshkevich Reviewed-by: Pierrick Bouvier Acked-by: Helge Deller Message-Id: <20240102015808.132373-5-richard.henderson@linaro.org> --- linux-user/elfload.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 561c11ff37..0f135f6b6d 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -2679,13 +2679,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc, NEW_AUX_ENT(AT_PHDR, (abi_ulong)(info->load_addr + exec->e_phoff)); NEW_AUX_ENT(AT_PHENT, (abi_ulong)(sizeof (struct elf_phdr))); NEW_AUX_ENT(AT_PHNUM, (abi_ulong)(exec->e_phnum)); - if ((info->alignment & ~qemu_host_page_mask) != 0) { - /* Target doesn't support host page size alignment */ - NEW_AUX_ENT(AT_PAGESZ, (abi_ulong)(TARGET_PAGE_SIZE)); - } else { - NEW_AUX_ENT(AT_PAGESZ, (abi_ulong)(MAX(TARGET_PAGE_SIZE, - qemu_host_page_size))); - } + NEW_AUX_ENT(AT_PAGESZ, (abi_ulong)(TARGET_PAGE_SIZE)); NEW_AUX_ENT(AT_BASE, (abi_ulong)(interp_info ? interp_info->load_addr : 0)); NEW_AUX_ENT(AT_FLAGS, (abi_ulong)0); NEW_AUX_ENT(AT_ENTRY, info->entry);