From: Greg KH <gregkh@linuxfoundation.org>
To: Yufeng Wang <wangyufeng@kylinos.cn>
Cc: Kees Cook <kees@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Nathan Chancellor <nathan@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
Petr Pavlu <petr.pavlu@suse.com>,
Yafang Shao <laoar.shao@gmail.com>,
Jan Hendrik Farr <kernel@jfarr.cc>,
Tony Ambardar <tony.ambardar@gmail.com>,
Alexander Potapenko <glider@google.com>,
Uros Bizjak <ubizjak@gmail.com>, Shunsuke Mie <mie@igel.co.jp>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] tools: fixed compile tools/virtio error "__user" redefined [-Werror]
Date: Thu, 9 Jan 2025 10:14:00 +0100 [thread overview]
Message-ID: <2025010943-chess-affluent-1bb5@gregkh> (raw)
In-Reply-To: <20250109084341.477226-1-wangyufeng@kylinos.cn>
On Thu, Jan 09, 2025 at 04:43:41PM +0800, Yufeng Wang wrote:
> 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@vger.kernel.org
>
> Signed-off-by: Yufeng Wang <wangyufeng@kylinos.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
What commit does this fix? Why is this suddenly showing up now?
thanks,
greg k-h
next prev parent reply other threads:[~2025-01-09 9:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-09 8:43 [PATCH] tools: fixed compile tools/virtio error "__user" redefined [-Werror] Yufeng Wang
2025-01-09 9:14 ` Greg KH [this message]
2025-01-13 2:34 ` Hao Ge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2025010943-chess-affluent-1bb5@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=glider@google.com \
--cc=kees@kernel.org \
--cc=kernel@jfarr.cc \
--cc=kuba@kernel.org \
--cc=laoar.shao@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mie@igel.co.jp \
--cc=nathan@kernel.org \
--cc=petr.pavlu@suse.com \
--cc=stable@vger.kernel.org \
--cc=tony.ambardar@gmail.com \
--cc=ubizjak@gmail.com \
--cc=wangyufeng@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox