In addition to the set_memory_xx() functions which allows to change
the memory attributes of not (yet) used memory regions, implement a
set_memory_attr() function to:
- set the final memory protection after init on currently used
kernel regions.
- enable/disable kernel memory regions in the scope o
Use set_memory_attr() instead of the PPC32 specific change_page_attr()
change_page_attr() was checking that the address was not mapped by
blocks and was handling highmem, but that's unneeded because the
affected pages can't be in highmem and block mapping verification
is already done by the caller
From: Russell Currey
skiroot_defconfig is the only powerpc defconfig with STRICT_KERNEL_RWX
enabled, and if you want memory protection for kernel text you'd want it
for modules too, so enable STRICT_MODULE_RWX there.
Acked-by: Joel Stanley
Signed-off-by: Russell Currey
---
v3: no change
v2: no
From: Russell Currey
To enable strict module RWX on powerpc, set:
CONFIG_STRICT_MODULE_RWX=y
You should also have CONFIG_STRICT_KERNEL_RWX=y set to have any real
security benefit.
ARCH_HAS_STRICT_MODULE_RWX is set to require ARCH_HAS_STRICT_KERNEL_RWX.
This is due to a quirk in arch/Kconfi
From: Russell Currey
Very rudimentary, just
echo 1 > [debugfs]/check_wx_pages
and check the kernel log. Useful for testing strict module RWX.
Updated the Kconfig entry to reflect this.
Also fixed a typo.
Signed-off-by: Russell Currey
---
v3: no change
v2: no change
---
arch/powerp
With CONFIG_STRICT_KERNEL_RWX=y and CONFIG_KPROBES=y, there will be one
W+X page at boot by default. This can be tested with
CONFIG_PPC_PTDUMP=y and CONFIG_PPC_DEBUG_WX=y set, and checking the
kernel log during boot.
powerpc doesn't implement its own alloc() for kprobes like other
architectures d
The set_memory_{ro/rw/nx/x}() functions are required for STRICT_MODULE_RWX,
and are generally useful primitives to have. This implementation is
designed to be completely generic across powerpc's many MMUs.
It's possible that this could be optimised to be faster for specific
MMUs, but the focus is
Le 03/02/2020 à 01:46, Russell Currey a écrit :
On Wed, 2020-01-08 at 13:52 +0100, Christophe Leroy wrote:
Le 24/12/2019 à 06:55, Russell Currey a écrit :
diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
index 5e147986400d..d0a0bcbc9289 100644
--- a/arch/powerpc/mm/Makefile
Le 03/02/2020 à 05:50, Russell Currey a écrit :
On Fri, 2020-01-31 at 13:34 +, Christophe Leroy wrote:
With CONFIG_STRICT_KERNEL_RWX=y and CONFIG_KPROBES=y, there will be
one
W+X page at boot by default. This can be tested with
CONFIG_PPC_PTDUMP=y and CONFIG_PPC_DEBUG_WX=y set, and check
Le 03/02/2020 à 02:00, Patchwork a écrit :
Hello,
The following patch (submitted by you) has been updated in Patchwork:
* linuxppc-dev: powerpc/nohash: Don't flush all TLBs when flushing one page
- http://patchwork.ozlabs.org/patch/1231983/
- for: Linux PPC development
was
On Fri, 2020-01-31 at 13:34 +, Christophe Leroy wrote:
> With CONFIG_STRICT_KERNEL_RWX=y and CONFIG_KPROBES=y, there will be
> one
> W+X page at boot by default. This can be tested with
> CONFIG_PPC_PTDUMP=y and CONFIG_PPC_DEBUG_WX=y set, and checking the
> kernel log during boot.
>
> powerpc
Hello Nathan,
On Wed, Dec 04, 2019 at 04:24:52PM -0600, Nathan Lynch wrote:
> "Gautham R. Shenoy" writes:
> > diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
> > index a36fd05..708ec68 100644
> > --- a/arch/powerpc/kernel/idle.c
> > +++ b/arch/powerpc/kernel/idle.c
> > @@ -33
Hi Naveen,
On Thu, Dec 05, 2019 at 10:23:58PM +0530, Naveen N. Rao wrote:
> >diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
> >index 80a676d..42ade55 100644
> >--- a/arch/powerpc/kernel/sysfs.c
> >+++ b/arch/powerpc/kernel/sysfs.c
> >@@ -1044,6 +1044,36 @@ static ssize_t sh
Hello Nathan,
On Wed, Dec 04, 2019 at 04:24:31PM -0600, Nathan Lynch wrote:
> "Gautham R. Shenoy" writes:
> > @@ -1067,6 +1097,8 @@ static int __init topology_init(void)
> > register_cpu(c, cpu);
> >
> > device_create_file(&c->dev, &dev_attr_physical_id)
Hi Christophe,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on powerpc/next]
[also build test ERROR on next-20200131]
[cannot apply to v5.5]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use
On Wed, 2020-01-08 at 13:52 +0100, Christophe Leroy wrote:
>
> Le 24/12/2019 à 06:55, Russell Currey a écrit :
> > The set_memory_{ro/rw/nx/x}() functions are required for
> > STRICT_MODULE_RWX,
> > and are generally useful primitives to have. This implementation
> > is
> > designed to be complet
On 02 February 2020 at 09:19 am, Christophe Leroy wrote:
Hello,
Le 02/02/2020 à 01:08, Christian Zigotzky a écrit :
Hello,
We regularly compile and test Linux kernels every day during the
merge window. Since Thuesday we have very high CPU loads because of
the avahi daemon on our desktop Linu
> On Jan 30, 2020, at 9:13 AM, Christophe Leroy wrote:
>
> config DEBUG_VM_PGTABLE
>bool "Debug arch page table for semantics compliance" if
> ARCH_HAS_DEBUG_VM_PGTABLE || EXPERT
>depends on MMU
>default 'n' if !ARCH_HAS_DEBUG_VM_PGTABLE
>default 'y' if DEBUG_VM
Does it reall
Le 02/02/2020 à 08:18, Anshuman Khandual a écrit :
On 01/30/2020 07:43 PM, Christophe Leroy wrote:
Le 30/01/2020 à 14:04, Anshuman Khandual a écrit :
On 01/28/2020 10:35 PM, Christophe Leroy wrote:
I think we could make it standalone and 'default y if DEBUG_VM' instead.
Which will
On 01/30/2020 06:34 PM, Anshuman Khandual wrote:
> On 01/28/2020 10:35 PM, Christophe Leroy wrote:
>>
>> Le 28/01/2020 à 02:27, Anshuman Khandual a écrit :
>>> This adds tests which will validate architecture page table helpers and
>>> other accessors in their compliance with expected generic MM
Hello,
Le 02/02/2020 à 01:08, Christian Zigotzky a écrit :
Hello,
We regularly compile and test Linux kernels every day during the merge
window. Since Thuesday we have very high CPU loads because of the avahi
daemon on our desktop Linux systems (Ubuntu, Debian etc).
Error message: avahi-dae
21 matches
Mail list logo