From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 2E68A3858CDB for ; Sun, 2 Apr 2023 23:09:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2E68A3858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pj6pM-0001tW-LI; Sun, 02 Apr 2023 19:09:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=In-Reply-To:MIME-Version:References:Subject:To:From: Date; bh=bQHJmL0OYyTRjkp/lqQELqn/WJrHXCU1x5F5iwvAPBQ=; b=feS3/HT0ff+QygIdVBFm 7lWdKmSeD76X7TpZTPo4D0K3eZ1FSPnKMpk7Z+Ji8ZFOoBLvv8uE494caBC3Dml+6bIOJDpzschIj HbKszAuvMe+n9gPn4fdVr1g2BoQThy+XxmcX8cIEeyhNwFCS23Uj8VjBo/aS7Q/Z9Ig6vE+a44jED qhH3xK/m06kurqErYkzL2fmhidNO/74hIqljvPhz9TSBi9ZvySH/tJ4kFp7foq3mUjdRrgPu296QJ tQjkRKUoiCGYqrHgfb9fEegAz0zZEDIF+lVKBtCjO8iqVgkbK/MAP0mbKxI0S41v8IHWP2jaKV9sN xeXVvdaqAC+YVw==; Received: from [2a01:cb19:4a:a400:de41:a9ff:fe47:ec49] (helo=begin) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pj6pM-0007rx-3Z; Sun, 02 Apr 2023 19:09:36 -0400 Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1pj6pL-00AspP-01; Mon, 03 Apr 2023 01:09:35 +0200 Date: Mon, 3 Apr 2023 01:09:34 +0200 From: Samuel Thibault To: Sergey Bugaev Cc: libc-alpha@sourceware.org, bug-hurd@gnu.org Subject: Re: [RFC PATCH glibc 13/34] x86-64: Disable prefer_map_32bit_exec tunable on non-Linux Message-ID: <20230402230934.djvtyoh5dayv23c2@begin> Mail-Followup-To: Sergey Bugaev , libc-alpha@sourceware.org, bug-hurd@gnu.org References: <20230319151017.531737-1-bugaevc@gmail.com> <20230319151017.531737-14-bugaevc@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230319151017.531737-14-bugaevc@gmail.com> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello, Sergey Bugaev, le dim. 19 mars 2023 18:09:56 +0300, a ecrit: > While we could/should implement MAP_32BIT for the Hurd port by setting > all the high bits of mask in a vm_map () call, neither MAP_32BIT nor > glibc.cpu.prefer_map_32bit_exec exist on the Hurd as of now. Compile > this code out to fix build failures. Rather use defined(MAP_32BIT)? That way it will nicely work for BSD ports as well, and when hurd eventually supports MAP_32BIT. > Signed-off-by: Sergey Bugaev > --- > sysdeps/x86/cpu-features.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c > index 822688e2..78631d7a 100644 > --- a/sysdeps/x86/cpu-features.c > +++ b/sysdeps/x86/cpu-features.c > @@ -27,7 +27,7 @@ > extern void TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *) > attribute_hidden; > > -# ifdef __LP64__ > +# if defined (__LP64__) && defined (__linux__) > static void > TUNABLE_CALLBACK (set_prefer_map_32bit_exec) (tunable_val_t *valp) > { > @@ -715,7 +715,7 @@ no_cpuid: > #if HAVE_TUNABLES > TUNABLE_GET (hwcaps, tunable_val_t *, TUNABLE_CALLBACK (set_hwcaps)); > > -# ifdef __LP64__ > +# if defined (__LP64__) && defined (__linux__) > TUNABLE_GET (prefer_map_32bit_exec, tunable_val_t *, > TUNABLE_CALLBACK (set_prefer_map_32bit_exec)); > # endif > -- > 2.39.2 >