Bug 1531182

Summary: Out-of-tree kernel modules fail to build on aarch64
Product: [Fedora] Fedora Reporter: William Cohen <wcohen>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: airlied, ajax, bskeggs, ewk, hdegoede, ichavero, itamar, jarodwilson, jglisse, john.j5live, jonathan, josef, kernel-maint, labbott, linville, mchehab, mjg59, steved, wcohen
Target Milestone: ---   
Target Release: ---   
Hardware: aarch64   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-4.14.13-300.fc27 kernel-4.14.13-200.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1569014 (view as bug list) Environment:
Last Closed: 2018-01-12 14:43:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1569014, 1572553    

Description William Cohen 2018-01-04 19:01:01 UTC
Description of problem:

The kernel-devel is missing ./arch/arm64/kernel/module.lds and anything that that attempts to build a kernel module will fail with:

ld: cannot open linker script file ./arch/arm64/kernel/module.lds: No such filey
make[4]: *** [scripts/Makefile.modpost:129: /tmp/stapYqdiNY/stap_e99ec35f6fd8a51
make[3]: *** [Makefile:1515: modules] Error 2                                   
WARNING: kbuild exited with status: 2                    


Version-Release number of selected component (if applicable):

kernel-devel-4.14.11-300.fc27.aarch64


How reproducible:

Every time


Steps to Reproduce as root:
1.  dnf install "systemtap*" kernel-devel
2.  stap -e 'probe begin {printf("hello\n"); exit()}'

Actual results:

ld: cannot open linker script file ./arch/arm64/kernel/module.lds: No such file or directory
make[1]: *** [scripts/Makefile.modpost:129: /tmp/stapdjV8Fy/stap_7336d901e3099a6abf2bd41dcaf0d0c3_991.ko] Error 1
make: *** [Makefile:1515: modules] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed.  [man error::pass4]

Expected results:

hello

Additional info:

Copying a module.lds in /usr/src/kernel/`uname -r`/arch/arm64/kernel/modules.lds allows systemtap to build and run the resulting module.

Comment 1 Laura Abbott 2018-01-05 16:10:41 UTC
Can you test this scratch build? It copies the module linker script over to kernel-devel https://koji.fedoraproject.org/koji/taskinfo?taskID=24002514

Comment 2 William Cohen 2018-01-05 18:23:51 UTC
The scratch RPMs fix the problem:

[root@apm-mustang-ev3-03 ~]# uname -a
Linux apm-mustang-ev3-03.lab.eng.rdu.redhat.com 4.14.11-301.fc27.aarch64 #1 SMP Fri Jan 5 00:11:51 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux
[root@apm-mustang-ev3-03 ~]# stap -e 'probe begin {printf("hello\n"); exit()}'
hello

Comment 3 Laura Abbott 2018-01-05 19:22:36 UTC
I committed the patch to all branches. The bug will get updated when it gets picked up into a build (probably quickly since we're getting KPTI stable updates frequently)

Comment 4 Fedora Update System 2018-01-11 12:54:44 UTC
kernel-4.14.13-300.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-21a7ad920c

Comment 5 Fedora Update System 2018-01-11 12:57:39 UTC
kernel-4.14.13-200.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e6fe35524d

Comment 6 Fedora Update System 2018-01-11 23:09:10 UTC
kernel-4.14.13-300.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-21a7ad920c

Comment 7 Fedora Update System 2018-01-11 23:43:12 UTC
kernel-4.14.13-200.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-e6fe35524d

Comment 8 Fedora Update System 2018-01-12 14:43:03 UTC
kernel-4.14.13-300.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2018-01-13 23:05:25 UTC
kernel-4.14.13-200.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.