From patchwork Tue Jan 2 01:57:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 759333 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp5855992wrw; Mon, 1 Jan 2024 17:58:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IFSUOSsOgAMjfZ8d3o3MBdD//qpoD0UkU1doCk153/o7JCGdt7rtJO6AWqW1aSY3rwPfqbK X-Received: by 2002:a05:622a:11d0:b0:428:24b5:3af9 with SMTP id n16-20020a05622a11d000b0042824b53af9mr2336699qtk.90.1704160738627; Mon, 01 Jan 2024 17:58:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704160738; cv=none; d=google.com; s=arc-20160816; b=FsGbzXF+vUg7sqIhx4MYfuoCF4Vs5HS2gZD0gmSv0pYZ9rvr15dsx1kODlprN/uVS8 ObBoD5tpRQc9iHwNjOKqbRaHWEqwtnvmbXWaoGxE/Tgr42V0BrONJCYDnahODAC1WcrV ncXFP7Oa8zZXZ8bFaghsh6JOBk8h60f7SOBcXsFte2RV5Z1FyPYenAPE3Kqt9Q647hP8 C6be+50AneRLz+xSMhtEV35NsgmwMso3S2r7GN4aTlVmARWj3Hwy4cK1tVRWJ7chfIqN DtbWbUqTA8dYnZoqfZ94w3asPtRIt3qUnX/NPk40lA5Df6FmhTDLNNHG/W9yln74oGHg AI0Q== 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:to:from :dkim-signature; bh=HPXK9kHV+jGx1v/PMtKU+RQr0a5HO3R80iapTrtjCrM=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=g4HUTPFZkUWz0shcnFVFczyLVWk9rqgE+yaH22X3InMXDEnzSFKL5FmpDtCknTdu8r +is9G4xKwJ4Po6jdeohFT8z1cx4c37Fj/WHV1xECi1dta589EPvJW5G5yih0c3t57SeQ WF7KAXVUYQysEjhS4UgE6Eb0O8D1yttLoIHXeTmOpYCRjkGHre83etG3lQKhu28EdJRu L48xf4XQKBmopWCr6qYtjA/zojDpgJw6ZwaAaJ9eQQ5jbo1rsO6QAKHDGGD90bOvdWm9 h09Jptw0HPoSriqfAkOPcK7fdpVJ34q4f9PwI2ZnY/j2/7q6DFq029ImuEVVq8YfVJnE Y5nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wAZ29ia+; 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 w22-20020a05622a135600b004280f8b8129si6606992qtk.609.2024.01.01.17.58.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jan 2024 17:58:58 -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=wAZ29ia+; 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 1rKU2z-0003F6-Vs; Mon, 01 Jan 2024 20:58:26 -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 1rKU2y-0003Ex-HP for qemu-devel@nongnu.org; Mon, 01 Jan 2024 20:58:24 -0500 Received: from mail-io1-xd2f.google.com ([2607:f8b0:4864:20::d2f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rKU2x-0006ys-2p for qemu-devel@nongnu.org; Mon, 01 Jan 2024 20:58:24 -0500 Received: by mail-io1-xd2f.google.com with SMTP id ca18e2360f4ac-7bae735875bso422555039f.2 for ; Mon, 01 Jan 2024 17:58:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704160701; x=1704765501; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=HPXK9kHV+jGx1v/PMtKU+RQr0a5HO3R80iapTrtjCrM=; b=wAZ29ia+o28Vbk/E3+aA8CMLwPSNXlbbEDb1V3okaFDhoB8N9SlcWu/kvA5TSloPsl goEYU2rhQGf9n1oxznHMvEREwrV8TzjCoo0hKHPSQLQCAK/R85m3F1d6wztQmKTb4NZP T4sB4w51fTahoSPBkCLvzKXqhbqZPDM4iNeZ0JwBGwxdMFJZ3BsKcawLepWTcQHyPlWn IFdcJ4XlpZSK6fxbGt3QwVezxc5w0GpvLArGC7+CLu3xQa3xBJeViVXujgarrSWUOMzd UMBKXSc0ptz5EYQVTGbrDeVvFtEX4zD6Z54OwNjIEawWk8m4u7CDI6bSkQIxWizJ6YWB yCSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704160701; x=1704765501; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HPXK9kHV+jGx1v/PMtKU+RQr0a5HO3R80iapTrtjCrM=; b=Y/SAWzu8iRrv1k3ysmNvlRl69XMdocijaI3r3Uml1kHHYf+HTa1qgeekbrPCA9cQd9 XKFpxx9jd/kcCjdSHJku1rhJvu3bh7RV490XVQtKowUXnNP21yPk0hkntZ46D9KashOm uJ1bgkEoFW7UfGZ63rXlOmGHKqrR8djgCso9xN3qsDfW8fZsPzQ1FFYjwZLFVvB76LPE HBMHr2W1Hqxz893rAAKlmPG1Y6L40fGaSy1CkGg56tr79TDa6aSBImcaGVwCUu4r1kFu RkGVmIT+TldKXFigtHa9FFO3MddP9LKZyI2HbPQFwvyG+jHhPHCuGwLDTZxn4t4qUVrp kBPA== X-Gm-Message-State: AOJu0Yxk8uAAeyi7imHe1m9SHaE39Jp0GrOtkoMhOvfry2ixWgiK0A+U aa5bFKaGgzbl5llYK4IiZpbMMoRE3vcyiwBVuLigWdqk5VY= X-Received: by 2002:a05:6e02:1847:b0:35f:b93e:6a7 with SMTP id b7-20020a056e02184700b0035fb93e06a7mr28136922ilv.58.1704160701787; Mon, 01 Jan 2024 17:58:21 -0800 (PST) Received: from stoup.. (124-149-254-207.tpgi.com.au. [124.149.254.207]) by smtp.gmail.com with ESMTPSA id g33-20020a635221000000b0058ee60f8e4dsm19561891pgb.34.2024.01.01.17.58.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jan 2024 17:58:21 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 04/33] linux-user: Remove qemu_host_page_size from create_elf_tables Date: Tue, 2 Jan 2024 12:57:39 +1100 Message-Id: <20240102015808.132373-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240102015808.132373-1-richard.henderson@linaro.org> References: <20240102015808.132373-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::d2f; envelope-from=richard.henderson@linaro.org; helo=mail-io1-xd2f.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: Pierrick Bouvier Reviewed-by: Ilya Leoshkevich --- 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 4df565d64b..c166faabab 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -2678,13 +2678,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);