Bug 1275809

Summary: Problem with jprobes
Product: [Fedora] Fedora Reporter: kkuehl
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda, mchehab
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-27 19:49:13 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:
Attachments:
Description Flags
Example jprobe KM
none
jprobe example none

Description kkuehl 2015-10-27 19:41:07 UTC
Created attachment 1086987 [details]
Example jprobe KM

Description of problem:

Unable to insert kernel module with jprobes with latest kernel.





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


How reproducible:


Steps to Reproduce:
1. make
2. insmod jprobe_example.ko
3. Observe error with dmesg

Actual results:
[root@lkmtest tests]# uname -a
Linux lkmtest 4.2.3-200.fc22.x86_64 #1 SMP Thu Oct 8 03:23:55 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@lkmtest tests]# make
make -C /lib/modules/4.2.3-200.fc22.x86_64/build M=/root/occultus/LINUX/tests modules
make[1]: Entering directory '/usr/src/kernels/4.2.3-200.fc22.x86_64'
  Building modules, stage 2.
  MODPOST 1 modules
make[1]: Leaving directory '/usr/src/kernels/4.2.3-200.fc22.x86_64'
[root@lkmtest tests]# insmod jprobe_example.ko 
insmod: ERROR: could not insert module jprobe_example.ko: Operation not permitted


snippet from dmesg:
[   31.138538] jprobe_example: module verification failed: signature and/or required key missing - tainting kernel
[   31.153113] register_jprobes failed, returned -2



Expected results:


[root@lkmtest tests]# uname -a
Linux lkmtest 4.1.10-200.fc22.x86_64 #1 SMP Mon Oct 5 14:22:49 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
make -C /lib/modules/4.1.10-200.fc22.x86_64/build M=/root/occultus/LINUX/tests modules
make[1]: Entering directory '/usr/src/kernels/4.1.10-200.fc22.x86_64'
  Building modules, stage 2.
  MODPOST 1 modules
make[1]: Leaving directory '/usr/src/kernels/4.1.10-200.fc22.x86_64'
[root@lkmtest tests]# insmod jprobe_example.ko 

Everything works fine.

Additional info:

I checked the kernel configuration against: https://www.kernel.org/doc/Documentation/kprobes.txt

[root@lkmtest tests]# uname -a
Linux lkmtest 4.2.3-200.fc22.x86_64 #1 SMP Thu Oct 8 03:23:55 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@lkmtest tests]# grep CONFIG_MODULES /boot/config-$(uname -r)
CONFIG_MODULES_USE_ELF_RELA=y
CONFIG_MODULES=y
CONFIG_MODULES_TREE_LOOKUP=y
[root@lkmtest tests]# grep CONFIG_KALLSYMS /boot/config-$(uname -r)
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
[root@lkmtest tests]# grep CONFIG_KPROBES /boot/config-$(uname -r)
CONFIG_KPROBES=y
CONFIG_KPROBES_ON_FTRACE=y
# CONFIG_KPROBES_SANITY_TEST is not set

Comment 1 kkuehl 2015-10-27 19:42:44 UTC
Created attachment 1086988 [details]
jprobe example

Comment 2 kkuehl 2015-10-27 19:49:13 UTC
Nevermind, function argument changes. Bug on my end. Feel free to close.