Message ID | 20240103171502.1358371-6-bugaevc@gmail.com |
---|---|
State | New |
Headers | show
Return-Path: <libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=CU66gSOp; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T4xFz3vV8z1yQ5 for <incoming@patchwork.ozlabs.org>; Thu, 4 Jan 2024 04:16:23 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EC9823857B94 for <incoming@patchwork.ozlabs.org>; Wed, 3 Jan 2024 17:16:20 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by sourceware.org (Postfix) with ESMTPS id 347A038582B9 for <libc-alpha@sourceware.org>; Wed, 3 Jan 2024 17:15:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 347A038582B9 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 347A038582B9 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::236 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704302115; cv=none; b=WhxXcgwoEv7gs57XXDHOkXClR0J3f9zjEwMDpIFRpyyRDWxHaUpxHuvDuJ+U1RUV7hbElGOMhJmpOdb/Jl6YC5WfnB3w/3QEe+kvSEHyAGnHwo5zyL4EMD0hqxMG0H93WF0jN+iXrcny92dK9A/HlSowY2kEs9wvUwDj/+qljfE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704302115; c=relaxed/simple; bh=adLTD1c1xR8hGEDds9eQVTPvklZ1177hUSE0B3vemBQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=S2DOqrS8yrLwptkk9DqYzsyeITLKqEY53T0m9t1sLAT/IxHmn2OP5WeBal669et6MA2jd+7BLPTAz0AGcJpKOkm4UDGjubHEUAT3VcEeO+N0gZO9RzKPkWmEIGFShabFQ/7N91q9hU5TpvElC/Y86tnlnG56FDRNiNO5DSVPiKY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2cd0d05838fso21675651fa.1 for <libc-alpha@sourceware.org>; Wed, 03 Jan 2024 09:15:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704302109; x=1704906909; darn=sourceware.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=swcXNXshhgOVXpiTbPSlvH8s76l4WkcWIY+ZpTljz6Y=; b=CU66gSOpA7C3P6pNqNV9s5mWB/6ewnwOZYh+kMNUFWVbN/+6eC+xcGiTLoycIj5F9W jkaRqbi0RxonpZpCdRovj2rN46NkQuESJE5UuiHTc7cK41CDM6xc8fkP19UWhOU1nPBB /Wrhpa3Ox+mguvXbE8E5SzvfOsE7XQPxpqCXqE+aTLm1JwdtmIWDlnJDP0t9NnRgoZKk l0f6xNWNz/AJGKDVjgG4UEKsTP5tljE5JEm3tWJ+J/6BecpO8VbSG8hvP++wDUHg49Wl MIF+8J+kesREH7codigrpbnqHhQJFtLm9DLlDyTE1w5EqZk8DY1R1omAC6nNpVq6zhjI ZErw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704302109; x=1704906909; 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=swcXNXshhgOVXpiTbPSlvH8s76l4WkcWIY+ZpTljz6Y=; b=rVFmZ4O1WQeMLTv6LQ86bjLA8uRMnQUhMReha0o0Nshxk0fnx4Jang8RJ8BJrbuG1Y Td5KITPdcRj7t5SobsHMsqd0/j/44D3c7wbtDinR71bUfc/PT9jLzrl40mL8uNASH4zZ Da3qFXCSzmuQSFiNdxqU2EJkLYbi5ER8mYs8oLPGIYsGb9uWZOhskuT+pqNP2Tk6OVwr DZTJfO3JHAmx04ioBAkUavg+99f/KN+uvMCt1CnnSJxIXknm1gb7xCzHso1mOAQM639b fSPUMm+tB5lAo0lpWyYfzUouW88AGgLLZDyNvGQgfqIFVSlwp27E51GVvju9sLy0SH60 8vag== X-Gm-Message-State: AOJu0Yw43YF/Hxbf2rowjC+7u/abnKLsmTCRT2/p7NBIatMuVsEdNa6T VfwJGJu3NCYje67+In0PhRkd7x2592c= X-Google-Smtp-Source: AGHT+IEBNB2m+hqsh5v1j6gtkfFnk/Z22XBvHHWepTAkpD0EP/Dr5XUnwrvTwyy4u34G1oUu5YfISg== X-Received: by 2002:a19:e043:0:b0:50e:3812:c075 with SMTP id g3-20020a19e043000000b0050e3812c075mr8100029lfj.117.1704302109160; Wed, 03 Jan 2024 09:15:09 -0800 (PST) Received: from surface-pro-6.. ([2a00:1370:818c:b32f:ebdc:fd0:376b:8006]) by smtp.gmail.com with ESMTPSA id y23-20020a196417000000b0050e6d84d177sm3546068lfb.279.2024.01.03.09.15.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 09:15:08 -0800 (PST) From: Sergey Bugaev <bugaevc@gmail.com> To: libc-alpha@sourceware.org, bug-hurd@gnu.org Subject: [RFC PATCH 05/23] hurd: Disable Prefer_MAP_32BIT_EXEC on non-x86_64 for now Date: Wed, 3 Jan 2024 20:14:38 +0300 Message-ID: <20240103171502.1358371-6-bugaevc@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240103171502.1358371-1-bugaevc@gmail.com> References: <20240103171502.1358371-1-bugaevc@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org |
Series |
aarch64-gnu port
|
expand
|
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c index 43129a1e..6ba00e41 100644 --- a/sysdeps/mach/hurd/dl-sysdep.c +++ b/sysdeps/mach/hurd/dl-sysdep.c @@ -457,7 +457,7 @@ __mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset) if (prot & PROT_EXEC) vmprot |= VM_PROT_EXECUTE; -#ifdef __LP64__ +#ifdef __x86_64__ if ((addr == NULL) && (prot & PROT_EXEC) && HAS_ARCH_FEATURE (Prefer_MAP_32BIT_EXEC)) flags |= MAP_32BIT; diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c index 7b945610..30e369f0 100644 --- a/sysdeps/mach/hurd/mmap.c +++ b/sysdeps/mach/hurd/mmap.c @@ -60,7 +60,7 @@ __mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset) copy = ! (flags & MAP_SHARED); anywhere = ! (flags & MAP_FIXED); -#ifdef __LP64__ +#ifdef __x86_64__ if ((addr == NULL) && (prot & PROT_EXEC) && HAS_ARCH_FEATURE (Prefer_MAP_32BIT_EXEC)) flags |= MAP_32BIT;
While we could support it on any architecture, the tunable is currently only defined on x86_64. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> --- Alternatively, we could declare the tunable for all Hurd ports (e.g. in sysdeps/mach/hurd/dl-tunables.list), but I'm concerned about whether it would interact well with the existing definition for x86_64. Is it considered OK for the same tunable to be declared in two places? sysdeps/mach/hurd/dl-sysdep.c | 2 +- sysdeps/mach/hurd/mmap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)