Revision tags: v6.6.25, v6.6.24, v6.6.23, v6.6.16, v6.6.15, v6.6.14, v6.6.13, v6.6.12, v6.6.11, v6.6.10, v6.6.9, v6.6.8, v6.6.7, v6.6.6, v6.6.5, v6.6.4, v6.6.3, v6.6.2, v6.5.11, v6.6.1, v6.5.10, v6.6, v6.5.9, v6.5.8, v6.5.7, v6.5.6, v6.5.5, v6.5.4, v6.5.3 |
|
#
9d1be94d |
| 07-Sep-2023 |
Alexey Dobriyan <adobriyan@gmail.com> |
selftests/proc: fixup proc-empty-vm test after KSM changes
/proc/${pid}/smaps_rollup is not empty file even if process's address space is empty, update the test.
Link: https://lkml.kernel.org/r/725
selftests/proc: fixup proc-empty-vm test after KSM changes
/proc/${pid}/smaps_rollup is not empty file even if process's address space is empty, update the test.
Link: https://lkml.kernel.org/r/725e041f-e9df-4f3d-b267-d4cd2774a78d@p183 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: David Hildenbrand <david@redhat.com> Cc: Stefan Roesch <shr@devkernel.io> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
show more ...
|
Revision tags: v6.5.2, v6.1.51, v6.5.1, v6.1.50, v6.5, v6.1.49, v6.1.48, v6.1.46 |
|
#
daa60ae6 |
| 14-Aug-2023 |
Hugh Dickins <hughd@google.com> |
mm,thp: fix smaps THPeligible output alignment
Extract from current /proc/self/smaps output:
Swap: 0 kB SwapPss: 0 kB Locked: 0 kB THPeligible: 0 Pr
mm,thp: fix smaps THPeligible output alignment
Extract from current /proc/self/smaps output:
Swap: 0 kB SwapPss: 0 kB Locked: 0 kB THPeligible: 0 ProtectionKey: 0
That's not the alignment shown in Documentation/filesystems/proc.rst: it's an ugly artifact from missing out the %8 other fields are using; but there's even one selftest which expects it to look that way. Hoping no other smaps parsers depend on THPeligible to look so ugly, fix these.
Link: https://lkml.kernel.org/r/cfb81f7a-f448-5bc2-b0e1-8136fcd1dd8c@google.com Signed-off-by: Hugh Dickins <hughd@google.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
show more ...
|
Revision tags: v6.1.45, v6.1.44, v6.1.43, v6.1.42, v6.1.41, v6.1.40, v6.1.39, v6.1.38, v6.1.37 |
|
#
f58a2dd8 |
| 30-Jun-2023 |
Alexey Dobriyan <adobriyan@gmail.com> |
proc: skip proc-empty-vm on anything but amd64 and i386
This test is arch specific, requires "munmap everything" primitive.
Link: https://lkml.kernel.org/r/20230630183434.17434-2-adobriyan@gmail.co
proc: skip proc-empty-vm on anything but amd64 and i386
This test is arch specific, requires "munmap everything" primitive.
Link: https://lkml.kernel.org/r/20230630183434.17434-2-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Björn Töpel <bjorn@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
show more ...
|
#
4356b11e |
| 30-Jun-2023 |
Alexey Dobriyan <adobriyan@gmail.com> |
proc: support proc-empty-vm test on i386
Unmap everything starting from 4GB length until it unmaps, otherwise test has to detect which virtual memory split kernel is using.
Link: https://lkml.kerne
proc: support proc-empty-vm test on i386
Unmap everything starting from 4GB length until it unmaps, otherwise test has to detect which virtual memory split kernel is using.
Link: https://lkml.kernel.org/r/20230630183434.17434-1-adobriyan@gmail.com Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Björn Töpel <bjorn@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
show more ...
|
Revision tags: v6.1.36, v6.4, v6.1.35, v6.1.34, v6.1.33, v6.1.32, v6.1.31, v6.1.30, v6.1.29, v6.1.28, v6.1.27, v6.1.26, v6.3, v6.1.25, v6.1.24, v6.1.23, v6.1.22, v6.1.21, v6.1.20, v6.1.19, v6.1.18, v6.1.17, v6.1.16, v6.1.15, v6.1.14, v6.1.13, v6.2, v6.1.12, v6.1.11, v6.1.10, v6.1.9, v6.1.8, v6.1.7, v6.1.6, v6.1.5, v6.0.19, v6.0.18, v6.1.4 |
|
#
5316a017 |
| 06-Jan-2023 |
Alexey Dobriyan <adobriyan@gmail.com> |
proc: fix PIE proc-empty-vm, proc-pid-vm tests
vsyscall detection code uses direct call to the beginning of the vsyscall page:
asm ("call %P0" :: "i" (0xffffffffff600000))
It generates "call rel3
proc: fix PIE proc-empty-vm, proc-pid-vm tests
vsyscall detection code uses direct call to the beginning of the vsyscall page:
asm ("call %P0" :: "i" (0xffffffffff600000))
It generates "call rel32" instruction but it is not relocated if binary is PIE, so binary segfaults into random userspace address and vsyscall page status is detected incorrectly.
Do more direct:
asm ("call *%rax")
which doesn't do need any relocaltions.
Mark g_vsyscall as volatile for a good measure, I didn't find instruction setting it to 0. Now the code is obviously correct:
xor eax, eax mov rdi, rbp mov rsi, rbp mov DWORD PTR [rip+0x2d15], eax # g_vsyscall = 0 mov rax, 0xffffffffff600000 call rax mov DWORD PTR [rip+0x2d02], 1 # g_vsyscall = 1 mov eax, DWORD PTR ds:0xffffffffff600000 mov DWORD PTR [rip+0x2cf1], 2 # g_vsyscall = 2 mov edi, [rip+0x2ceb] # exit(g_vsyscall) call exit
Note: fixed proc-empty-vm test oopses 5.19.0-28-generic kernel but this is separate story.
Link: https://lkml.kernel.org/r/Y7h2xvzKLg36DSq8@p183 Fixes: 5bc73bb3451b9 ("proc: test how it holds up with mapping'less process") Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Reported-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr> Tested-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
show more ...
|
Revision tags: v6.1.3, v6.0.17, v6.1.2, v6.0.16, v6.1.1, v6.0.15, v6.0.14, v6.0.13, v6.1, v6.0.12, v6.0.11, v6.0.10, v5.15.80, v6.0.9, v5.15.79, v6.0.8, v5.15.78, v6.0.7, v5.15.77, v5.15.76, v6.0.6, v6.0.5, v5.15.75, v6.0.4, v6.0.3, v6.0.2, v5.15.74, v5.15.73, v6.0.1 |
|
#
5bc73bb3 |
| 05-Oct-2022 |
Alexey Dobriyan <adobriyan@gmail.com> |
proc: test how it holds up with mapping'less process
Create process without mappings and check
/proc/*/maps /proc/*/numa_maps /proc/*/smaps /proc/*/smaps_rollup
They must be empty (excluding v
proc: test how it holds up with mapping'less process
Create process without mappings and check
/proc/*/maps /proc/*/numa_maps /proc/*/smaps /proc/*/smaps_rollup
They must be empty (excluding vsyscall page) or full of zeroes.
Retroactively this test should've caught embarassing /proc/*/smaps_rollup oops:
[17752.703567] BUG: kernel NULL pointer dereference, address: 0000000000000000 [17752.703580] #PF: supervisor read access in kernel mode [17752.703583] #PF: error_code(0x0000) - not-present page [17752.703587] PGD 0 P4D 0 [17752.703593] Oops: 0000 [#1] PREEMPT SMP PTI [17752.703598] CPU: 0 PID: 60649 Comm: cat Tainted: G W 5.19.9-100.fc35.x86_64 #1 [17752.703603] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./X99 Extreme6/3.1, BIOS P3.30 08/05/2016 [17752.703607] RIP: 0010:show_smaps_rollup+0x159/0x2e0
Note 1: ProtectionKey field in /proc/*/smaps is optional, so check most of its contents, not everything.
Note 2: due to the nature of this test, child process hardly can signal its readiness (after unmapping everything!) to parent. I feel like "sleep(1)" is justified. If you know how to do it without sleep please tell me.
Note 3: /proc/*/statm is not tested but can be.
Link: https://lkml.kernel.org/r/Yz3liL6Dn+n2SD8Q@localhost.localdomain Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
show more ...
|