kernel-module

Android 10: Update kernel modules

最后都变了- 提交于 2020-08-09 08:53:12
问题 This bounty has ended . Answers to this question are eligible for a +50 reputation bounty. Bounty grace period ends in 12 hours . onetyone wants to draw more attention to this question. Background: I am working with a Pixel 4, build QQ2A.200501.001.B2 , which is Android 10. When I build the kernel from the official sources and flash it, the touchscreen, wlan and other features do not work. I tracked this down to the fact that the kernel modules in /vendor/lib/modules do not get updated, thus

kernel output weird dmesg of my driver module

北战南征 提交于 2020-06-23 14:48:28
问题 from my previsou question Why does module failed to load? (/dev/scull0 : no such device or address) I managed to load the module via /sbin/insmod , but after that, I have log out the dmesg: [ 2765.707018] scull: loading out-of-tree module taints kernel. [ 2765.707106] scull: module verification failed: signature and/or required key missing - tainting kernel [ 2765.707929] Passed scull_init_module at 41 (debug info - successful load of init module) [ 6027.843914] acer_wmi: Unknown function

How to build external modules in ubuntu?

馋奶兔 提交于 2020-06-09 05:27:10
问题 I am trying to build a scull device, and have build a .ko file without problem. But when insmod ed, then cat of /var/log/kern.log : May 14 00:33:06 XLM kernel: [ 4251.407594] scull: loading out-of-tree module taints kernel. May 14 00:33:06 XLM kernel: [ 4251.407680] scull: module verification failed: signature and/or required key missing - tainting kernel So therefor this error occured bash: /dev/scull: No such device or address (because I have tried to write to /dev/scull0 after mknod /dev

How to build external modules in ubuntu?

前提是你 提交于 2020-06-09 05:27:07
问题 I am trying to build a scull device, and have build a .ko file without problem. But when insmod ed, then cat of /var/log/kern.log : May 14 00:33:06 XLM kernel: [ 4251.407594] scull: loading out-of-tree module taints kernel. May 14 00:33:06 XLM kernel: [ 4251.407680] scull: module verification failed: signature and/or required key missing - tainting kernel So therefor this error occured bash: /dev/scull: No such device or address (because I have tried to write to /dev/scull0 after mknod /dev

Why does module failed to load? (/dev/scull0 : no such device or address)

99封情书 提交于 2020-06-08 19:50:25
问题 From my previous question: How to build external modules in ubuntu? I thought I cannot load module due to loading out-of-tree or tainting kernel , but to my scull_init_module (source below) I have added printk so I know I get loaded from kern log. But I did not (no output in the log -- the log is the same as from the link). uname -a == 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2 (2020-04-29) x86_64 GNU/Linux (no use of ubuntu - as from the link). scull_init_module : #ifndef scull_major #define

after using rmmod program freezes

徘徊边缘 提交于 2020-05-17 07:44:05
问题 I have some problem with my code. In my code i solve the reader writers problem using RCU, when i load the module (insmod) everything works ok, and it works as i expected, but when i unload module (rmmod) my program freezes and I have to restart Ubuntu. In this program i have to use call_rcu() to delete previous version of the shared resource and i think that problem is here, because if i have not if I do not use this function and simply delete via kmalloc () then the program works as it

Get canonical path from pathname

萝らか妹 提交于 2020-05-13 07:01:34
问题 I am writing a kernel module that hijacks several system calls. Several of the system calls take paths as parameters. For my purposes, I need to work with full paths, but since these parameters are passed as strings, it could be anything like "documents" , "/home/main/../bob" , or "../lib" . I need to get the real paths of these references, but I don't know which function to use or which information I need (e.g., the current working directory, etc.). The kernel obviously has some way of

Get canonical path from pathname

拥有回忆 提交于 2020-05-13 07:00:06
问题 I am writing a kernel module that hijacks several system calls. Several of the system calls take paths as parameters. For my purposes, I need to work with full paths, but since these parameters are passed as strings, it could be anything like "documents" , "/home/main/../bob" , or "../lib" . I need to get the real paths of these references, but I don't know which function to use or which information I need (e.g., the current working directory, etc.). The kernel obviously has some way of

unable to open / read text file from kernel module on linux kernel version 4.2.3

别说谁变了你拦得住时间么 提交于 2020-03-01 17:19:44
问题 I have written a kernel module which I'm loading on kernel 4.2.3 . I am trying to read a simple text file in my init_module which basically loads some configuration data by reading the contents of the text file. This same code works on previous versions of kernel but not on 4.2.3 Below is my code snippet for reference : struct file* pFile = NULL; pFile = filp_open(fileName, mode, 0); if(pFile != NULL){ if(IS_ERR(pFile)) { printk("<1>error %p for %s**\n", pFile, fileName); pFile = NULL; } else