linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [Bug 215621] New: Warning: Unable to mark rodata read only on this CPU. (PPC970MP)
@ 2022-02-19  1:04 bugzilla-daemon
  2022-02-19  1:04 ` [Bug 215621] " bugzilla-daemon
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: bugzilla-daemon @ 2022-02-19  1:04 UTC (permalink / raw)
  To: linuxppc-dev

https://bugzilla.kernel.org/show_bug.cgi?id=215621

            Bug ID: 215621
           Summary: Warning: Unable to mark rodata read only on this CPU.
                    (PPC970MP)
           Product: Platform Specific/Hardware
           Version: 2.5
    Kernel Version: 5.17-rc4
          Hardware: PPC-64
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: PPC-64
          Assignee: platform_ppc-64@kernel-bugs.osdl.org
          Reporter: erhard_f@mailbox.org
        Regression: No

Created attachment 300482
  --> https://bugzilla.kernel.org/attachment.cgi?id=300482&action=edit
dmesg (5.17-rc4, PowerMac G5 11,2)

STRICT_MODULE_RWX is enabled in kernel but it does not seem to work on my
PowerMac G5 11,2.

Kernel dmesg says:
[...]
Freeing unused kernel image (initmem) memory: 3968K
Warning: Unable to mark rodata read only on this CPU.
rodata_test: test data was not read only
[...]


 # lscpu 
Architecture:          ppc64
  CPU op-mode(s):      32-bit, 64-bit
  Byte Order:          Big Endian
CPU(s):                2
  On-line CPU(s) list: 0,1
Model name:            PPC970MP, altivec supported
  Model:               1.1 (pvr 0044 0101)
  Thread(s) per core:  1
  Core(s) per socket:  2
  Socket(s):           1
  CPU max MHz:         2300.0000
  CPU min MHz:         1150.0000
Caches (sum of all):   
  L1d:                 64 KiB (2 instances)
  L1i:                 128 KiB (2 instances)
  L2:                  2 MiB (2 instances)
NUMA:                  
  NUMA node(s):        1
  NUMA node0 CPU(s):   0,1
Vulnerabilities:       
  Itlb multihit:       Not affected
  L1tf:                Vulnerable
  Mds:                 Not affected
  Meltdown:            Vulnerable
  Spec store bypass:   Vulnerable
  Spectre v1:          Mitigation; __user pointer sanitization
  Spectre v2:          Vulnerable
  Srbds:               Not affected
  Tsx async abort:     Not affected

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 215621] Warning: Unable to mark rodata read only on this CPU. (PPC970MP)
  2022-02-19  1:04 [Bug 215621] New: Warning: Unable to mark rodata read only on this CPU. (PPC970MP) bugzilla-daemon
@ 2022-02-19  1:04 ` bugzilla-daemon
  2022-02-20 16:38 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2022-02-19  1:04 UTC (permalink / raw)
  To: linuxppc-dev

https://bugzilla.kernel.org/show_bug.cgi?id=215621

--- Comment #1 from Erhard F. (erhard_f@mailbox.org) ---
Created attachment 300483
  --> https://bugzilla.kernel.org/attachment.cgi?id=300483&action=edit
kernel .config (5.17-rc4, PowerMac G5 11,2)

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 215621] Warning: Unable to mark rodata read only on this CPU. (PPC970MP)
  2022-02-19  1:04 [Bug 215621] New: Warning: Unable to mark rodata read only on this CPU. (PPC970MP) bugzilla-daemon
  2022-02-19  1:04 ` [Bug 215621] " bugzilla-daemon
@ 2022-02-20 16:38 ` bugzilla-daemon
  2022-02-20 18:10 ` bugzilla-daemon
  2022-02-21  6:55 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2022-02-20 16:38 UTC (permalink / raw)
  To: linuxppc-dev

https://bugzilla.kernel.org/show_bug.cgi?id=215621

Christophe Leroy (christophe.leroy@csgroup.eu) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |christophe.leroy@csgroup.eu

--- Comment #2 from Christophe Leroy (christophe.leroy@csgroup.eu) ---
Look at
https://elixir.bootlin.com/linux/v5.17-rc4/source/arch/powerpc/kernel/cputable.c#L196
at you'll see that your processor has .mmu_features = MMU_FTRS_PPC970

Then you see at
https://elixir.bootlin.com/linux/v5.17-rc4/source/arch/powerpc/include/asm/mmu.h#L135
that MMU_FTRS_PPC970 doesn't include MMU_FTR_KERNEL_RO.

MMU_FTR_KERNEL_RO is in POWER6.

In commit 984d7a1ec67c ("powerpc/mm: Fixup kernel read only mapping") you see
that this feature appears in ISA 2.04.

Previous version of ISA only has PP bits which only provides RW for kernel
pages.

So this bug is not a bug, it's a limitation of PPC970MP, and the warning in
dmesg is there to warn you that allthough you have select
CONFIG_STRICT_KERNEL_RWX, this CPU doesn't support it.

And for the same reason, CONFIG_STRICT_MODULE_RWX doesn't work either.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 215621] Warning: Unable to mark rodata read only on this CPU. (PPC970MP)
  2022-02-19  1:04 [Bug 215621] New: Warning: Unable to mark rodata read only on this CPU. (PPC970MP) bugzilla-daemon
  2022-02-19  1:04 ` [Bug 215621] " bugzilla-daemon
  2022-02-20 16:38 ` bugzilla-daemon
@ 2022-02-20 18:10 ` bugzilla-daemon
  2022-02-21  6:55 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2022-02-20 18:10 UTC (permalink / raw)
  To: linuxppc-dev

https://bugzilla.kernel.org/show_bug.cgi?id=215621

Erhard F. (erhard_f@mailbox.org) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #3 from Erhard F. (erhard_f@mailbox.org) ---
Erm ok, so it seems I did not check this thoroughly...

If MMU_FTRS_PPC970 doesn't provide MMU_FTR_KERNEL_RO then perhaps
CONFIG_STRICT_KERNEL_RWX can be skipped in the .config so it can't be wrongly
selected?

Anyhow you are correct that this is not a bug. Thanks for the background!

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 215621] Warning: Unable to mark rodata read only on this CPU. (PPC970MP)
  2022-02-19  1:04 [Bug 215621] New: Warning: Unable to mark rodata read only on this CPU. (PPC970MP) bugzilla-daemon
                   ` (2 preceding siblings ...)
  2022-02-20 18:10 ` bugzilla-daemon
@ 2022-02-21  6:55 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2022-02-21  6:55 UTC (permalink / raw)
  To: linuxppc-dev

https://bugzilla.kernel.org/show_bug.cgi?id=215621

--- Comment #4 from Christophe Leroy (christophe.leroy@csgroup.eu) ---
It is up to you to unselect CONFIG_STRICT_KERNEL_RWX.

The kernel is usually built to boot on any PPC64 processors, so we can't forbid
the selection of CONFIG_STRICT_KERNEL_RWX.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-21  6:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-19  1:04 [Bug 215621] New: Warning: Unable to mark rodata read only on this CPU. (PPC970MP) bugzilla-daemon
2022-02-19  1:04 ` [Bug 215621] " bugzilla-daemon
2022-02-20 16:38 ` bugzilla-daemon
2022-02-20 18:10 ` bugzilla-daemon
2022-02-21  6:55 ` bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).