From patchwork Sun Mar 19 15:09:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Bugaev X-Patchwork-Id: 66595 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D24813854839 for ; Sun, 19 Mar 2023 15:13:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D24813854839 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679238831; bh=ILCBwAsFi8P5MaTdztO1YgfHPGxdkYhYCnZ2ykKV0Cs=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=RiRIZ1zJP1cVmwwpEaQUTXUhWcmqJbSiuqZMCB/tE3bzMN4uhPNzYYUzwSVyivwnK NW0e71MYtTrOL2gzHy2Raz0Yuklv/wwe06OscQEbcztmGN/nmtzEgj4KclORYtDSlo uMjNa9vWYdTV++x7wJzdJQwL7k60qJsqd1Hep/Dg= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by sourceware.org (Postfix) with ESMTPS id 1318B3858412 for ; Sun, 19 Mar 2023 15:11:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1318B3858412 Received: by mail-lf1-x129.google.com with SMTP id j11so11986824lfg.13 for ; Sun, 19 Mar 2023 08:11:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679238668; 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=ILCBwAsFi8P5MaTdztO1YgfHPGxdkYhYCnZ2ykKV0Cs=; b=UHVjpC+bNNh1FHQTMjWuBsn9Mrh2RRa+z0x4LoigUJKXO/n/29vsZ1a2gN8sjqvbcP YioM5JSHIbZvLWR47cq4t/SyBjHvcsy8/wHJX9+jnpur/PZfub1ZTPUEc8H9mP4pOo7h l4hcieK4rIqSPX3noasd56GN9hYeGFJ68aC5Muv+kZBut8MXsLFvyFNs3hexNhjDik9o FkP/Nb6VRpOAVIb7XVsj/DrHLq9rIz8BhKeKwhmiPSOWp12xLpRELhar4yQcZMmEldng U1UOLo9vipaG/InMhFNTqc14CryDTvrkEcTuRZvjoOu3xQNTFLP9mlkKLIj+HqhMhRhg NriA== X-Gm-Message-State: AO0yUKWRM6Cvy+AiwbA1uDpdK2A/QPxTOQDBwDRceEUyP5pltFhyd8b9 4NLg+yTEV896TMGlM3x2Iw4FKtpSEfVlJg== X-Google-Smtp-Source: AK7set89Wjno1vcnsQhbzobXTgrVeaHxolNeC7jHrDH+YXeiM8jLHHYdJSeudX2TqgcMXSUJiQzoFA== X-Received: by 2002:a05:6512:952:b0:4dd:abb9:dae4 with SMTP id u18-20020a056512095200b004ddabb9dae4mr5616607lft.25.1679238668353; Sun, 19 Mar 2023 08:11:08 -0700 (PDT) Received: from surface-pro-6.. ([2a00:1370:818c:4a57:577a:76f4:df43:5e66]) by smtp.gmail.com with ESMTPSA id m19-20020ac24253000000b004e90dee5469sm1274089lfl.157.2023.03.19.08.11.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Mar 2023 08:11:08 -0700 (PDT) To: libc-alpha@sourceware.org, bug-hurd@gnu.org Cc: Samuel Thibault , Sergey Bugaev Subject: [RFC PATCH glibc 13/34] x86-64: Disable prefer_map_32bit_exec tunable on non-Linux Date: Sun, 19 Mar 2023 18:09:56 +0300 Message-Id: <20230319151017.531737-14-bugaevc@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230319151017.531737-1-bugaevc@gmail.com> References: <20230319151017.531737-1-bugaevc@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 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 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.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Sergey Bugaev via Libc-alpha From: Sergey Bugaev Reply-To: Sergey Bugaev Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" 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. 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