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]
Message-Id: <20250109084341.477226-1-wangyufeng@kylinos.cn>
Date: Thu,  9 Jan 2025 16:43:41 +0800
From: Yufeng Wang <wangyufeng@...inos.cn>
To: Kees Cook <kees@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Nathan Chancellor <nathan@...nel.org>,
	Jakub Kicinski <kuba@...nel.org>,
	Petr Pavlu <petr.pavlu@...e.com>,
	Yafang Shao <laoar.shao@...il.com>,
	Jan Hendrik Farr <kernel@...rr.cc>,
	Tony Ambardar <tony.ambardar@...il.com>,
	Alexander Potapenko <glider@...gle.com>,
	Uros Bizjak <ubizjak@...il.com>,
	Shunsuke Mie <mie@...l.co.jp>
Cc: linux-kernel@...r.kernel.org,
	Yufeng Wang <wangyufeng@...inos.cn>,
	stable@...r.kernel.org
Subject: [PATCH] tools: fixed compile tools/virtio error "__user" redefined [-Werror]

we use -Werror now, and warnings break the build so let's fixed it.

from virtio_test.c:17:
./linux/../../../include/linux/compiler_types.h:48: error: "__user" redefined [-Werror]
48 | # define __user BTF_TYPE_TAG(user)
|
In file included from ../../usr/include/linux/stat.h:5,
from /usr/include/x86_64-linux-gnu/bits/statx.h:31,
from /usr/include/x86_64-linux-gnu/sys/stat.h:465,
from virtio_test.c:12:
../include/linux/types.h:56: note: this is the location of the previous definition
56 | #define __user

Cc: stable@...r.kernel.org

Signed-off-by: Yufeng Wang <wangyufeng@...inos.cn>
---
 include/linux/compiler_types.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index 5d6544545658..3316e56140d6 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -54,6 +54,7 @@ static inline void __chk_io_ptr(const volatile void __iomem *ptr) { }
 # ifdef STRUCTLEAK_PLUGIN
 #  define __user	__attribute__((user))
 # else
+#  undef __user
 #  define __user	BTF_TYPE_TAG(user)
 # endif
 # define __iomem
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ