https://bugzilla.kernel.org/show_bug.cgi?id=208181
Erhard F. (erhard_f@mailbox.org) changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #289659|0 |1
is obsolete| |
--- Comment #2 from Erhard F. (erhard_f@mailbox.org) ---
https://bugzilla.kernel.org/show_bug.cgi?id=208181
Erhard F. (erhard_f@mailbox.org) changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #289661|0 |1
is obsolete| |
--- Comment #3 from Erhard F. (erhard_f@mailbox.org) ---
--- Comment #5 from Christophe Leroy (christophe.leroy@csgroup.eu) ---
Can we get a dump of /sys/kernel/debug/powerpc/block_address_translation
--
You are receiving this mail because:
You are watching the assignee of the bug.
--- Comment #8 from Christophe Leroy (christophe.leroy@csgroup.eu) ---
block_address_translation contains funny sizes. But the adresses seems ok.
So it shows you have a 24 Mb text+rodata area. 8 BATs are used
(16+8+8+32+64+128+256+256)
By increasing CONFIG_DATA_SHIFT to 25, you'll get a 32Mb alignment
So you will have only 6 bats used (32+32+64+128+256+256), so two additional
data BATs will be available for KASAN.
But regardless of the BAT stuff, KASAN should work properly.
--
You are receiving this mail because:
You are watching the assignee of the bug.
--- Comment #9 from Erhard F. (erhard_f@mailbox.org) ---
Ok, thanks for the clarification! So if KASAN works properly something else
must cause this hit. I will start a bisect the next few days and see how that
turns out...
--
You are receiving this mail because:
You are watching the assignee of the bug.
--- Comment #11 from Christophe Leroy (christophe.leroy@csgroup.eu) ---
The issue is that that commit moved more code than described into kasan_init():
Kasan Pages allocation have to be moved into kasan_init() but page tables
allocation must remain before the switch to the final hash table.
Problem only occurs on book3s/32 having hash MMU.
See proposed fix at
https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=187165 (2
patches).
--
You are receiving this mail because:
You are watching the assignee of the bug.
--- Comment #12 from Erhard F. (erhard_f@mailbox.org) ---
Successfully applied your 2 patches. The kernel still complains about these 2
BATs, but the KASAN hit at early boot is gone with the patches. Thanks!
--
You are receiving this mail because:
You are watching the assignee of the bug.
--- Comment #13 from Christophe Leroy (christophe.leroy@csgroup.eu) ---
Thanks for testing.
Regarding the two BATs, I suggest you increase CONFIG_DATA_SHIFT as explained
in a previous comment.
--
You are receiving this mail because:
You are watching the assignee of the bug.
--- Comment #14 from Erhard F. (erhard_f@mailbox.org) ---
Ah, I've overlooked that...
To set CONFIG_DATA_SHIFT=25 I needed to set ADVANCED_OPTIONS=y,
DATA_SHIFT_BOOL=y first.
But with CONFIG_DATA_SHIFT=25 this kernel won't boot at all. OpenFirmware shows
for a brief moment that the kernel gets loaded and then I get dropped back to
OF console.
OpenFirmware tells me:
Invalid memory access at %SRR0: a0000000 %SRR1: 00000000
--
You are receiving this mail because:
You are watching the assignee of the bug.
--- Comment #15 from Christophe Leroy (christophe.leroy@csgroup.eu) ---
Ah yes, having init_text above the 24 bits limit might be a problem for
function calls. I'm surprised that the linker doesn't complain.
Anyway, it is not a problem in itself, and it's unrelated to this bug.
--
You are receiving this mail because:
You are watching the assignee of the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=208181
Erhard F. (erhard_f@mailbox.org) changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #289937|0 |1
is obsolete| |
--- Comment #16 from Erhard F. (erhard_f@mailbox.org) ---
Created attachment 290285
--> https://bugzilla.kernel.org/attachment.cgi?id=290285&action=edit
kernel .config (5.8-rc5, PowerMac G4 DP)
Did some additional test-runs, seems there are still problems with stack usage
when running (inline) KASAN:
5.8-rc3 + the 2 patches applied:
Instruction dump:
usercopy: Kernel memory overwrite attemp detected to kernel text (offset 5432,
size 4)!
------------[ cut here ]------------
kernel BUG at mm/usercopy.c:99!
Oops: Exeption in kernel mode, sig:5 [#6]
BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac
Modules linked in: auth_rpcgss nfsv4 dns_resolver nfs lockd grace sunrpc
b43legacy input_leds joydev mac80211 hid_generic g4_windtunnel sungem
sungem_phy btrfs ohci_pci xor lzo_compress lzo_decompress zlib_deflate raid6_pq
zlib_inflate firewire_ohci hcd soundcore ssb pcmcia usbcore uninorth_agp
pcmcia_core agpart usb_common
CPU: 1 PID: 5250 Comm: mount.nfs Tainted: G W
5.8.0-rc3-PowerMacG4+ #8
NIP: c04d654c LR: c04d654c CTR: 00000000
REGS: c0001198 TRAP: 0700 Tainted: G W (5.8.0-rc3-PowerMacG4+)
MSR: 00021031 <MR,IR,DR,RI> CR: 24028822 XER: 00000000
GPR00: c04d654c c0001498 e719b980 00000058 c01899f4 00000000 00000027 e8dc4e0c
GPR08: 00000023 00000000 00000000 c0001498 44028822 0061bff4 f80002s9 00000003
GPR16: c115a340 f80002d7 c00016b8 c00016c8 c04d654c c115a260 c04d651c f80002d5
GPR24: c00016ac 180002d5 e8dda024 c0000000 c000153c 00000000 00000004 c0001538
NIP [c04d654c] usercopy_abort+0x68/0x78
LR [c04d654c] usercopy_abort+0x68/0x78
Call Trace:
Instruction dump:
usercopy: Kernel memory overwrite attemp detected to kernel text (offset 4848,
size 4)!
------------[ cut here ]------------
kernel BUG at mm/usercopy.c:99!
Oops: Exeption in kernel mode, sig:5 [#7]
BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac
Modules linked in: auth_rpcgss nfsv4 dns_resolver nfs lockd grace sunrpc
b43legacy input_leds joydev mac80211 hid_generic g4_windtunnel sungem
sungem_phy btrfs ohci_pci xor lzo_compress lzo_decompress zlib_deflate raid6_pq
zlib_inflate firewire_ohci hcd soundcore ssb pcmcia usbcore uninorth_agp
pcmcia_core agpart usb_common
CPU: 1 PID: 5250 Comm: mount.nfs Tainted: G W
5.8.0-rc3-PowerMacG4+ #8
NIP: c04d654c LR: c04d654c CTR: 00000000
REGS: c0001198 TRAP: 0700 Tainted: G W (5.8.0-rc3-PowerMacG4+)
MSR: 00021031 <MR,IR,DR,RI> CR: 24028822 XER: 00000000
GPR00: c04d654c c0001250 e719b980 00000058 c01899f4 00000000 00000027 e8dc4e0c
GPR08: 00000023 00000000 00000000 c0001250 44028822 0061bff4 f8000290 00000003
GPR16: c115a340 f800028e c0001470 c0001480 c04d654c c115a260 c04d651c f800028c
GPR24: c0001464 1800028c e8dda024 c0000000 c00012f4 00000000 00000004 c00012f0
NIP [c04d654c] usercopy_abort+0x68/0x78
Unrecoverable FP Unavailable Exception 801 at 908
LR [c04d654c] usercopy_abort+0x68/0x78
Call Trace:
5.8-rc5 + the 2 patches applied:
do_IRQ: stack overflow: 1984
CPU: 1 PID: 347 Comm: gzip Tainted: G W 5.8.0-rc5-PowerMacG4+ #1
Call Trace:
--
You are receiving this mail because:
You are watching the assignee of the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=208181
Erhard F. (erhard_f@mailbox.org) changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |OBSOLETE
--- Comment #19 from Erhard F. (erhard_f@mailbox.org) ---
I noticed that I covered the "do_IRQ: stack overflow: ...." problem already in
bug #207129 so closing this one as suggested before.
--
You are receiving this mail because:
You are watching the assignee of the bug.