linux-kernel

usb Mass Storage driver for am335x

让人想犯罪 __ 提交于 2020-07-22 06:07:31
问题 i want to loard a usb drive storage module so i make when i load usb mass storage module the usb drive detect in /media or /dev/sda1 I have one customized bord using an am335x processor and this board has one USB port(for USB drive connector) and one micro USB port. and also have kernel source code and version is 4.4.16 now i follow the command to compile kernel source code make distclean CROSS_COMPILE=arm-linux-gnueabihf- make am335x_fujitel_defconfig CROSS_COMPILE=arm-linux-gnueabihf- note=

usb Mass Storage driver for am335x

你离开我真会死。 提交于 2020-07-22 06:06:30
问题 i want to loard a usb drive storage module so i make when i load usb mass storage module the usb drive detect in /media or /dev/sda1 I have one customized bord using an am335x processor and this board has one USB port(for USB drive connector) and one micro USB port. and also have kernel source code and version is 4.4.16 now i follow the command to compile kernel source code make distclean CROSS_COMPILE=arm-linux-gnueabihf- make am335x_fujitel_defconfig CROSS_COMPILE=arm-linux-gnueabihf- note=

Netlink: sending from kernel to user - EAGAIN and ENOBUFS

我的未来我决定 提交于 2020-07-21 10:26:48
问题 I'm having a lot of trouble sending netlink messages from kernel module to userspace-daemon. They randomly fail. On the kernel side, the genlmsg_unicast fails with EAGAIN while on the user-side, nl_recvmsgs_default (function from libnl ) fails with NLE_NOMEM which is caused by recvmsg syscall failing with ENOBUFS . Netlink messages are small, maximum payload size is ~300B. Here is the code for sending message from kernel: int send_to_daemon(void* msg, int len, int command, int seq, u32 pid) {

Netlink: sending from kernel to user - EAGAIN and ENOBUFS

﹥>﹥吖頭↗ 提交于 2020-07-21 10:22:46
问题 I'm having a lot of trouble sending netlink messages from kernel module to userspace-daemon. They randomly fail. On the kernel side, the genlmsg_unicast fails with EAGAIN while on the user-side, nl_recvmsgs_default (function from libnl ) fails with NLE_NOMEM which is caused by recvmsg syscall failing with ENOBUFS . Netlink messages are small, maximum payload size is ~300B. Here is the code for sending message from kernel: int send_to_daemon(void* msg, int len, int command, int seq, u32 pid) {

Changing /proc/sys/kernel/core_pattern file inside docker container

独自空忆成欢 提交于 2020-07-20 10:27:54
问题 How can i change /proc/sys/kernel/core_pattern file inside the docker container with out privileged mode? Are there any flags to be passed to docker daemon or docker run or anything related to Dockerfile ? 回答1: The kernel does not support per-container patterns. There is a patch for this, but it is unlikely to go in any time soon. The basic problem is that core patterns support piping to a dedicated process which is spawned for this purpose. But the code spawning it does not know how to

Editing Kernel command-line arguments inside Kernel

那年仲夏 提交于 2020-07-15 06:18:19
问题 U-boot passes kernel command-line parameters. In my requirement I want to edit these parameters in the kernel source tree and don't want to change U-boot code. I am using 2.6.35 kernel. So please guide me which part of the kernel source I have to check for this. 回答1: Follow this procedure: Enter the kernel config by typing make menuconfig Enter the menu Processor type and features Enable Built-in kernel command line Specify your command line by clicking on Built-in kernel command string

Editing Kernel command-line arguments inside Kernel

懵懂的女人 提交于 2020-07-15 06:18:13
问题 U-boot passes kernel command-line parameters. In my requirement I want to edit these parameters in the kernel source tree and don't want to change U-boot code. I am using 2.6.35 kernel. So please guide me which part of the kernel source I have to check for this. 回答1: Follow this procedure: Enter the kernel config by typing make menuconfig Enter the menu Processor type and features Enable Built-in kernel command line Specify your command line by clicking on Built-in kernel command string

Editing Kernel command-line arguments inside Kernel

烂漫一生 提交于 2020-07-15 06:18:07
问题 U-boot passes kernel command-line parameters. In my requirement I want to edit these parameters in the kernel source tree and don't want to change U-boot code. I am using 2.6.35 kernel. So please guide me which part of the kernel source I have to check for this. 回答1: Follow this procedure: Enter the kernel config by typing make menuconfig Enter the menu Processor type and features Enable Built-in kernel command line Specify your command line by clicking on Built-in kernel command string

How does the Linux kernel compile debuginfo and debuginfo-common packages in kernel-ml-4.19.1-1.el7.elrepo.x86_64

寵の児 提交于 2020-07-10 10:24:52
问题 The production host has been restarted frequently recently, kdump has been started, vmcore has been obtained, and the root cause is ready to be analyzed by crash, but the debuginfo and debuginfo-common packages of the same kernel version should be installed. But I did not find this version debuginfo package from http://debuginfo.centos.org/7/x86_64/ How to compile the debuginfo and debuginfo-common packages of the Linux kernel? Need to compile the kernel: kernel-ml-4.19.1-1.el7.elrepo.x86_64

Code (.text) not execute-only? .rodata is executable?

夙愿已清 提交于 2020-07-08 07:12:16
问题 I am trying to understand how ELF segments are memory mapped. I noticed that various sections are mapped to the same ELF segment. For example, .rodata is mapped to the same segment as .text. Why is this the case? Why not map .rodata to a separate read-only and not executable segment? Also, what does it entail to map the .text section to an "execute ONLY" segment (not readable)? Are there any kernel/HW limitations that may hinder this? EDIT: I may as well add that I am using the GNU linker, if