Bug 1275809 - Problem with jprobes
Summary: Problem with jprobes
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-27 19:41 UTC by kkuehl
Modified: 2015-10-27 19:49 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-27 19:49:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Example jprobe KM (164 bytes, text/plain)
2015-10-27 19:41 UTC, kkuehl
no flags Details
jprobe example (4.80 KB, text/x-csrc)
2015-10-27 19:42 UTC, kkuehl
no flags Details

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.


Note You need to log in before you can comment on or make changes to this bug.