On Mon, Jul 15, 2024 at 9:35 AM Mickaël Salaün <mic@xxxxxxxxxxx> wrote: > On Wed, Jul 10, 2024 at 12:20:18PM -0400, Paul Moore wrote: > > On Wed, Jul 10, 2024 at 6:40 AM Mickaël Salaün <mic@xxxxxxxxxxx> wrote: > > > On Tue, Jul 09, 2024 at 10:40:30PM -0400, Paul Moore wrote: ... > > > However, I'm wondering if we could backport this patch down to v5.15 . > > > I guess not, so I'll need to remove this hook implementation for > > > Landlock, backport it to v5.15, and then you'll need to re-add this > > > check with this patch. At least it has been useful to spot this inode > > > issue, but it could still be useful to spot potential memory leaks with > > > a negligible performance impact. > > > > Yes, it's a bit complicated with the IMA/EVM promotion happening > > fairly recently. I'm marking the patch with a stable tag, but > > considering we're at -rc7 and this needs at least one more respin, > > testing, ACKs, etc. it might not land in Linus' tree until sometime > > post v6.11-rc1. Considering that, I might suggest dropping the > > Landlock hook in -stable and re-adding it to Linus' tree once this fix > > lands, but that decision is up to you. > > I would prefer to backport the new hook. I can help with that. In > fact, I tried to backport the removal of the hook for Landlock, and it > requires the same amount of work, so it would be better to work > together. That should also ease future backports impacting the same > part of the code. Okay, let's get the initial v6.11 LSM PR merged (I just sent it to Linus) and then I'll post the updated patchset and a proper patch for review. > BTW, while trying to backport that to linux-5.15.y I noticed that a fix > is missing in this branch: the default return value for the > inode_init_security hook, see commit 6bcdfd2cac55 ("security: Allow all > LSMs to provide xattrs for inode_init_security hook"). Likely a casualty of a merge conflict; I haven't noticed the stable kernel folks doing any manual merging of LSM patches that fail an automated merge. You can always do the merge and send it to them. -- paul-moore.com