Re: [PATCH] qemu_fw_cfg: Make fw_cfg_rev_attr a proper kobj_attribute

From: Sedat Dilek
Date: Fri Apr 02 2021 - 14:45:31 EST


On Fri, Apr 2, 2021 at 8:31 PM Nathan Chancellor <nathan@xxxxxxxxxx> wrote:
>
> On Fri, Apr 02, 2021 at 11:25:42AM -0700, Kees Cook wrote:
> > On Fri, Apr 02, 2021 at 08:42:07AM +0200, Sedat Dilek wrote:
> > > On Thu, Feb 25, 2021 at 10:25 PM Kees Cook <keescook@xxxxxxxxxxxx> wrote:
> > > >
> > > > On Thu, 11 Feb 2021 12:42:58 -0700, Nathan Chancellor wrote:
> > > > > fw_cfg_showrev() is called by an indirect call in kobj_attr_show(),
> > > > > which violates clang's CFI checking because fw_cfg_showrev()'s second
> > > > > parameter is 'struct attribute', whereas the ->show() member of 'struct
> > > > > kobj_structure' expects the second parameter to be of type 'struct
> > > > > kobj_attribute'.
> > > > >
> > > > > $ cat /sys/firmware/qemu_fw_cfg/rev
> > > > > 3
> > > > >
> > > > > [...]
> > > >
> > > > Applied to kspp/cfi/cleanups, thanks!
> > > >
> > > > [1/1] qemu_fw_cfg: Make fw_cfg_rev_attr a proper kobj_attribute
> > > > https://git.kernel.org/kees/c/f5c4679d6c49
> > > >
> > >
> > > I have queued this up in my custom patchset
> > > (for-5.12/kspp-cfi-cleanups-20210225).
> > >
> > > What is the plan to get this upstream?
> >
> > I haven't sent it to Linus yet -- I was expecting to batch more of these
> > and send them for v5.13. (But if the kvm folks snag it, that's good
> > too.)
>
> I am going to be putting the CFI series through its paces on both arm64
> and x86_64 over the next week or so on several different machines (in
> fact, I am writing up a report right now) so I will probably have some
> more of these as I find them.
>

This was just a friendly ping.

Sami has sent some patches which I reported in the early stage of
clang-cfi (x86-64) through subtree maintainers.
It's up to you Nathan or kvm folks.

Upstreamed patches means to me a RDC-ed custom patchset.

- Sedat -