Bug 1218841 - kernel 6.7 causes 32bit processes' mmap to fail
Summary: kernel 6.7 causes 32bit processes' mmap to fail
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Jiri Slaby
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-16 11:31 UTC by Jiri Slaby
Modified: 2024-01-19 06:59 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.