Bug 1218841

Summary: kernel 6.7 causes 32bit processes' mmap to fail
Product: [openSUSE] openSUSE Tumbleweed Reporter: Jiri Slaby <jslaby>
Component: KernelAssignee: Jiri Slaby <jslaby>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Jiri Slaby 2024-01-16 11:31:05 UTC
This results in MozillaFirefox and kernel-default/pae/... build failure on i586 (we use x86_64 kernel for building).

In the latter, pahole fails with for example like:
[  188s] ../scripts/link-vmlinux.sh: line 111: 16935 Segmentation fault      LLVM_OBJCOPY="${OBJCOPY}" ${PAHOLE} -J ${PAHOLE_FLAGS} ${1}

strace says:
1223  mmap2(NULL, 5783552, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 <unfinished ...>
...
1223  <... mmap2 resumed>)              = -1 ENOMEM (Cannot allocate memory)
Comment 1 Jiri Slaby 2024-01-16 11:44:14 UTC
bisected to:
commit efa7df3e3bb5da8e6abbe37727417f32a37fba47
Author: Rik van Riel <riel@surriel.com>
Date:   Thu Dec 14 14:34:23 2023 -0800

    mm: align larger anonymous mappings on THP boundaries

Reverting that on the top of 6.7 fixes the issue.
Comment 2 Jiri Slaby 2024-01-16 11:58:37 UTC
Reported upstream:
https://lore.kernel.org/all/d0a136a0-4a31-46bc-adf4-2db109a61672@kernel.org/
Comment 3 Jiri Slaby 2024-01-17 08:29:44 UTC
Reverted in master+stable for now.
Comment 4 Jiri Slaby 2024-01-19 06:59:50 UTC
Fix available:
https://lore.kernel.org/all/20240118180505.2914778-1-shy828301@gmail.com/

Pushed to master+stable.