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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 29 Oct 2009 15:03:31 +0100
From:	Tejun Heo <tj@...nel.org>
To:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"'linux-ia64@...r.kernel.org'" <linux-ia64@...r.kernel.org>,
	"Luck, Tony" <tony.luck@...el.com>,
	Christoph Lameter <cl@...ux-foundation.org>
Subject: [PATCH percpu#for-next] ia64: add sparse annotation to __ia64_per_cpu_var()

ia64 has its own optimized percpu accessor - __ia64_per_cpu_var().
Add percpu sparse annotations to it.

Signed-off-by: Tejun Heo <tj@...nel.org>
---
 arch/ia64/include/asm/percpu.h |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Index: work/arch/ia64/include/asm/percpu.h
===================================================================
--- work.orig/arch/ia64/include/asm/percpu.h
+++ work/arch/ia64/include/asm/percpu.h
@@ -39,7 +39,10 @@ extern void *per_cpu_init(void);
  * On the positive side, using __ia64_per_cpu_var() instead of __get_cpu_var() is slightly
  * more efficient.
  */
-#define __ia64_per_cpu_var(var)	var
+#define __ia64_per_cpu_var(var) (*({					\
+	__verify_pcpu_ptr(&(var));					\
+	((typeof(var) __kernel __force *)&(var));			\
+}))
 
 #include <asm-generic/percpu.h>
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ