Re: [RFC PATCH 3/3] lsm: consolidate buffer size handling into lsm_fill_user_ctx()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 21, 2023 at 10:21:04AM -0500, Paul Moore wrote:
> On Thu, Dec 21, 2023 at 8:01 AM Mark Brown <broonie@xxxxxxxxxx> wrote:
> > On Wed, Dec 20, 2023 at 08:40:24PM -0500, Paul Moore wrote:

> > > Suggestions on how to annotate the struct, or the code doing the
> > > memcpy() are welcome.

> > You're looking for a __counted_by() annotation here I think.

> Can you verify and submit a patch for that?  I'm asking because my
> build/toolchain configuration never produced these warnings/errors
> during my testing.

Huh, actually it's not __counted_by() since this shows up with
arm64/gcc-10 (and some other arches) which doesn't have that.  I'll
submit the __counted_by() patch anyway since it's clearly a good
annotation but it doesn't actually shut the warning up in this case.
Adding the hardening people, and I'll have a further look.

You can reproduce with

   tuxmake -r docker -k defconfig -a arm64 -t gcc-10

using https://www.tuxmake.org/

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux