From: Eugenio Perez Martin <eperezma@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Arnd Bergmann <arnd@kernel.org>, Jason Wang <jasowang@redhat.com>,
Xie Yongji <xieyongji@bytedance.com>,
Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
Anders Roxell <anders.roxell@linaro.org>,
Marco Crivellari <marco.crivellari@suse.com>,
virtualization@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] vduse: fix compat handling for VDUSE_IOTLB_GET_FD/VDUSE_VQ_GET_INFO
Date: Tue, 3 Feb 2026 16:03:59 +0100 [thread overview]
Message-ID: <CAJaqyWfNyfid9YHjQfZrwStUxvXwFahni9FcNFf_C49-BS=_eg@mail.gmail.com> (raw)
In-Reply-To: <a4612499-6a67-4d6b-946f-dc038ec2b6fd@app.fastmail.com>
On Tue, Feb 3, 2026 at 3:42 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Tue, Feb 3, 2026, at 15:13, Eugenio Perez Martin wrote:
> > On Tue, Feb 3, 2026 at 11:35 AM Michael S. Tsirkin <mst@redhat.com> wrote:
> >> Along with it or no, surely before the release.
> >> Given 32 on 64 with this apparently has been broken forever,
> >> I will merge this just based on even you did not bother testing compat, I am
> >> inclined to say I am merging this but not rebasing because
> >> of this.
> >>
> >> Oh and we got lucky this didn't leak kernel stack info.
> >>
> >> Eugenio, note for the future: please help make sure UAPI
> >> structs do not have hidden padding.
> >>
> >
> > Sure. I'm trying to find an automatic way to check for this but with
> > no luck :(. Arnd, did you use some tool for this or you just found it
> > by visual inspection? I'm trying pahole and -Wpadded but the output
> > includes a lot of struct not related to uapi.
> >
> > I guess it is possible to filter it with some clang or awk machinery,
> > but I'm asking in case I avoid developing something already existing.
>
> I have the patch series, but it's not quite ready for submission.
> In total, I annotated around 10% of the structure definitions
> (500 files) in include/uapi/ to shut up -Wpadded for all the
> existing structures with holes in them.
>
> In the end I turn on the check with
>
> --- a/usr/include/Makefile
> +++ b/usr/include/Makefile
> @@ -6,7 +6,7 @@
> #
> # -std=c90 (equivalent to -ansi) catches the violation of those.
> # We cannot go as far as adding -Wpedantic since it emits too many warnings.
> -UAPI_CFLAGS := -std=c90 -Werror=implicit-function-declaration
> +UAPI_CFLAGS := -std=c90 -Werror=implicit-function-declaration -Werror=padded
>
> # when cross-compiling with a minimal toolchain, use nolibc headers
> UAPI_CFLAGS += -I$(srctree)/tools/include/nolibc/
>
> which of course warns for all the existing holes. I will continue
> to send fixes for new instances in the meantime, as I'm testing
> linux-next.
>
Got it, to develop something in parallel would be to duplicate work
then. Looking forward to it then, thank you very much!
next prev parent reply other threads:[~2026-02-03 15:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-02 9:59 [PATCH 1/2] vduse: avoid adding implicit padding Arnd Bergmann
2026-02-02 9:59 ` [PATCH 2/2] vduse: fix compat handling for VDUSE_IOTLB_GET_FD/VDUSE_VQ_GET_INFO Arnd Bergmann
2026-02-02 11:34 ` Eugenio Perez Martin
2026-02-02 11:59 ` Arnd Bergmann
2026-02-02 16:45 ` Michael S. Tsirkin
2026-02-02 22:54 ` Arnd Bergmann
2026-02-03 10:35 ` Michael S. Tsirkin
2026-02-03 14:13 ` Eugenio Perez Martin
2026-02-03 14:41 ` Arnd Bergmann
2026-02-03 15:03 ` Eugenio Perez Martin [this message]
2026-02-02 11:28 ` [PATCH 1/2] vduse: avoid adding implicit padding Eugenio Perez Martin
2026-02-02 11:50 ` Eugenio Perez Martin
2026-02-02 12:06 ` Arnd Bergmann
2026-02-03 7:00 ` Eugenio Perez Martin
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='CAJaqyWfNyfid9YHjQfZrwStUxvXwFahni9FcNFf_C49-BS=_eg@mail.gmail.com' \
--to=eperezma@redhat.com \
--cc=anders.roxell@linaro.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marco.crivellari@suse.com \
--cc=mst@redhat.com \
--cc=virtualization@lists.linux.dev \
--cc=xieyongji@bytedance.com \
--cc=xuanzhuo@linux.alibaba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox