Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp498260lql; Mon, 11 Mar 2024 08:44:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWfuRlvQXFGX9idBwD0EjkcXxRW5pHSVMg2VmyLqerCP5zRxWFQUHGy6XtMAQuFZpUVBxjokZDneAKWCbbTlk1r5ZO3y5l0K+BuLEA3gQ== X-Google-Smtp-Source: AGHT+IHtOFQyVHFKkEuoGnJ5FgzLz2OV7g8vQXyMG4I0MQcO2bunNzh9AkLwWwnRrD9RUFIzPtV2 X-Received: by 2002:a05:6358:2c8e:b0:17b:c7b8:be7f with SMTP id l14-20020a0563582c8e00b0017bc7b8be7fmr7898948rwm.32.1710171873846; Mon, 11 Mar 2024 08:44:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710171873; cv=pass; d=google.com; s=arc-20160816; b=v3kjkJzSBGahV8aqdV6J9ADRGmOWV3+IYT7uJs3k6Tqws5ilb/0jTjbbJu+PgbZQtC vSL/MIQJkagCnDdMknnmbrfLdKNU01etPdaoNhmvxzt4uhNbweDlEBTaX7pdJlr5+T4e IjqOd71K6hOV9QbjT+PmJ2R0PMXntXdaXMa7KlTMW0mei1Hs6vdtXzcsvbJ5x7jyEXJh 5sjI02jJ7NK1H3RszO3kGxj4bPWWcATDMO9Gp+u8kTshkTYX0daG6OwK4t+D7StNWHD8 3J4tqWRylumduwE/tVN2K/KR9tb/2IHPUOeKfh2sKxriY6EdR85HlquEgyuDqtVm3t2d ZrTA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rjRB5OEegz21VQZYCihNrER37lmrZj8xbtZTO42XG8I=; fh=SMe19LgUKf1cYB5EgaOodf53UGQT0ED6P1vwoC3UGm8=; b=qe4mKRxD1BxAQIbKv9JjH8KEgJNQpG2k2mhUH0TtG9rHynUM+Is81RPNCXrxL50ZMH H77W4Vvk8PbvtJPnaKoAbRjX1FjLnXQa4bpcWig42isNgpg+HZNHYq07IV0fDTjcSrJU OAPodSvRz54gTphvb4Gz4E3s/k332NLyubJzBI0BQbl4hyCAEGL4qZ45ZlfHIfaj/ogp mfQBaBSssWFKD/l+vqI7vOsR2pvbxQqv1m88/mo3s8lyEkdtgX6a3VjrMy1SeunzK528 sIwBxbwNB6hclbgbibQosBoxsTmqMVYdhOUZJV0GKUURi9LFUs4rrYh2piUNuGMy6REm onqg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ga8sbpdE; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-99148-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99148-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o8-20020a05622a138800b0042f24c6b309si5561196qtk.575.2024.03.11.08.44.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 08:44:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99148-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ga8sbpdE; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-99148-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99148-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 830E61C21963 for ; Mon, 11 Mar 2024 15:44:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6764244C6B; Mon, 11 Mar 2024 15:44:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Ga8sbpdE" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41982446B3 for ; Mon, 11 Mar 2024 15:44:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710171850; cv=none; b=HmC2aGjiJ105l61QIHgC+D2VUUSpz42RIbgeQrEEQ4t42k4cDZPjlfX3DKPl1WiDCS76s+X7jkTcnLGTqz9E2poYJRBA8HmbKHWcRqr5BelNiBEHEIHPtW/tSJ3uXZryiwgRkicdKlPt1doDvCfhyfKhonIJXuPTLGpRhaVmVuc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710171850; c=relaxed/simple; bh=3Oa3RsGSvdw9ieQI+DuMhaX+rlnf3IE/372p879XosA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ePXV5oAi/9EcGu2FNqC3sFK2VaSCljJMadd1Dw1tMuHadJxRCM/ZJIqnWByAZmLtv9z1qrB7qD3gH8SLLn9ND3dm29aDRyrxHJzSg9krQLbAvfzEuYkK9I0keYottkiyPWwhBw/UW5PhT8xmkyZxUzaKZyxnWl9NLyUCoq0yWz4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Ga8sbpdE; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710171847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rjRB5OEegz21VQZYCihNrER37lmrZj8xbtZTO42XG8I=; b=Ga8sbpdE1hMdyJbGZ2aoTqEEmBNv3oJQSf8M152vLGSsxK8lv+EQ67L1ztjdU2ey5x0tg3 7tJZ4iNUY9EpKP7W8OJxS9dhUVAyrvhbTUCG8qyZnDR2baQ4ICf/StwQpATies91pScIXB TXWBj19uS3B07r+Z3M87NFUThy95Ib4= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-605-L9X165DsPpyOTICYcb1S6A-1; Mon, 11 Mar 2024 11:44:05 -0400 X-MC-Unique: L9X165DsPpyOTICYcb1S6A-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4132cf5b950so3825135e9.0 for ; Mon, 11 Mar 2024 08:44:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710171844; x=1710776644; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rjRB5OEegz21VQZYCihNrER37lmrZj8xbtZTO42XG8I=; b=N2m5PxLEu+oPfaHHa+mpdbx3mKfhJhJsGhjsb7XtVVobB3Xt8XhWUg5HOOu11yRvNl zg6jWezh6QOzfpPBPv3u+Hq6BuOrauoeDaWzPtEdPqCDl4ihCFHTZVqTb74ACEXBij55 tZ7ttZ2L0p8ynx14H26pSXHfzwqAEJZ2q1XVPqgvgeOCPJPabbR4QQ3aXEn+nApqoGaW ym0/CGelDIx+gr4bIF9AhhdTG2JN/g8yYvqhOBXW11WjStQBGOth7rxgNBpkPJWB3xy/ 4jWqybreTrCphEPGVxntrKph23NFAXzZ6bZf1dQ8rH7xxe6enwB5pz8eEYiEN64Ixb+W GBUA== X-Forwarded-Encrypted: i=1; AJvYcCVWyH3H0yvJsd6a9ANdLa4a6WZVueBhP27sOsEw1PKPlxeeozVABBTj+s17GaaCHEIv5tZvACMjh8UXrfJUygVf3M48BuFyuqJPE1Nb X-Gm-Message-State: AOJu0YyW36yfY2hwu5H8LIm+UnuXylc4UO+ZXESiW6qVcw93ojwiklyX bFmrtQeDDvSA8vOQkPi9GnJiUfGeZPpLO7HkA3GEsnodWckX7xkV/OVP/z7n4d6eDvr8jryxih0 oLha1/BrgjubgegJsv30HCeG5JGbS5Yb1TIOgQMSvWA0Jw0xx2StvzQtetZrWig== X-Received: by 2002:a05:600c:4f50:b0:412:ee33:db93 with SMTP id m16-20020a05600c4f5000b00412ee33db93mr6523036wmq.3.1710171844026; Mon, 11 Mar 2024 08:44:04 -0700 (PDT) X-Received: by 2002:a05:600c:4f50:b0:412:ee33:db93 with SMTP id m16-20020a05600c4f5000b00412ee33db93mr6522955wmq.3.1710171843276; Mon, 11 Mar 2024 08:44:03 -0700 (PDT) Received: from redhat.com ([2.52.134.16]) by smtp.gmail.com with ESMTPSA id fc20-20020a05600c525400b00412ae4b45b3sm15756072wmb.30.2024.03.11.08.43.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 08:44:02 -0700 (PDT) Date: Mon, 11 Mar 2024 11:43:54 -0400 From: "Michael S. Tsirkin" To: Ian Rogers Cc: Arnd Bergmann , Andrii Nakryiko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Adrian Hunter , Paolo Bonzini , Shuah Khan , Kees Cook , "Gustavo A. R. Silva" , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Andrew Morton , Liam Howlett , Miguel Ojeda , Will Deacon , Mark Brown , David Laight , Shunsuke Mie , Yafang Shao , Kui-Feng Lee , James Clark , Nick Forrington , Leo Yan , German Gomez , Rob Herring , John Garry , Sean Christopherson , Anup Patel , Fuad Tabba , Andrew Jones , Chao Peng , Haibo Xu , Peter Xu , Vishal Annapurve , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-hardening@vger.kernel.org, llvm@lists.linux.dev, Christopher Di Bella Subject: Re: [PATCH v1 13/13] tools headers: Rename noinline to __noinline Message-ID: <20240311114009-mutt-send-email-mst@kernel.org> References: <20240310020509.647319-1-irogers@google.com> <20240310020509.647319-14-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240310020509.647319-14-irogers@google.com> On Sat, Mar 09, 2024 at 06:05:08PM -0800, Ian Rogers wrote: > An issue was reported with clang and llvm libc where the noinline > attribute [1] was being expanded due to the #define in > linux/compiler.h (now in compiler_attributes.h). The expansion caused > the __attribute__ to appear twice and break the build. To avoid this > conflict, rename noinline to __noinline which is more consistent with > other compiler attributes. > > [1] https://clang.llvm.org/docs/AttributeReference.html#noinline Following this link, I don't see __noinline there - only __noinline__ and noinline. What's up? Als, pls add an empty line before tags. > Reported-by: Christopher Di Bella > > Signed-off-by: Ian Rogers tags should not have empty lines between them. > --- > tools/include/linux/compiler_attributes.h | 4 ++-- > tools/perf/arch/x86/tests/bp-modify.c | 4 ++-- > tools/perf/bench/find-bit-bench.c | 2 +- > tools/perf/tests/bp_account.c | 2 +- > tools/perf/tests/bp_signal.c | 2 +- > tools/perf/tests/bp_signal_overflow.c | 2 +- > tools/perf/tests/dwarf-unwind.c | 12 ++++++------ > tools/perf/tests/workloads/leafloop.c | 8 ++++---- > tools/perf/tests/workloads/thloop.c | 4 ++-- > 9 files changed, 20 insertions(+), 20 deletions(-) > > diff --git a/tools/include/linux/compiler_attributes.h b/tools/include/linux/compiler_attributes.h > index 9bfaec783e48..1ff3d85f5af3 100644 > --- a/tools/include/linux/compiler_attributes.h > +++ b/tools/include/linux/compiler_attributes.h > @@ -267,12 +267,12 @@ > # define __flatten __attribute__((flatten)) > > /* > - * Note the missing underscores. > + * Note, the kernel version is missing the underscores. > * > * gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-noinline-function-attribute > * clang: mentioned > */ > -#define noinline __attribute__((__noinline__)) > +#define __noinline __attribute__((__noinline__)) > > /* > * Optional: only supported since gcc >= 8 > diff --git a/tools/perf/arch/x86/tests/bp-modify.c b/tools/perf/arch/x86/tests/bp-modify.c > index 0924ccd9e36d..65493ff7a76f 100644 > --- a/tools/perf/arch/x86/tests/bp-modify.c > +++ b/tools/perf/arch/x86/tests/bp-modify.c > @@ -15,13 +15,13 @@ > #include "tests/tests.h" > #include "arch-tests.h" > > -static noinline int bp_1(void) > +static __noinline int bp_1(void) > { > pr_debug("in %s\n", __func__); > return 0; > } > > -static noinline int bp_2(void) > +static __noinline int bp_2(void) > { > pr_debug("in %s\n", __func__); > return 0; > diff --git a/tools/perf/bench/find-bit-bench.c b/tools/perf/bench/find-bit-bench.c > index 7e25b0e413f6..dd97a51649bc 100644 > --- a/tools/perf/bench/find-bit-bench.c > +++ b/tools/perf/bench/find-bit-bench.c > @@ -31,7 +31,7 @@ static const char *const bench_usage[] = { > static unsigned int accumulator; > static unsigned int use_of_val; > > -static noinline void workload(int val) > +static __noinline void workload(int val) > { > use_of_val += val; > accumulator++; > diff --git a/tools/perf/tests/bp_account.c b/tools/perf/tests/bp_account.c > index 6f921db33cf9..459f61752a71 100644 > --- a/tools/perf/tests/bp_account.c > +++ b/tools/perf/tests/bp_account.c > @@ -34,7 +34,7 @@ > > static volatile long the_var; > > -static noinline int test_function(void) > +static __noinline int test_function(void) > { > return 0; > } > diff --git a/tools/perf/tests/bp_signal.c b/tools/perf/tests/bp_signal.c > index 1f2908f02389..484a7e7f96ee 100644 > --- a/tools/perf/tests/bp_signal.c > +++ b/tools/perf/tests/bp_signal.c > @@ -59,7 +59,7 @@ static void __test_function(volatile long *ptr) > } > #endif > > -static noinline int test_function(void) > +static __noinline int test_function(void) > { > __test_function(&the_var); > the_var++; > diff --git a/tools/perf/tests/bp_signal_overflow.c b/tools/perf/tests/bp_signal_overflow.c > index 4e897c2cf26b..9436bf2973f8 100644 > --- a/tools/perf/tests/bp_signal_overflow.c > +++ b/tools/perf/tests/bp_signal_overflow.c > @@ -30,7 +30,7 @@ > > static int overflows; > > -static noinline int test_function(void) > +static __noinline int test_function(void) > { > return time(NULL); > } > diff --git a/tools/perf/tests/dwarf-unwind.c b/tools/perf/tests/dwarf-unwind.c > index d01aa931fe81..a669c69a9242 100644 > --- a/tools/perf/tests/dwarf-unwind.c > +++ b/tools/perf/tests/dwarf-unwind.c > @@ -109,7 +109,7 @@ static int unwind_entry(struct unwind_entry *entry, void *arg) > return strcmp((const char *) symbol, funcs[idx]); > } > > -NO_TAIL_CALL_ATTRIBUTE noinline int test_dwarf_unwind__thread(struct thread *thread) > +NO_TAIL_CALL_ATTRIBUTE __noinline int test_dwarf_unwind__thread(struct thread *thread) > { > struct perf_sample sample; > unsigned long cnt = 0; > @@ -140,7 +140,7 @@ NO_TAIL_CALL_ATTRIBUTE noinline int test_dwarf_unwind__thread(struct thread *thr > > static int global_unwind_retval = -INT_MAX; > > -NO_TAIL_CALL_ATTRIBUTE noinline int test_dwarf_unwind__compare(void *p1, void *p2) > +NO_TAIL_CALL_ATTRIBUTE __noinline int test_dwarf_unwind__compare(void *p1, void *p2) > { > /* Any possible value should be 'thread' */ > struct thread *thread = *(struct thread **)p1; > @@ -159,7 +159,7 @@ NO_TAIL_CALL_ATTRIBUTE noinline int test_dwarf_unwind__compare(void *p1, void *p > return p1 - p2; > } > > -NO_TAIL_CALL_ATTRIBUTE noinline int test_dwarf_unwind__krava_3(struct thread *thread) > +NO_TAIL_CALL_ATTRIBUTE __noinline int test_dwarf_unwind__krava_3(struct thread *thread) > { > struct thread *array[2] = {thread, thread}; > void *fp = &bsearch; > @@ -178,7 +178,7 @@ NO_TAIL_CALL_ATTRIBUTE noinline int test_dwarf_unwind__krava_3(struct thread *th > return global_unwind_retval; > } > > -NO_TAIL_CALL_ATTRIBUTE noinline int test_dwarf_unwind__krava_2(struct thread *thread) > +NO_TAIL_CALL_ATTRIBUTE __noinline int test_dwarf_unwind__krava_2(struct thread *thread) > { > int ret; > > @@ -187,7 +187,7 @@ NO_TAIL_CALL_ATTRIBUTE noinline int test_dwarf_unwind__krava_2(struct thread *th > return ret; > } > > -NO_TAIL_CALL_ATTRIBUTE noinline int test_dwarf_unwind__krava_1(struct thread *thread) > +NO_TAIL_CALL_ATTRIBUTE __noinline int test_dwarf_unwind__krava_1(struct thread *thread) > { > int ret; > > @@ -196,7 +196,7 @@ NO_TAIL_CALL_ATTRIBUTE noinline int test_dwarf_unwind__krava_1(struct thread *th > return ret; > } > > -noinline int test__dwarf_unwind(struct test_suite *test __maybe_unused, > +__noinline int test__dwarf_unwind(struct test_suite *test __maybe_unused, > int subtest __maybe_unused) > { > struct machine *machine; > diff --git a/tools/perf/tests/workloads/leafloop.c b/tools/perf/tests/workloads/leafloop.c > index 1bf5cc97649b..89d2cec2f461 100644 > --- a/tools/perf/tests/workloads/leafloop.c > +++ b/tools/perf/tests/workloads/leafloop.c > @@ -4,18 +4,18 @@ > #include "../tests.h" > > /* We want to check these symbols in perf script */ > -noinline void leaf(volatile int b); > -noinline void parent(volatile int b); > +__noinline void leaf(volatile int b); > +__noinline void parent(volatile int b); > > static volatile int a; > > -noinline void leaf(volatile int b) > +__noinline void leaf(volatile int b) > { > for (;;) > a += b; > } > > -noinline void parent(volatile int b) > +__noinline void parent(volatile int b) > { > leaf(b); > } > diff --git a/tools/perf/tests/workloads/thloop.c b/tools/perf/tests/workloads/thloop.c > index 457b29f91c3e..e252efb76203 100644 > --- a/tools/perf/tests/workloads/thloop.c > +++ b/tools/perf/tests/workloads/thloop.c > @@ -9,14 +9,14 @@ > static volatile sig_atomic_t done; > > /* We want to check this symbol in perf report */ > -noinline void test_loop(void); > +__noinline void test_loop(void); > > static void sighandler(int sig __maybe_unused) > { > done = 1; > } > > -noinline void test_loop(void) > +__noinline void test_loop(void) > { > while (!done); > } > -- > 2.44.0.278.ge034bb2e1d-goog