lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 11 Dec 2018 07:30:49 -0800
From:   tip-bot for Mukesh Ojha <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     mojha@...eaurora.org, jolsa@...hat.com,
        torvalds@...ux-foundation.org, acme@...nel.org, hpa@...or.com,
        namhyung@...nel.org, tglx@...utronix.de, mingo@...nel.org,
        linux-kernel@...r.kernel.org, peterz@...radead.org
Subject: [tip:perf/core] perf/core: Declare the __percpu attribute on
 non-deref types

Commit-ID:  43b9e4febc66b98d83cc1560196d56ac7fef3c32
Gitweb:     https://git.kernel.org/tip/43b9e4febc66b98d83cc1560196d56ac7fef3c32
Author:     Mukesh Ojha <mojha@...eaurora.org>
AuthorDate: Tue, 27 Nov 2018 14:43:32 +0530
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 11 Dec 2018 15:01:48 +0100

perf/core: Declare the __percpu attribute on non-deref types

Sparse reports the current declaration of two perf percpu variables
with this warning:

  warning: incorrect type in initializer (different address spaces)
         expected void const [noderef] <asn:3>*__vpp_verify
         got struct perf_cpu_context *<noident>

While it's normally perfectly fine to place GCC attributes anywhere
in the definition, this particular attribute is for a checking
compiler's such as Sparse's benefit, which doesn't want __percpu
on pointers.

So reorder the attribute to come after the structure type, not after
the pointer type.

[ mingo: Rewrote the changelog. ]

Signed-off-by: Mukesh Ojha <mojha@...eaurora.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: https://lkml.kernel.org/r/1543310012-7967-1-git-send-email-mojha@codeaurora.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 include/linux/perf_event.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 53c500f0ca79..1d5c551a5add 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -262,8 +262,8 @@ struct pmu {
 	 */
 	int				capabilities;
 
-	int * __percpu			pmu_disable_count;
-	struct perf_cpu_context * __percpu pmu_cpu_context;
+	int __percpu			*pmu_disable_count;
+	struct perf_cpu_context __percpu *pmu_cpu_context;
 	atomic_t			exclusive_cnt; /* < 0: cpu; > 0: tsk */
 	int				task_ctx_nr;
 	int				hrtimer_interval_ms;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ