From patchwork Mon Aug 12 21:50:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 171131 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp77020ily; Mon, 12 Aug 2019 14:52:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyD4JLVYbDt5GQal0DEvgKzqRGBW5AtrZVByh5x4jKK/ndFj4yq3fhkjp0Xjp/i8fT6OJIF X-Received: by 2002:a17:902:4324:: with SMTP id i33mr34402077pld.108.1565646773961; Mon, 12 Aug 2019 14:52:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565646773; cv=none; d=google.com; s=arc-20160816; b=uGKIsBX3pTUdQjmbKErkC7JHuEVyZ/OMfDodVSLDekuLp500X6FbFV8q+QAV/rrHfp ebYSskW8jw3cdx+4jXfVgMEnLuUHSgTGs5wvs+QWC8mc4IbWjWDC+eH9oF8s7o+UHs0J 9+wkZoY13kcuCXy33V3PGmdJMlt0ze9YJzzfgAzdyIrwn8YMIg+mXzPT7JQev64ZjQLR /z86wGfpmG4nrOPU4rSEYxl7YQmvIN43FWd/Y7YzVNnfp2Js8HZv/Y+wcFoxA6Jj8dYT gJ/TyC9M5rie/9wUoIRoNpCiRWU2bXmRuJ7YGa2VDT4FRJ6/p0Dik5TwggGoJQzKKaQl 3+uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=Yon+tib6K4agCcJ7udMNHZNwzVmJ2uncNyVHsVPdrbk=; b=XKuMQRzAeP7asvNzvuA4coio6YV6ZFZHBSXiTDO/tvxd3sLE3hwSy1Z36JuFMRiO85 yvjkxVIwCfSbXghhKbMW+2IyLH9bsLzYfqqes4HqwvEWCCtfBvPPiiSyU9iPB3pO+K8R CU9hsW5wEq1S8GRBlLk9pcVQ/anotJAZY8UMkhyppmkpeM0LiSo/IR4fm9BfvdbHnLDY BDS/0KEBrhU6VNiRjV660vCYrNgJaQuTpmLRU9cIcxSiJEfYO1cbapDPQ3u6Aw0wgWw1 EJZ9p2Nn9cRGfhEGuukJeY36TSCiuYgwgPznrI28VipNJ59gVJsggRqyfNecHF/SJabo 4wXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=AwtjYLPB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l70si11660515pgd.363.2019.08.12.14.52.53; Mon, 12 Aug 2019 14:52:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=AwtjYLPB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727984AbfHLVww (ORCPT + 28 others); Mon, 12 Aug 2019 17:52:52 -0400 Received: from mail-pf1-f201.google.com ([209.85.210.201]:33531 "EHLO mail-pf1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727517AbfHLVwt (ORCPT ); Mon, 12 Aug 2019 17:52:49 -0400 Received: by mail-pf1-f201.google.com with SMTP id d190so67019295pfa.0 for ; Mon, 12 Aug 2019 14:52:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=Yon+tib6K4agCcJ7udMNHZNwzVmJ2uncNyVHsVPdrbk=; b=AwtjYLPB1NH0++/16ytBu/qI2LJprggt3H70hAQSh1ZzM8gc9ZiVcgqdHhYHXjchQt px5nT4Pi96B1pKyG9a5L3txn6JOs4iAqr09VPH4Rc6QBU0eIn18RE2GlNcfxtWkO95vq Ly5ZNh4d0hDjxSSOfFs68hEEiC7GflyQcqAFn1iTWgvWYYb2TAk7xqAS59yUSWRrr9F3 WtuDrsR+Q2muciUZZXeLwu0n7pCa1Q/LADXXO5mjKy9NHLwVSB9CVMCXlCnpigDonN01 P+EORjsojsvbjUmK6aVl6sSTi/qOtZasZVk8CgCwV1MtPLNISfyl0xMhy6EYCrfo3xhU UoaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=Yon+tib6K4agCcJ7udMNHZNwzVmJ2uncNyVHsVPdrbk=; b=HjXr1WlW7cssxmzExzwguMXzNhvTBcQmLN9Ec9P325+oDW+0DqW0r4mRPwchIPYSe0 bRlkckAIvRW6vMlq/oM7dVU2SWENjeMjuO8XIZC0JmREqs+BShHw0pmDUzjvvNvv8/Xv 5p5P7KIeQJy43zaAj48h6oB128fX539UKvPXz7NfdJyRV06C8ONiSn/E03rx8/hJg67z n4mP4XkXVZ2O9wBXniRUq6AfJ9bElgSGpYxOQK2tMjfEiYALxLa2hoiUb9tiehMGCNnf WiX5CWkyVv3wrCEDBpzhFGaH9DLPnzrWzQG6vZlWbe6zmEG6O8BFEQgWesPZoiZCGdQe UTSA== X-Gm-Message-State: APjAAAUYOgmAsUhpVxaE+L9rj6PcQlf7I3bkZeweFTFcNIaVBcDWOM9C MM4MgOL95I22ZI3YAVhm+/metvq9n00H6yekByA= X-Received: by 2002:a63:5550:: with SMTP id f16mr33164653pgm.426.1565646768288; Mon, 12 Aug 2019 14:52:48 -0700 (PDT) Date: Mon, 12 Aug 2019 14:50:46 -0700 In-Reply-To: <20190812215052.71840-1-ndesaulniers@google.com> Message-Id: <20190812215052.71840-13-ndesaulniers@google.com> Mime-Version: 1.0 References: <20190812215052.71840-1-ndesaulniers@google.com> X-Mailer: git-send-email 2.23.0.rc1.153.gdeed80330f-goog Subject: [PATCH 13/16] include/asm-generic: prefer __section from compiler_attributes.h From: Nick Desaulniers To: akpm@linux-foundation.org Cc: sedat.dilek@gmail.com, jpoimboe@redhat.com, yhs@fb.com, miguel.ojeda.sandonis@gmail.com, clang-built-linux@googlegroups.com, Nick Desaulniers , Arnd Bergmann , "Naveen N. Rao" , Anil S Keshavamurthy , "David S. Miller" , Masami Hiramatsu , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reported-by: Sedat Dilek Suggested-by: Josh Poimboeuf Signed-off-by: Nick Desaulniers --- include/asm-generic/error-injection.h | 2 +- include/asm-generic/kprobes.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) -- 2.23.0.rc1.153.gdeed80330f-goog Acked-by: Naveen N. Rao Tested-by: Sedat Dilek [ Linux v5.3-rc5 ] diff --git a/include/asm-generic/error-injection.h b/include/asm-generic/error-injection.h index 95a159a4137f..a593a50b33e3 100644 --- a/include/asm-generic/error-injection.h +++ b/include/asm-generic/error-injection.h @@ -23,7 +23,7 @@ struct error_injection_entry { */ #define ALLOW_ERROR_INJECTION(fname, _etype) \ static struct error_injection_entry __used \ - __attribute__((__section__("_error_injection_whitelist"))) \ + __section(_error_injection_whitelist) \ _eil_addr_##fname = { \ .addr = (unsigned long)fname, \ .etype = EI_ETYPE_##_etype, \ diff --git a/include/asm-generic/kprobes.h b/include/asm-generic/kprobes.h index 4a982089c95c..20d69719270f 100644 --- a/include/asm-generic/kprobes.h +++ b/include/asm-generic/kprobes.h @@ -9,12 +9,11 @@ * by using this macro. */ # define __NOKPROBE_SYMBOL(fname) \ -static unsigned long __used \ - __attribute__((__section__("_kprobe_blacklist"))) \ +static unsigned long __used __section(_kprobe_blacklist) \ _kbl_addr_##fname = (unsigned long)fname; # define NOKPROBE_SYMBOL(fname) __NOKPROBE_SYMBOL(fname) /* Use this to forbid a kprobes attach on very low level functions */ -# define __kprobes __attribute__((__section__(".kprobes.text"))) +# define __kprobes __section(.kprobes.text) # define nokprobe_inline __always_inline #else # define NOKPROBE_SYMBOL(fname)