[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANpmjNOEhyW7xnaQ2gk0XXrdLSR6DgyWD96CBb-cxUJT+wgMXQ@mail.gmail.com>
Date: Wed, 7 Feb 2024 23:21:09 +0100
From: Marco Elver <elver@...gle.com>
To: Matthieu Baerts <matttbe@...nel.org>
Cc: Borislav Petkov <bp@...en8.de>, Alexander Potapenko <glider@...gle.com>, Dmitry Vyukov <dvyukov@...gle.com>,
kasan-dev@...glegroups.com, Netdev <netdev@...r.kernel.org>,
Jakub Kicinski <kuba@...nel.org>, linux-hardening@...r.kernel.org,
Kees Cook <keescook@...omium.org>, "the arch/x86 maintainers" <x86@...nel.org>
Subject: Re: KFENCE: included in x86 defconfig?
On Wed, 7 Feb 2024 at 23:12, Matthieu Baerts <matttbe@...nel.org> wrote:
>
> On 07/02/2024 20:04, Borislav Petkov wrote:
> > On Wed, Feb 07, 2024 at 07:35:53PM +0100, Matthieu Baerts wrote:
> >> Sorry, I'm sure I understand your suggestion: do you mean not including
> >> KFENCE in hardening.config either, but in another one?
> >>
> >> For the networking tests, we are already merging .config files, e.g. the
> >> debug.config one. We are not pushing to have KFENCE in x86 defconfig, it
> >> can be elsewhere, and we don't mind merging other .config files if they
> >> are maintained.
> >
> > Well, depends on where should KFENCE be enabled? Do you want people to
> > run their tests with it too, or only the networking tests? If so, then
> > hardening.config probably makes sense.
> >
> > Judging by what Documentation/dev-tools/kfence.rst says:
> >
> > "KFENCE is designed to be enabled in production kernels, and has near zero
> > performance overhead."
> >
> > this reads like it should be enabled *everywhere* - not only in some
> > hardening config.
> >
> > But then again I've never played with it so I don't really know.
> >
> > If only the networking tests should enable it, then it should be a local
> > .config snippet which is not part of the kernel.
> >
> > Makes more sense?
>
> Yes, thank you!
>
> On my side, KFENCE is currently in local .config snippet, not part of
> the kernel. If it has near zero performance overhead and can be used in
> productions kernel, maybe it can be set elsewhere to be used by more
> people? But not everywhere, according to Marco.
At the moment we still think this decision is to be made by the
distribution, system administrator, or whoever decides on kernel
config. I'm aware that several major Linux distributions enable KFENCE
in their kernels. The tool was designed for in-production use - we use
it in production [1] - but I'm not sure we can and should make this
decision for _every_ production kernel. The hardening config seems
like a good place, and I've put that on the TODO list.
Thanks,
-- Marco
[1] https://arxiv.org/abs/2311.09394 (see Linux section)
Powered by blists - more mailing lists