lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 5 Feb 2019 23:11:06 +0000
From:   Kees Cook <keescook@...omium.org>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Dan Williams <dan.j.williams@...el.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Michal Hocko <mhocko@...e.com>, Linux-MM <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Keith Busch <keith.busch@...el.com>
Subject: Re: [PATCH v10 1/3] mm: Shuffle initial free memory to improve
 memory-side-cache utilization

On Tue, Feb 5, 2019 at 10:04 PM Andrew Morton <akpm@...ux-foundation.org> wrote:
>
> On Thu, 31 Jan 2019 21:15:17 -0800 Dan Williams <dan.j.williams@...el.com> wrote:
>
> > +config SHUFFLE_PAGE_ALLOCATOR
> > +     bool "Page allocator randomization"
> > +     default SLAB_FREELIST_RANDOM && ACPI_NUMA
> > +     help
>
> SLAB_FREELIST_RANDOM is default n, so this patchset won't get much
> runtime testing.
>
> How about you cook up a (-mm only) patch which makes the kernel default
> to SLAB_FREELIST_RANDOM=y, SHUFFLE_PAGE_ALLOCATOR=y (or whatever) to
> ensure we get a decent amount of runtime testing?  Then I can hold that
> in -mm (and -next) until we get bored of it?

I love this plan. :)

FWIW, distros have enabled it by default for a while. Here's Ubuntu,
for example:

$ grep SLAB_FREELIST /boot/config-4.1*
/boot/config-4.15.0-45-generic:CONFIG_SLAB_FREELIST_RANDOM=y
/boot/config-4.15.0-45-generic:CONFIG_SLAB_FREELIST_HARDENED=y
/boot/config-4.18.0-13-generic:CONFIG_SLAB_FREELIST_RANDOM=y
/boot/config-4.18.0-13-generic:CONFIG_SLAB_FREELIST_HARDENED=y
/boot/config-4.18.0-14-generic:CONFIG_SLAB_FREELIST_RANDOM=y
/boot/config-4.18.0-14-generic:CONFIG_SLAB_FREELIST_HARDENED=y

and Fedora too:

$ curl -s 'https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git/patch/fedora/configs/kernel-4.16.12-x86_64.config?h=f26'
| grep SLAB_FREELIST
+CONFIG_SLAB_FREELIST_RANDOM=y
+CONFIG_SLAB_FREELIST_HARDENED=y

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ