[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wiViikY0szsJGipSxFmMwdsvxjm7SwDfwNfMHYvQ64kAA@mail.gmail.com>
Date: Wed, 1 Jun 2022 18:08:13 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Keisuke Nishimura <keisuke.nishimura@...ia.fr>,
Kentaro Takeda <takedakn@...data.co.jp>,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Ayush Sawal <ayush.sawal@...lsio.com>,
Vinay Kumar Yadav <vinay.yadav@...lsio.com>,
Rohit Maheshwari <rohitm@...lsio.com>
Cc: Julia Lawall <Julia.Lawall@...ia.fr>,
Arnd Bergmann <arnd@...db.de>,
Jani Nikula <jani.nikula@...el.com>,
Sudip Mukherjee <sudipm.mukherjee@...il.com>,
Russell King <linux@...linux.org.uk>,
Viresh Kumar <vireshk@...nel.org>,
Shiraz Hashim <shiraz.linux.kernel@...il.com>,
Ville Syrjälä <ville.syrjala@...ux.intel.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel <dri-devel@...ts.freedesktop.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
SoC Team <soc@...nel.org>
Subject: Re: mainline build failure due to f1e4c916f97f ("drm/edid: add EDID
block count and size helpers")
On Wed, Jun 1, 2022 at 3:28 PM Keisuke Nishimura
<keisuke.nishimura@...ia.fr> wrote:
>
>
> I found 13 definitions of packed structure that contains:
> > - spinlock_t
> > - atomic_t
> > - dma_addr_t
> > - phys_addr_t
> > - size_t
> > - struct mutex
> > - struct device
>
> - raw_spinlock_t
Ok, so I don't think dma_addr_t/phys_addr_t/size_t are problematic,
they are just regular integers.
And 'struct device' is problematic only as it then contains any of the
atomic types (which it does)
> security/tomoyo/common.h: atomic_t in tomoyo_shared_acl_head
> drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls.h: spinlock_t in key_map
> arch/s390/include/asm/kvm_host.h: atomic_t in kvm_s390_sie_block
So these do look problematic.
I'm not actually clear on why tomoyo_shared_acl_head would be packed.
That makes no sense to me.
Same goes for key_map, it's not clear what the reason for that
__packed is, and it's clearly bogus. It might work, almost by mistake,
but it's wrong to try to pack that spinlock_t.
The s390 kvm use actually looks fine: the structure is packed, but
it's also aligned, and the spin-lock is at the beginning, so the
"packing" part is about the other members, not the first one.
The two that look wrong look like they will probably work anyway
(they'll presumably be effectively word-aligned, and that's sufficient
for spinlocks in practice).
But let's cc the tomoyo and chelsio people.
Linus
Powered by blists - more mailing lists