From patchwork Mon Jan 8 12:50:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 83529 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 4613938582B2 for ; Mon, 8 Jan 2024 12:51:57 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) by sourceware.org (Postfix) with ESMTPS id 7C9D83858C2C for ; Mon, 8 Jan 2024 12:50:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7C9D83858C2C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7C9D83858C2C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::22f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704718241; cv=none; b=MXvUWphfYhsmcyexlEO5HXFGAr1ReLrYP/2mAWAz7k1k5NyZWKVogyWr5vDnJYn9f9+id2+phGyXzJjfkDbgevNmdPJrt+A/5zEW2gONHDFEtonUXHl5OEevYoWXa1sTIt9+xBEsEYi2uS5JfpwxNoOukhWyECNc9N2+e4H79jo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704718241; c=relaxed/simple; bh=K6cSesDsy3b0SIE9IjSH6OtOaweOAbA0NduDe/wSvcI=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=whz71CLbOIuHVBqGKI03uJE5NJGVZs3UwtrvlrOJRxWX89wKJkF2tt0/utKBCU9+RwTXQmOpM7BdYj49gNqkaZI22Kyu9wrkxIz7FCGImwD1sW1G86re6o6r9LS61uerhBIIz2wE9TRPz9SYfXovwv0Td+K/5ohEnIgY/XpEZ8k= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x22f.google.com with SMTP id 5614622812f47-3bbbdf0b859so2331348b6e.3 for ; Mon, 08 Jan 2024 04:50:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704718237; x=1705323037; darn=sourceware.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=Ji7xg97AFdgkateue1xuOLI3g0YONugC53KO3iteVoU=; b=hlxf6wU/jfy094wLgvtEfae/MWb9ePNLp5u32RPnRoQ7GDjj6/+pRAdCJZHo8/rgPh jfsweJR00CqhgGO+1W81zG9cZ/zneeX2eOWO/Xkp4sQPNopa6Znblhm8YRrz2JrBOy0D BkKwdDCFxcghmPcGbUxo9ZlF0BNGT/rbEU/oh1NtbKm3fUVYyhMlHFPjaB6Fvd2Ct0uK Rrc3xcs8Yk+H+DrzR3fCb9nX69Z8lmJgfw92TLEB0uLqdVtfo2rvIKUk54vRkAOXhOvP HqZFK+2PTH8fbPF9Ktm2CrFZ3HC4E21/+ax0ysj8+Ibnpt3SbprX6Sr1yDD4xMwhkm6r kMYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704718237; x=1705323037; 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=Ji7xg97AFdgkateue1xuOLI3g0YONugC53KO3iteVoU=; b=lnzzvNlxREWmrCni0DZ7T9UWEA08VM3y4Fc9c5DlThtj2wwEtkMy/LGH074nKw/HRj R4u3Hzfyn5MH7yBL23jcCe7Fh3UeFXAUnNzOjzyAv6Kb18lnj5LfKznzoPlP5ttc4S4U X3aup9aJ9QTa6IjQGLq2iC3RSvJEHp1isp6AXN0QBazaizIezZ14uxO7+ozRcRfyzlb6 iquKQQxyLmPNI/KHoH3VL5BzjIzD+ek0DtjMeF2rX2++dsNo0hgs34Y72J90A89gErTE FIAiibeyAijDszUt8CJaUUjeHGHVYm/fuRkUmBFXNDA4NSdlDtpsvd1rvjr3brrGU0dU Ud5A== X-Gm-Message-State: AOJu0YynXBGaCUiQKsLMATBRjTzWXELwwyvDcIX14lR5gOAO4BtiEyI2 h8jvpATu2iR1RIB0P9ZL76R23KHxQ/D/Anq3Ax6CAq54uoc= X-Google-Smtp-Source: AGHT+IHcfkrdnKHp8vEvdZWhN+x0ShgahpQX9UM24WlPUQpWNBT4XGffeIssuWFpq9IaCJV31S0OSQ== X-Received: by 2002:a05:6808:2f0b:b0:3bd:234f:a13 with SMTP id gu11-20020a0568082f0b00b003bd234f0a13mr5359275oib.99.1704718237102; Mon, 08 Jan 2024 04:50:37 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:9dd2:7f25:c108:2fff:5f8e]) by smtp.gmail.com with ESMTPSA id fk17-20020a056a003a9100b006d6b91c6eb6sm6138473pfb.13.2024.01.08.04.50.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 04:50:35 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: "H . J . Lu" , Noah Goldstein Subject: [PATCH v3 3/3] i386: Fail if configured with --enable-cet Date: Mon, 8 Jan 2024 09:50:25 -0300 Message-Id: <20240108125025.1389849-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240108125025.1389849-1-adhemerval.zanella@linaro.org> References: <20240108125025.1389849-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Since it is only supported for x86_64. Checked on i686-linux-gnu. --- INSTALL | 3 +-- NEWS | 4 ++-- manual/install.texi | 3 +-- sysdeps/i386/configure | 8 ++++---- sysdeps/i386/configure.ac | 7 ++++--- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/INSTALL b/INSTALL index be3697c62f..f194f14ec2 100644 --- a/INSTALL +++ b/INSTALL @@ -147,8 +147,7 @@ if ‘CFLAGS’ is specified it must enable optimization. For example: ‘--enable-cet=permissive’, CET is disabled when dlopening a non CET enabled shared library in CET enabled application. - NOTE: ‘--enable-cet’ has been tested for x86_64 and x32 on non-CET - and CET processors. + NOTE: ‘--enable-cet’ is only supported on x86_64 and x32. ‘--enable-memory-tagging’ Enable memory tagging support if the architecture supports it. diff --git a/NEWS b/NEWS index 17110e7b88..d75798a15b 100644 --- a/NEWS +++ b/NEWS @@ -9,8 +9,8 @@ Version 2.39 Major new features: -* Sync with Linux kernel 6.6 shadow stack interface. Since only x86-64 - is supported, --enable-cet is ignored for i386. +* Sync with Linux kernel 6.6 shadow stack interface. The --enable-cet + configure option in only supported on x86-64. * struct statvfs now has an f_type member, equal to the f_type statfs member; on the Hurd this was always available under a reserved name, diff --git a/manual/install.texi b/manual/install.texi index f752f6489d..ccfa16fde3 100644 --- a/manual/install.texi +++ b/manual/install.texi @@ -175,8 +175,7 @@ enabled shared library in CET enabled application. With @option{--enable-cet=permissive}, CET is disabled when dlopening a non CET enabled shared library in CET enabled application. -NOTE: @option{--enable-cet} has been tested for x86_64 and x32 -on non-CET and CET processors. +NOTE: @option{--enable-cet} is only supported on x86_64 and x32. @item --enable-memory-tagging Enable memory tagging support if the architecture supports it. When diff --git a/sysdeps/i386/configure b/sysdeps/i386/configure index cd63d314fa..84656cef6e 100644 --- a/sysdeps/i386/configure +++ b/sysdeps/i386/configure @@ -1,10 +1,10 @@ # This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/i386. -# CET is only supported for x86-64. Set enable-cet to "no" to allow -# "ifneq ($(enable-cet),no)" in x86 Makefiles. -config_vars="$config_vars -enable-cet = "no"" +# CET is only supported for x86-64. +if test $enable_cet != no; then + as_fn_error $? "\"CET is only supported on x86_64 or x32\"" "$LINENO" 5 +fi # We no longer support i386 since it lacks the atomic instructions # required to implement NPTL threading. diff --git a/sysdeps/i386/configure.ac b/sysdeps/i386/configure.ac index b7d9436557..7f68e6210a 100644 --- a/sysdeps/i386/configure.ac +++ b/sysdeps/i386/configure.ac @@ -1,9 +1,10 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/i386. -# CET is only supported for x86-64. Set enable-cet to "no" to allow -# "ifneq ($(enable-cet),no)" in x86 Makefiles. -LIBC_CONFIG_VAR([enable-cet], ["no"]) +# CET is only supported for x86-64. +if test $enable_cet != no; then + AC_MSG_ERROR(["CET is only supported on x86_64 or x32"]) +fi # We no longer support i386 since it lacks the atomic instructions # required to implement NPTL threading.