From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: "kernel test robot" <lkp@intel.com>,
netdev@vger.kernel.org, "Guo Ren" <guoren@kernel.org>,
linux-csky@vger.kernel.org, oe-kbuild-all@lists.linux.dev,
"Willem de Bruijn" <willemdebruijn.kernel@gmail.com>,
"Jason Wang" <jasowang@redhat.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
"Yuri Benditovich" <yuri.benditovich@daynix.com>,
"Akihiko Odaki" <akihiko.odaki@daynix.com>,
"Jonathan Corbet" <corbet@lwn.net>,
kvm@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v6 net-next 4/9] vhost-net: allow configuring extended features
Date: Sun, 6 Jul 2025 03:33:12 -0400 [thread overview]
Message-ID: <20250706032944-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <27f1275a-aaff-4cc2-896c-b2c34f08ab73@redhat.com>
On Fri, Jun 27, 2025 at 04:36:14PM +0200, Paolo Abeni wrote:
> On 6/27/25 3:11 PM, Paolo Abeni wrote:
> > +csky maintainer
> > On 6/27/25 8:41 AM, kernel test robot wrote:
> >> Hi Paolo,
> >>
> >> kernel test robot noticed the following build warnings:
> >>
> >> [auto build test WARNING on net-next/main]
> >>
> >> url: https://github.com/intel-lab-lkp/linux/commits/Paolo-Abeni/scripts-kernel_doc-py-properly-handle-VIRTIO_DECLARE_FEATURES/20250624-221751
> >> base: net-next/main
> >> patch link: https://lore.kernel.org/r/23e46bff5333015d92bf0876033750d9fbf555a0.1750753211.git.pabeni%40redhat.com
> >> patch subject: [PATCH v6 net-next 4/9] vhost-net: allow configuring extended features
> >> config: csky-randconfig-001-20250627 (https://download.01.org/0day-ci/archive/20250627/202506271443.G9cAx8PS-lkp@intel.com/config)
> >> compiler: csky-linux-gcc (GCC) 15.1.0
> >> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250627/202506271443.G9cAx8PS-lkp@intel.com/reproduce)
> >>
> >> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> >> the same patch/commit), kindly add following tags
> >> | Reported-by: kernel test robot <lkp@intel.com>
> >> | Closes: https://lore.kernel.org/oe-kbuild-all/202506271443.G9cAx8PS-lkp@intel.com/
> >>
> >> All warnings (new ones prefixed by >>):
> >>
> >> In file included from include/linux/uaccess.h:12,
> >> from include/linux/sched/task.h:13,
> >> from include/linux/sched/signal.h:9,
> >> from include/linux/rcuwait.h:6,
> >> from include/linux/percpu-rwsem.h:7,
> >> from include/linux/fs.h:34,
> >> from include/linux/compat.h:17,
> >> from drivers/vhost/net.c:8:
> >> arch/csky/include/asm/uaccess.h: In function '__get_user_fn.constprop':
> >>>> arch/csky/include/asm/uaccess.h:147:9: warning: 'retval' is used uninitialized [-Wuninitialized]
> >> 147 | __asm__ __volatile__( \
> >> | ^~~~~~~
> >> arch/csky/include/asm/uaccess.h:187:17: note: in expansion of macro '__get_user_asm_64'
> >> 187 | __get_user_asm_64(x, ptr, retval);
> >> | ^~~~~~~~~~~~~~~~~
> >> arch/csky/include/asm/uaccess.h:170:13: note: 'retval' was declared here
> >> 170 | int retval;
> >> | ^~~~~~
> >>
> >>
> >> vim +/retval +147 arch/csky/include/asm/uaccess.h
> >>
> >> da551281947cb2c Guo Ren 2018-09-05 141
> >> e58a41c2226847f Guo Ren 2021-04-21 142 #define __get_user_asm_64(x, ptr, err) \
> >> da551281947cb2c Guo Ren 2018-09-05 143 do { \
> >> da551281947cb2c Guo Ren 2018-09-05 144 int tmp; \
> >> e58a41c2226847f Guo Ren 2021-04-21 145 int errcode; \
> >> e58a41c2226847f Guo Ren 2021-04-21 146 \
> >> e58a41c2226847f Guo Ren 2021-04-21 @147 __asm__ __volatile__( \
> >> e58a41c2226847f Guo Ren 2021-04-21 148 "1: ldw %3, (%2, 0) \n" \
> >> da551281947cb2c Guo Ren 2018-09-05 149 " stw %3, (%1, 0) \n" \
> >> e58a41c2226847f Guo Ren 2021-04-21 150 "2: ldw %3, (%2, 4) \n" \
> >> e58a41c2226847f Guo Ren 2021-04-21 151 " stw %3, (%1, 4) \n" \
> >> e58a41c2226847f Guo Ren 2021-04-21 152 " br 4f \n" \
> >> e58a41c2226847f Guo Ren 2021-04-21 153 "3: mov %0, %4 \n" \
> >> e58a41c2226847f Guo Ren 2021-04-21 154 " br 4f \n" \
> >> da551281947cb2c Guo Ren 2018-09-05 155 ".section __ex_table, \"a\" \n" \
> >> da551281947cb2c Guo Ren 2018-09-05 156 ".align 2 \n" \
> >> e58a41c2226847f Guo Ren 2021-04-21 157 ".long 1b, 3b \n" \
> >> e58a41c2226847f Guo Ren 2021-04-21 158 ".long 2b, 3b \n" \
> >> da551281947cb2c Guo Ren 2018-09-05 159 ".previous \n" \
> >> e58a41c2226847f Guo Ren 2021-04-21 160 "4: \n" \
> >> e58a41c2226847f Guo Ren 2021-04-21 161 : "=r"(err), "=r"(x), "=r"(ptr), \
> >> e58a41c2226847f Guo Ren 2021-04-21 162 "=r"(tmp), "=r"(errcode) \
> >> e58a41c2226847f Guo Ren 2021-04-21 163 : "0"(err), "1"(x), "2"(ptr), "3"(0), \
> >> e58a41c2226847f Guo Ren 2021-04-21 164 "4"(-EFAULT) \
> >> da551281947cb2c Guo Ren 2018-09-05 165 : "memory"); \
> >> da551281947cb2c Guo Ren 2018-09-05 166 } while (0)
> >> da551281947cb2c Guo Ren 2018-09-05 167
> >
> > The intel test report reported the above compile warning on this series:
> >
> > https://lore.kernel.org/netdev/20250627084609-mutt-send-email-mst@kernel.org/T/#md788de2b3a4e9da23ac93b5f1c773a6070b5b4fb
> >
> > specifically, in patch 4:
> >
> > + if (get_user(features, featurep + 1 + i))
> > + return -EFAULT;
> >
> > AFAICS such statement is legit, and the bot points to some problem in
> > the arch specific get_user() implementation. Could you please have a look?
>
> Out of sheer ignorance on my side, I fail to see how the csky get_user()
> could work correctly without something alike the following (which indeed
> fixes the issue here).
>
> /P
> ---
> diff --git a/arch/csky/include/asm/uaccess.h
> b/arch/csky/include/asm/uaccess.h
> index 2e927c21d8a1..ae0864ad59a3 100644
> --- a/arch/csky/include/asm/uaccess.h
> +++ b/arch/csky/include/asm/uaccess.h
> @@ -167,7 +167,7 @@ do { \
>
> static inline int __get_user_fn(size_t size, const void __user *ptr,
> void *x)
> {
> - int retval;
> + int retval = 0;
> u32 tmp;
>
> switch (size) {
Given there's no reaction from the arch maintainers,
I see two options:
- go back to copy_from_user - nothing wrong with it, and the code
in question is off data path.
- go ahead and include this patch in the series, even though
I'm just as unsure it's right as you are.
Up to you really, but I think it's one of the two.
--
MST
next prev parent reply other threads:[~2025-07-06 7:33 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-24 14:09 [PATCH v6 net-next 0/9] virtio: introduce GSO over UDP tunnel Paolo Abeni
2025-06-24 14:09 ` [PATCH v6 net-next 1/9] scripts/kernel_doc.py: properly handle VIRTIO_DECLARE_FEATURES Paolo Abeni
2025-06-24 14:09 ` [PATCH v6 net-next 2/9] virtio: introduce extended features Paolo Abeni
2025-06-24 14:09 ` [PATCH v6 net-next 3/9] virtio_pci_modern: allow configuring " Paolo Abeni
2025-06-24 14:09 ` [PATCH v6 net-next 4/9] vhost-net: " Paolo Abeni
2025-06-27 6:41 ` kernel test robot
2025-06-27 10:28 ` Paolo Abeni
2025-06-27 12:18 ` Michael S. Tsirkin
2025-06-27 12:44 ` Paolo Abeni
2025-06-27 12:47 ` Michael S. Tsirkin
2025-07-04 14:09 ` Paolo Abeni
2025-06-27 13:11 ` Paolo Abeni
2025-06-27 14:36 ` Paolo Abeni
2025-07-06 7:33 ` Michael S. Tsirkin [this message]
2025-06-24 14:09 ` [PATCH v6 net-next 5/9] virtio_net: add supports for extended offloads Paolo Abeni
2025-06-24 14:09 ` [PATCH v6 net-next 6/9] net: implement virtio helpers to handle UDP GSO tunneling Paolo Abeni
2025-06-24 14:09 ` [PATCH v6 net-next 7/9] virtio_net: enable gso over UDP tunnel support Paolo Abeni
2025-06-24 14:09 ` [PATCH v6 net-next 8/9] tun: " Paolo Abeni
2025-06-24 14:09 ` [PATCH v6 net-next 9/9] vhost/net: " Paolo Abeni
2025-07-08 7:12 ` [PATCH v6 net-next 0/9] virtio: introduce GSO over UDP tunnel Paolo Abeni
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=20250706032944-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=akihiko.odaki@daynix.com \
--cc=andrew+netdev@lunn.ch \
--cc=corbet@lwn.net \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=guoren@kernel.org \
--cc=jasowang@redhat.com \
--cc=kuba@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=willemdebruijn.kernel@gmail.com \
--cc=xuanzhuo@linux.alibaba.com \
--cc=yuri.benditovich@daynix.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.