[PATCH v5 bpf-next 1/5] namei: Introduce new helper function path_walk_parent()
Song Liu
song at kernel.org
Tue Jun 24 17:37:36 UTC 2025
Hi Jan,
On Tue, Jun 24, 2025 at 5:18 AM Jan Kara <jack at suse.cz> wrote:
>
> On Mon 16-06-25 23:11:12, Song Liu wrote:
> > This helper walks an input path to its parent. Logic are added to handle
> > walking across mount tree.
> >
> > This will be used by landlock, and BPF LSM.
> >
> > Suggested-by: Neil Brown <neil at brown.name>
> > Signed-off-by: Song Liu <song at kernel.org>
>
> Looks good to me. Feel free to add:
>
> Reviewed-by: Jan Kara <jack at suse.cz>
Thanks for the review!
[...]
> > + *
> > + * Returns: either an ERR_PTR() or the chosen parent which will have had
> > + * the refcount incremented.
> > + */
>
> The behavior with LOOKUP_NO_XDEV is kind of odd (not your fault) and
> interestingly I wasn't able to find a place that would depend on the path
> being updated in that case. So either I'm missing some subtle detail (quite
> possible) or we can clean that up in the future.
We have RESOLVE_NO_XDEV in uapi/linux/openat2.h, so I guess we
cannot really remove it?
Thanks,
Song
[...]
More information about the Linux-security-module-archive
mailing list