lkml.org 
[lkml]   [2022]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 2/2] lsm: Add/fix return values in lsm_hooks.h and fix formatting
From
Date
On Wed, 2022-12-07 at 14:34 -0500, Paul Moore wrote:
> On Wed, Dec 7, 2022 at 4:18 AM Roberto Sassu
> <roberto.sassu@huaweicloud.com> wrote:
> > For this patch, I saw it is already in lsm/next. Paul, should I do an
> > incremental patch or change the one in the repo and you force push it?
> > I would just remove the three lines after the parameters description.
>
> Just send a patch against the current lsm/next branch to remove those
> lines, and please do it ASAP as the merge window opens this
> weekend/Monday.

Ok, was about to send but I would need a clarification first.

In mount_api.rst, there is for security_fs_context_parse_param():

The value pointed to by param may be modified (if a string) or stolen
(provided the value pointer is NULL'd out). If it is stolen, 0 must be
returned to prevent it being passed to the filesystem.

Looking at security.c:

hlist_for_each_entry(hp, &security_hook_heads.fs_context_parse_param,
list) {
trc = hp->hook.fs_context_parse_param(fc, param);
if (trc == 0)
rc = 0;
else if (trc != -ENOPARAM)
return trc;
}

If, as mount_api.rst says, the value is modified by an LSM or stolen,
should it be passed to other LSMs too?

Thanks

Roberto

\
 
 \ /
  Last update: 2022-12-08 10:30    [W:0.085 / U:2.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site