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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250325121624.523258-25-guoren@kernel.org>
Date: Tue, 25 Mar 2025 08:16:05 -0400
From: guoren@...nel.org
To: arnd@...db.de,
	gregkh@...uxfoundation.org,
	torvalds@...ux-foundation.org,
	paul.walmsley@...ive.com,
	palmer@...belt.com,
	anup@...infault.org,
	atishp@...shpatra.org,
	oleg@...hat.com,
	kees@...nel.org,
	tglx@...utronix.de,
	will@...nel.org,
	mark.rutland@....com,
	brauner@...nel.org,
	akpm@...ux-foundation.org,
	rostedt@...dmis.org,
	edumazet@...gle.com,
	unicorn_wang@...look.com,
	inochiama@...look.com,
	gaohan@...as.ac.cn,
	shihua@...as.ac.cn,
	jiawei@...as.ac.cn,
	wuwei2016@...as.ac.cn,
	drew@...7.com,
	prabhakar.mahadev-lad.rj@...renesas.com,
	ctsai390@...estech.com,
	wefu@...hat.com,
	kuba@...nel.org,
	pabeni@...hat.com,
	josef@...icpanda.com,
	dsterba@...e.com,
	mingo@...hat.com,
	peterz@...radead.org,
	boqun.feng@...il.com,
	guoren@...nel.org,
	xiao.w.wang@...el.com,
	qingfang.deng@...lower.com.cn,
	leobras@...hat.com,
	jszhang@...nel.org,
	conor.dooley@...rochip.com,
	samuel.holland@...ive.com,
	yongxuan.wang@...ive.com,
	luxu.kernel@...edance.com,
	david@...hat.com,
	ruanjinjie@...wei.com,
	cuiyunhui@...edance.com,
	wangkefeng.wang@...wei.com,
	qiaozhe@...as.ac.cn
Cc: ardb@...nel.org,
	ast@...nel.org,
	linux-kernel@...r.kernel.org,
	linux-riscv@...ts.infradead.org,
	kvm@...r.kernel.org,
	kvm-riscv@...ts.infradead.org,
	linux-mm@...ck.org,
	linux-crypto@...r.kernel.org,
	bpf@...r.kernel.org,
	linux-input@...r.kernel.org,
	linux-perf-users@...r.kernel.org,
	linux-serial@...r.kernel.org,
	linux-fsdevel@...r.kernel.org,
	linux-arch@...r.kernel.org,
	maple-tree@...ts.infradead.org,
	linux-trace-kernel@...r.kernel.org,
	netdev@...r.kernel.org,
	linux-atm-general@...ts.sourceforge.net,
	linux-btrfs@...r.kernel.org,
	netfilter-devel@...r.kernel.org,
	coreteam@...filter.org,
	linux-nfs@...r.kernel.org,
	linux-sctp@...r.kernel.org,
	linux-usb@...r.kernel.org,
	linux-media@...r.kernel.org
Subject: [RFC PATCH V3 24/43] rv64ilp32_abi: compiler_types: Add "long long" into __native_word()

From: "Guo Ren (Alibaba DAMO Academy)" <guoren@...nel.org>

The rv64ilp32 abi supports native atomic64 operations. The
atomic64_t is defined by "long long," so add "long long" into
__native_word().

Signed-off-by: Guo Ren (Alibaba DAMO Academy) <guoren@...nel.org>
---
 include/linux/compiler_types.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index 981cc3d7e3aa..6cf36a8e9570 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -505,9 +505,16 @@ struct ftrace_likely_data {
 			 default: (x)))
 
 /* Is this type a native word size -- useful for atomic operations */
+#ifdef CONFIG_64BIT
+#define __native_word(t) \
+	(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
+	 sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long) || \
+	 sizeof(t) == sizeof(long long))
+#else
 #define __native_word(t) \
 	(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
 	 sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
+#endif
 
 #ifdef __OPTIMIZE__
 # define __compiletime_assert(condition, msg, prefix, suffix)		\
-- 
2.40.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ