linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Rohan McLure <rmclure@linux.ibm.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Cc: "mpe@ellerman.id.au" <mpe@ellerman.id.au>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH v11 00/11] Support page table check PowerPC
Date: Thu, 28 Mar 2024 06:52:53 +0000	[thread overview]
Message-ID: <5009c511-ec85-4d05-a106-8fca9189dd5d@csgroup.eu> (raw)
In-Reply-To: <20240328045535.194800-3-rmclure@linux.ibm.com>



Le 28/03/2024 à 05:55, Rohan McLure a écrit :
> Support page table check on all PowerPC platforms. This works by
> serialising assignments, reassignments and clears of page table
> entries at each level in order to ensure that anonymous mappings
> have at most one writable consumer, and likewise that file-backed
> mappings are not simultaneously also anonymous mappings.
> 
> In order to support this infrastructure, a number of stubs must be
> defined for all powerpc platforms. Additionally, seperate set_pte_at()
> and set_pte_at_unchecked(), to allow for internal, uninstrumented mappings.

I gave it a try on QEMU e500 (64 bits), and get the following Oops. What 
do I have to look for ?

Freeing unused kernel image (initmem) memory: 2588K
This architecture does not have kernel memory protection.
Run /init as init process
------------[ cut here ]------------
kernel BUG at mm/page_table_check.c:119!
Oops: Exception in kernel mode, sig: 5 [#1]
BE PAGE_SIZE=4K SMP NR_CPUS=32 QEMU e500
Modules linked in:
CPU: 0 PID: 1 Comm: init Not tainted 6.8.0-13732-gc5347beead0b-dirty #784
Hardware name: QEMU ppce500 e5500 0x80240020 QEMU e500
NIP:  c0000000002951a0 LR: c0000000002951bc CTR: 0000000000000000
REGS: c0000000032e7440 TRAP: 0700   Not tainted 
(6.8.0-13732-gc5347beead0b-dirty)
MSR:  0000000080029002 <CE,EE,ME>  CR: 24044248  XER: 00000000
IRQMASK: 0
GPR00: c000000000029d90 c0000000032e76e0 c000000000d44000 c000000003017e18
GPR04: 00000000ffb11000 c000000007f16888 0000000fc324123d 0000000000000000
GPR08: 0000000000000000 0000000000000001 c000000001184000 0000000084004248
GPR12: 00000000000000c0 c0000000011b9000 c000000007f16888 c000000007f19000
GPR16: 0000000000001000 00003ffffffff000 0000000000000000 0000000000000000
GPR20: 0000400000000000 0000000000000000 0000000000000001 ffffc000ffb12000
GPR24: c000000007f19000 c000000006008000 c000000006008000 0000000000000030
GPR28: 0000000000000001 c00000000118afe8 c000000003017e18 0000000000000001
NIP [c0000000002951a0] __page_table_check_ptes_set+0x210/0x2ac
LR [c0000000002951bc] __page_table_check_ptes_set+0x22c/0x2ac
Call Trace:
[c0000000032e76e0] [c0000000032e7790] 0xc0000000032e7790 (unreliable)
[c0000000032e7730] [c000000000029d90] set_ptes+0x178/0x210
[c0000000032e7790] [c00000000024c72c] move_page_tables+0x298/0x750
[c0000000032e7870] [c0000000002a944c] shift_arg_pages+0x120/0x254
[c0000000032e79a0] [c0000000002a9f94] setup_arg_pages+0x244/0x418
[c0000000032e7b30] [c000000000331610] load_elf_binary+0x584/0x17d4
[c0000000032e7c30] [c0000000002aa3e8] bprm_execve+0x280/0x704
[c0000000032e7d00] [c0000000002ac158] kernel_execve+0x16c/0x214
[c0000000032e7d50] [c0000000000011c8] run_init_process+0x100/0x168
[c0000000032e7de0] [c00000000000214c] kernel_init+0x84/0x1f8
[c0000000032e7e50] [c000000000000594] ret_from_kernel_user_thread+0x14/0x1c
--- interrupt: 0 at 0x0
Code: 81230004 7d2907b4 0b090000 7c0004ac 7d201828 31290001 7d20192d 
40c2fff4 7c0004ac 2c090002 39200000 7d29e01e <0b090000> e93d0000 
37ffffff 7fde4a14
---[ end trace 0000000000000000 ]---

note: init[1] exited with irqs disabled
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000005
Rebooting in 180 seconds..

  parent reply	other threads:[~2024-03-28  6:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28  4:55 Rohan McLure
2024-03-28  4:55 ` [PATCH v11 01/11] Revert "mm/page_table_check: remove unused parameter in [__]page_table_check_pud_set" Rohan McLure
2024-03-28  4:55 ` [PATCH v11 02/11] Revert "mm/page_table_check: remove unused parameter in [__]page_table_check_pmd_set" Rohan McLure
2024-03-28  4:55 ` [PATCH v11 04/11] Revert "mm/page_table_check: remove unused parameter in [__]page_table_check_pud_clear" Rohan McLure
2024-03-28  4:55 ` [PATCH v11 05/11] Revert "mm/page_table_check: remove unused parameter in [__]page_table_check_pmd_clear" Rohan McLure
2024-03-28  4:55 ` [PATCH v11 06/11] Revert "mm/page_table_check: remove unused parameter in [__]page_table_check_pte_clear" Rohan McLure
2024-03-28  4:55 ` [PATCH v11 07/11] mm: Provide address parameter to p{te,md,ud}_user_accessible_page() Rohan McLure
2024-03-28  4:55 ` [PATCH v11 11/11] powerpc: mm: Support page table check Rohan McLure
     [not found] ` <20240328045535.194800-11-rmclure@linux.ibm.com>
2024-03-28  5:33   ` [PATCH v11 08/11] powerpc: mm: Add pud_pfn() stub Christophe Leroy
     [not found] ` <20240328045535.194800-12-rmclure@linux.ibm.com>
2024-03-28  5:40   ` [PATCH v11 09/11] poweprc: mm: Implement *_user_accessible_page() for ptes Christophe Leroy
2024-03-28  5:44     ` Rohan McLure
2024-03-28  6:52 ` Christophe Leroy [this message]
2024-03-28  7:57   ` [PATCH v11 00/11] Support page table check PowerPC Christophe Leroy
2024-03-29  8:29     ` Christophe Leroy
2024-03-28  9:28 ` Ingo Molnar
2024-04-02  3:00   ` Rohan McLure

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5009c511-ec85-4d05-a106-8fca9189dd5d@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=rmclure@linux.ibm.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox