|
Message-ID: <20170510192035.GI32165@htj.duckdns.org> Date: Wed, 10 May 2017 15:20:35 -0400 From: Tejun Heo <tj@...nel.org> To: Daniel Micay <danielmicay@...il.com> Cc: Christoph Lameter <cl@...ux.com>, Kees Cook <keescook@...omium.org>, kernel-hardening@...ts.openwall.com Subject: Re: [PATCH] mark most percpu globals as __ro_after_init On Wed, May 10, 2017 at 01:59:32PM -0400, Daniel Micay wrote: > On Wed, 2017-05-10 at 13:52 -0400, Tejun Heo wrote: > > Hello, Daniel. > > > > On Wed, May 10, 2017 at 01:36:37PM -0400, Daniel Micay wrote: > > > Moving pcpu_base_addr to this section comes from PaX where it's part > > > of > > > KERNEXEC. This extends it to the rest of the globals only written by > > > the > > > init code. > > > > How did you test the patch? > > Booted / did some stuff on x86 (it's running right now), and currently > building it for a 3.18 arm64 kernel to test there. > > > > > > -static struct list_head *pcpu_slot __read_mostly; /* chunk list > > > slots */ > > > +static struct list_head *pcpu_slot __ro_after_init; /* chunk list > > > slots */ > > > > At least this one isn't read only. > > It's the array it points to being modified after it gets assigned to > during init with pcpu_slot = memblock_virt_alloc(...), not the pointer > variable itself. The references after init are all pcpu_slot[...] > including taking references to slots in the array so there's always a > dereference happening first. Ah, right. Cool, applying to percpu/for-4.13. Thanks. -- tejun
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.