Re: [PATCH 1/7] livepatch: Apply vmlinux-specific KLP relocations early
From: Josh Poimboeuf
Date: Wed Apr 15 2020 - 12:29:26 EST
On Wed, Apr 15, 2020 at 04:30:15PM +0200, Miroslav Benes wrote:
> > From: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
> > Subject: [PATCH] livepatch: Disallow vmlinux.ko
> >
> > This is purely a theoretical issue, but if there were a module named
>
> OT: "if there were"... subjunctive?
I had to google "subjunctive", but yes that seems to be it :-)
It means "if, hypothetically, a module named vmlinux.ko existed"...
> > vmlinux.ko, the livepatch relocation code wouldn't be able to
> > distinguish between vmlinux-specific and vmlinux.o-specific KLP
> > relocations.
> >
> > If CONFIG_LIVEPATCH is enabled, don't allow a module named vmlinux.ko.
>
> Yup, there is no such check nowadays. I always struggle to find the right
> balance between being overprotective and letting the user shoot themselves
> in their foot if they want to. But it does not hurt, so ack to that.
Yeah, and it does seem very unlikely to have a vmlinux.ko, but
especially OOT modules do some crazy things and you never know...
--
Josh