[RFC PATCH 10/29] lsm: cleanup the LSM blob size code

Fan Wu wufan at kernel.org
Sat Apr 19 15:58:44 UTC 2025


On Fri, Apr 18, 2025 at 10:53 PM Kees Cook <kees at kernel.org> wrote:
>
> On Fri, Apr 18, 2025 at 07:42:52PM -0700, Fan Wu wrote:
> > On Wed, Apr 9, 2025 at 11:53 AM Paul Moore <paul at paul-moore.com> wrote:
> > >
> > > Convert the lsm_blob_size fields to unsigned integers as there is no
> > > current need for them to be negative, change "lsm_set_blob_size()" to
> > > "lsm_blob_size_update()" to better reflect reality, and perform some
> > > other minor cleanups to the associated code.
> > >
> > > Signed-off-by: Paul Moore <paul at paul-moore.com>
> > > ---
...
> >
> > Can we use size_t here?
>
> These blobs are relatively small -- size_t would double the memory usage here.
>
Thanks for the insight. The memory usage consideration makes sense to me.

-Fan



More information about the Linux-security-module-archive mailing list