Message ID | 20221021115956.9947-2-ojeda@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp667952wrr; Fri, 21 Oct 2022 05:25:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4u2KyFZanCJskn8tXVmDlnLMQjyPq2PnLIYKuWBp/9lQ9/KTPPCN4/Js0YCFpIV8anp/es X-Received: by 2002:aa7:d348:0:b0:45b:8ae3:ee3d with SMTP id m8-20020aa7d348000000b0045b8ae3ee3dmr17106392edr.428.1666355141015; Fri, 21 Oct 2022 05:25:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666355141; cv=none; d=google.com; s=arc-20160816; b=JWsSUHSFilGD/D6qKYwnnR6R79A69gBGXEQv7Y8hE9v4+2cR5D8QH5CXO9HeztY02i 1x76Uijyy+CRfLpnjGG9lOf7ql3AkYEGc4QP+f4Xc4HKyArR8eKdsPub0i9RX0IfDojw oid9RwdLrlRKRsK2ovkAU469AMkiKZSHNXHo0EYOs2hwrAuNqp0cEoPdxaeF2kSc65F6 xx4cEjLWDvJr0MhhLpOwe1tUY/vy2JsT5wxBzmVwBkFX5Fdcckohu0DiTBSBwpGrlAoR FB1w4yH/O/K7d7FSK6R/KX2q4bKZYWUSq5Ncs3NqxH13G8I47iI53rDDT/pB6u2aZdo5 svYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=a9XIqChclOmeQ7vZlCohsxnyI/Vmjxjw2nyGDEHlH9w=; b=Y3rUO486uywb8/tLtn/5uc8uniuwp6cpBtV1Xo1aLnnFXe9Jk6QQXqMU1uYY3cWsGp 34xesS9+0FxcTi9Dm6G03q7w5L3uj8K/CesaI2dwIFfpKfL7+vlOiMqsZ7kAROh5kk/T 3noV08PyIyEx2qUjRE+jCLz7+40cyXEA8MWqG5/cJn0B+i7UxZrm816VNW4FghizWMd4 +QoP94GvmpG3bVS1ebTwWheN6NRpXNiT5TLQnOiYivfaQYTmKG00jeTqmaAUHJPjPtxN dcXo+GtBdN5W35M3rEpLDURC6ze40AbbIyBhqw1h71AwJ0+mhaSTWqyT2PleJqPbuJsb XdhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oLdIZz3l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y19-20020a056402271300b0045d9a3adf19si14675066edd.564.2022.10.21.05.25.16; Fri, 21 Oct 2022 05:25:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oLdIZz3l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230201AbiJUMAd (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Fri, 21 Oct 2022 08:00:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229816AbiJUMA3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 21 Oct 2022 08:00:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBE7E24E42B for <linux-kernel@vger.kernel.org>; Fri, 21 Oct 2022 05:00:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4812361E67 for <linux-kernel@vger.kernel.org>; Fri, 21 Oct 2022 12:00:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC641C43470; Fri, 21 Oct 2022 12:00:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666353625; bh=wLiSsLCBvUemVPUmA7PVLvUAvaGVpUx35Yr4C7U15XA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oLdIZz3lKKkdU27FrbVGeSE2xW3GDlfWRHpAsKzY9gP9Jnv7umrhBCq3LbH/H7kf9 uCSueC8OBTd5ZBZU0YrD11bBheye3DDGBljEnh7o8I9LsuEXY8JDAJhhaQE/0GNznI XeqOeVn8rLwPKHUFc7ht/KjgoaTInYvnVYRPTK7yl0FY+8nk4Czzw1axmOioSo8pUv S4bT2Osu8sQaWSk193hDIJlHo71Uit0mZQ1+A+Hoa1Os3yS/3U/9+YkaIdvyc1a39a rU75eLuRQK2T4umxzqtkevP8lKTbVAV4mR7OHfkeqDg3nMM6rwP0asUEk5orrUAqmn jjBlBWx7TpJCw== From: Miguel Ojeda <ojeda@kernel.org> To: Andrey Konovalov <andreyknvl@gmail.com>, Marco Elver <elver@google.com>, Kees Cook <keescook@chromium.org>, Arnd Bergmann <arnd@arndb.de> Cc: Andrew Morton <akpm@linux-foundation.org>, Kumar Kartikeya Dwivedi <memxor@gmail.com>, Nick Desaulniers <ndesaulniers@google.com>, Nathan Chancellor <nathan@kernel.org>, Uros Bizjak <ubizjak@gmail.com>, Dan Li <ashimida@linux.alibaba.com>, Alexander Potapenko <glider@google.com>, Miguel Ojeda <ojeda@kernel.org>, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] compiler-gcc: remove attribute support check for `__no_sanitize_address__` Date: Fri, 21 Oct 2022 13:59:53 +0200 Message-Id: <20221021115956.9947-2-ojeda@kernel.org> In-Reply-To: <20221021115956.9947-1-ojeda@kernel.org> References: <20221021115956.9947-1-ojeda@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747300008453744041?= X-GMAIL-MSGID: =?utf-8?q?1747300008453744041?= |
Series |
[1/5] compiler-gcc: be consistent with underscores use for `no_sanitize`
|
|
Commit Message
Miguel Ojeda
Oct. 21, 2022, 11:59 a.m. UTC
The attribute was added in GCC 4.8, while the minimum GCC version
supported by the kernel is GCC 5.1.
Therefore, remove the check.
Link: https://godbolt.org/z/84v56vcn8
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
include/linux/compiler-gcc.h | 4 ----
1 file changed, 4 deletions(-)
Comments
On Fri, Oct 21, 2022 at 01:59:53PM +0200, Miguel Ojeda wrote: > The attribute was added in GCC 4.8, while the minimum GCC version > supported by the kernel is GCC 5.1. > > Therefore, remove the check. > > Link: https://godbolt.org/z/84v56vcn8 > Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org>
On Fri, Oct 21, 2022 at 01:59:53PM +0200, Miguel Ojeda wrote: > The attribute was added in GCC 4.8, while the minimum GCC version > supported by the kernel is GCC 5.1. > > Therefore, remove the check. > > Link: https://godbolt.org/z/84v56vcn8 > Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org> > --- > include/linux/compiler-gcc.h | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h > index b9530d3515ac..bfce7f4d0978 100644 > --- a/include/linux/compiler-gcc.h > +++ b/include/linux/compiler-gcc.h > @@ -82,11 +82,7 @@ > #define __noscs __attribute__((__no_sanitize__("shadow-call-stack"))) > #endif > > -#if __has_attribute(__no_sanitize_address__) > #define __no_sanitize_address __attribute__((__no_sanitize_address__)) > -#else > -#define __no_sanitize_address > -#endif > > #if defined(__SANITIZE_THREAD__) && __has_attribute(__no_sanitize_thread__) > #define __no_sanitize_thread __attribute__((__no_sanitize_thread__)) > -- > 2.38.1 > >
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index b9530d3515ac..bfce7f4d0978 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -82,11 +82,7 @@ #define __noscs __attribute__((__no_sanitize__("shadow-call-stack"))) #endif -#if __has_attribute(__no_sanitize_address__) #define __no_sanitize_address __attribute__((__no_sanitize_address__)) -#else -#define __no_sanitize_address -#endif #if defined(__SANITIZE_THREAD__) && __has_attribute(__no_sanitize_thread__) #define __no_sanitize_thread __attribute__((__no_sanitize_thread__))