Quantcast
Channel: Active questions tagged kernel-modules - Unix & Linux Stack Exchange
Viewing all 1181 articles
Browse latest View live

Scaling issues of i7 3520M with intel_pstate module on Kernel 3.10.0

$
0
0

Few days ago I updated my openSUSE 12.3 system from Kernel 3.9.8-1.gf3348a8-desktop to 3.10.0-1.g3dcd746-desktop and since then, turbo mode of my i7 3520M is enabled by default and it does not throttle down when idle. It is constantly running at 3.6GHz.

The intel_pstate module is enabled by default, thus any userspace settings are ignored (as intended). Tools such as cpufreq or cpupower are not installed any more on my machine.

Booting the 3.9.8 Kernel still shows its old behaviour, that the CPU is throttling as expected.In addition, adding intel_pstate=disable to the kernel command line deactivates the intel_pstate module resulting in the desired behaviour of a throttling CPU.

Another point of minor interest is, that I'm not able to trigger the turbo mode of my CPU if it is throttling (i.e. Kernel 3.9.8 or disabled intel_pstate).

Any help is appreciated.


5.4.42 kernel DSA networking kernel crash

$
0
0

On OpenWRT 5.4.42 kernel on an imx6, I'm seeing a kernel crash whenloading builtin modules of igb driver and mv88e6xxx driver over PCIbus. I've searched for the messages in the kernel code and Google butits all over the place. What does this backtrace mean?

[    2.631594][   T28] CPU: 2 PID: 28 Comm: kworker/u8:1 Not tainted5.4.42 #0[    2.631599][   T28] Hardware name: Freescale i.MX6 Quad/DualLite(Device Tree) 2.670498][   T32] Workqueue: events_unbound async_run_entry_fn[    2.676560][   T32] [<80016424>] (unwind_backtrace) from[<80012a84>] (show_stack+0x10/0x14)[    2.685057][   T32] [<80012a84>] (show_stack) from [<8053cb30>](dump_stack+0x90/0xa4)[    2.693033][   T32] [<8053cb30>] (dump_stack) from [<800241fc>](__warn+0xbc/0xd8)[    2.700636][   T32] [<800241fc>] (__warn) from [<80024268>](warn_slowpath_fmt+0x50/0x94)[    2.708849][   T32] [<80024268>] (warn_slowpath_fmt) from[<8004331c>] (__request_module+0xac/0x37c)[    2.718020][   T32] [<8004331c>] (__request_module) from[<802eaeac>] (phy_request_driver_module+0x118/0x158)[    2.727967][   T32] [<802eaeac>] (phy_request_driver_module) from[<802ec4ac>] (phy_device_create+0x1e4/0x204)[    2.737997][   T32] [<802ec4ac>] (phy_device_create) from[<802ec628>] (get_phy_device+0x15c/0x1b0)[    2.747098][   T32] [<802ec628>] (get_phy_device) from [<803d7ab4>](of_mdiobus_register_phy+0x74/0x170)[    2.756615][   T32] [<803d7ab4>] (of_mdiobus_register_phy) from[<803d8040>] (of_mdiobus_register+0x120/0x32c)[    2.766665][   T32] [<803d8040>] (of_mdiobus_register) from[<802ef248>] (mv88e6xxx_mdio_register+0xdc/0x190)[    2.776617][   T32] [<802ef248>] (mv88e6xxx_mdio_register) from[<802f10ac>] (mv88e6xxx_probe+0x618/0x714)[    2.786305][   T32] [<802f10ac>] (mv88e6xxx_probe) from[<802edaf8>] (mdio_probe+0x30/0x54)[    2.794699][   T32] [<802edaf8>] (mdio_probe) from [<8027a034>](really_probe+0x1f0/0x364)[    2.802996][   T32] [<8027a034>] (really_probe) from [<8027a328>](driver_probe_device+0x60/0x170)[    2.811986][   T32] [<8027a328>] (driver_probe_device) from[<802785c0>] (bus_for_each_drv+0x70/0x94)[    2.821231][   T32] [<802785c0>] (bus_for_each_drv) from[<80279dd4>] (__device_attach+0xb4/0x11c)[    2.830218][   T32] [<80279dd4>] (__device_attach) from[<802791d8>] (bus_probe_device+0x84/0x8c)[    2.839117][   T32] [<802791d8>] (bus_probe_device) from[<802768d0>] (device_add+0x36c/0x614)[    2.847759][   T32] [<802768d0>] (device_add) from [<802edb9c>](mdio_device_register+0x24/0x48)[    2.856582][   T32] [<802edb9c>] (mdio_device_register) from[<803d81b4>] (of_mdiobus_register+0x294/0x32c)[    2.866367][   T32] [<803d81b4>] (of_mdiobus_register) from[<8032ccc8>] (igb_probe+0x1088/0x13cc)[    2.875385][   T32] [<8032ccc8>] (igb_probe) from [<8021f010>](pci_device_probe+0xd4/0x15c)[    2.883862][   T32] [<8021f010>] (pci_device_probe) from[<8027a034>] (really_probe+0x1f0/0x364)[    2.892676][   T32] [<8027a034>] (really_probe) from [<8027a328>](driver_probe_device+0x60/0x170)[    2.901663][   T32] [<8027a328>] (driver_probe_device) from[<802785c0>] (bus_for_each_drv+0x70/0x94)[    2.910910][   T32] [<802785c0>] (bus_for_each_drv) from[<80279dd4>] (__device_attach+0xb4/0x11c)[    2.919917][   T32] [<80279dd4>] (__device_attach) from[<80213bbc>] (pci_bus_add_device+0x44/0x90)[    2.928995][   T32] [<80213bbc>] (pci_bus_add_device) from[<80213c34>] (pci_bus_add_devices+0x2c/0x70)[    2.938420][   T32] [<80213c34>] (pci_bus_add_devices) from[<80213c68>] (pci_bus_add_devices+0x60/0x70)[    2.948007][   T32] ---[ end trace c8de08d4ca07a3ea ]---

with this device tree:

&pcie {        pinctrl-names = "default";        pinctrl-0 = <&pinctrl_pcie>;        reset-gpio =<&reset_ic 0 1>;        child-reset-gpios = <&reset_ic 3 1&reset_ic 2 1&reset_ic 1 1>;        #gpio-cells = <3>;        status = "okay";        fsl,max-link-speed = <2>;        /*         * PCI bridge: PLX Technology, Inc. PEX 8605 PCI Express4-port Gen2 Switch         * Port 0 to CPU, Port 1 to igb and ports 2 and 3 are accessible through         * the half and full size mini PCIe slots on the board.         */        pcie@1,0 {                /* Connection to CPU */                status = "okay";                fsl,max-link-speed = <2>;        };        pcie@2,1 {                /* Connection to Intel Gigabit Ethernet Controller*/                status = "okay";                fsl,max-link-speed = <1>;                pcie@3,0 {                        /* The igb */                        status = "okay";                        fsl,max-link-speed = <1>;                        eth0: igb0 {                                compatible = "intel,igb";                                /*pinctrl-names = "default";                                pinctrl-0 = <&pinctrl_enet>;*/                                phy-mode = "mii";                                phy-handle = <&eth0>;                                phy-reset-gpios = <&reset_ic 4 GPIO_ACTIVE_LOW>;                                phy-reset-duration = <100>;                                status = "okay";                                mdio {                                        #address-cells = <1>;                                        #size-cells = <0>;                                        status = "okay";                                        switch: switch@0 {                                                compatible ="marvell,mv88e6085";                                                reg = <0>;                                                dsa,member = <0 0>;                                                eeprom-length = <512>;                                                interrupt-parent = <&gpio2>;                                                interrupts =<31IRQ_TYPE_LEVEL_LOW>;                                                interrupt-controller;                                                #interrupt-cells = <2>;                                                ports {                                                        #address-cells = <1>;                                                        #size-cells = <0>;                                                        port@0 {                                                                reg = <0>;                                                                label = "port0";                                                                phy-handle = <&switchphy0>;                                                          };                                                        port@1 {                                                                reg = <1>;                                                                label = "port1";                                                                phy-handle = <&switchphy1>;                                                        };                                                        port@2 {                                                                reg = <2>;                                                                label = "port0";                                                                phy-handle = <&switchphy2>;                                                        };                                                        port@5 {                                                                reg = <5>;                                                                label = "cpu";                                                                ethernet = <&eth0>;                                                        };                                                };                                                mdio {                                                        #address-cells = <1>;                                                        #size-cells = <0>;                                                        switchphy0:switchphy@0 {                                                           reg = <0>;                                                           interrupt-parent = <&switch>;                                                           interrupts =<0 IRQ_TYPE_LEVEL_HIGH>;                                                        };                                                        switchphy1:switchphy@1 {                                                           reg = <1>;                                                           interrupt-parent = <&switch>;                                                           interrupts =<1 IRQ_TYPE_LEVEL_HIGH>;                                                        };                                                        switchphy2:switchphy@2 {                                                            reg = <2>;                                                            interrupt-parent = <&switch>;                                                            interrupts =<2 IRQ_TYPE_LEVEL_HIGH>;                                                        };                                                };                                        };                                };

Want to install VirtualBox Guest Additions on CentOS 7 but get a header mismatch

$
0
0

I try to install VirtualBox Guest Additions on a CentOS 7 VM.

I installed the prerequisites via

sudo yum install perl gcc dkms kernel-devel kernel-headers make bzip2

then I "inserted" the Guest Additions CD image and the Guest Additions auto runner came up and ran.

However the Guest Additions installation errored out with

VirtualBox Guest Additions: Kernel headers not found for target kernel 3.10.0-1062.el7.x86_64.

For closer examination I issued the following commands in the Terminal shell of the VM:

$ ls /usr/src/kernels/3.10.0-1062.18.1.el7.x86_64

and

$ uname -r3.10.0-1062.el7.x86_64

Notice the ddition caharcters 18.1 in the installed headers copared to what the kernel reports. I guess that is the reason why he Guest Additions installation fails.

How can I fix this and install the Guest Additions?


A few more details:

How to create private software modules based on tools(ruby/shell scripts) in unix?

$
0
0

I am trying to create private software modules using the tools which are ruby/shell script files so that I can load the script files as modules with the "module load programname/1.0" command also I need to push the modules into a CI pipeline using TMK file. Could someone help me with the steps?

I am using these modules/tools to submit lsf jobs to the computational clusters.

Can I add a systemd order dependency to a specific kernel module?

$
0
0

I am developing for an embedded linux system and using a kernel module that when probed loads a settings file from a specific filesystem path. If it cannot find the settings file, the probe attempt does not error out but simply loads with incorrect settings. As I am using systemd, this module is loaded in parallel with everything that is not explicitly marked as needing to be loaded before this module, and that appears to include the systemd unit that mounts the filesystem that holds this settings file. (The architecture of the embedded linux system requires this settings file be on a separate filesystem from the root filesystem.)

The kernel module in question is part of a wifi driver that is loaded by systemd-udev. It doesn't seem like each kernel module loaded by udev is listed as a systemd unit though, so it isn't clear how I would force this module to not be probed until after a specific filesystem is mounted. Is this something that can be done in systemd?

Your kernel headers for kernel 2.6.32-504.e16.x86_64 cannot be found

$
0
0

I have centos 6.6 installed on virtualbox. In order to use features like copy/paste, being able to share folders, etc, I need to install Guest additions on it.

I've clicked Device -> Insert Guest Additions CD Image and then doing the following:

enter image description here

However, when I try to run ./VBoxLinuxAdditions run I get the errors below. I am pasting screenshots because I'm not able to copy/paste since I don't have guest addition.

Error:

enter image description here

Logs:

enter image description here

The /lib/modules/2.6.32-504.e16.x86_64/build and /lib/modules/2.6.32-504.e16.x86_64/source folders are both present.

enter image description here

When I do yum remove kernel-devel and install it again using yum install kernel-devel this is the version that tries to install. Note that it is 2.6.32-573.18.1.e16

enter image description here

What I've done

Following This answer I did sudo yum install "kernel-devel-uname-r == $(uname -r)" which doesn't work

enter image description here

How to get TCP TX buffer usage?

$
0
0

I am currently developing a kernel module which sends TCP packets over the eth0 interface. These packets are of variable length, between 7 and 1031 bytes each.

The following situation happens: when sending multiple packets in a small time, these packets are queued in the TCP TX buffer and when the latter is full, it is sent over to the interface.
I already implemented a small function which correctly parse multiple packets in a single TCP window. However, sometimes, a packet is splitted across two TCP windows and I don't want that.

To tackle this issue, I thought of the following: before calling the sock_sendmsg() function, I fetch the current space left in the TCP TX buffer. If this space is less than the size of the to-be-sent packet, flush the current TCP TX buffer and start a new one.

By looking at the kernel code, I guessed that to fetch the TCP TX buffer remaining space, I should call the ioctl SIOCGIFTXQLEN on the socket. However, when calling socket->ops->ioctl(socket, SIOCGIFTXQLEN, &ifr) (ifr being a struct ifreq variable, with ifr.ifr_name == "eth0"), it returns -ENOIOCTLCMD.

Another way would be to disable the Natle algorithm but I fear that it would be too much of a performance loss.

Does anyone know why the ioctl socket's function returns this error code? Or another way of getting the information I want?

Many thanks for your answers.

How to load compressed kernel modules in Ubuntu?

$
0
0

I would like to use LZMA-compressed kernel modules on my system. Unfortunately Canoncial leaves that feature disabled both in kernel and user-space tools. Here's what I did so far:

  1. Compile and install the current 14.04.05-LTS kernel (v4.4.19) with:

    CONFIG_MODULE_COMPRESS=yCONFIG_MODULE_COMPRESS_XZ=y

    After installation I can now see a bunch of .ko.xz files in /lib/modules/4.4.19-37.56+/kernel/.

  2. Backport the kmod_22 package from Xenial (16.04) to Trusty (14.04) configured with the --with-xz option. This seems to work too.

  3. Run update-initrams -u -k 4.4.19-37.56+.

What works so far:

  • arbitrary operations on uncompressed modules (like those built by DKMS):

    $ modinfo nvidia_370filename:       /lib/modules/4.4.19-37.56+/updates/dkms/nvidia_370.ko[…]
  • showing compressed modules by their full path:

    modinfo /lib/modules/4.4.19-37.56+/kernel/fs/jfs/jfs.ko.xz
  • loading compressed modules without (missing) dependencies by their full path:

    insmod /lib/modules/4.4.19-37.56+/kernel/fs/jfs/jfs.ko.xz
  • unloading such modules:

    rmmod jfs

What doesn't work:

  • Unloading with modprobe -r.

  • Any other operation with just a package name but no path, e. g.:

    # insmod jfsinsmod: ERROR: could not load module jfs: No such file or directory# modprobe jfsmodprobe: FATAL: Module jfs not found in directory /lib/modules/4.4.19-37.56+

So, for modules without dependencies like jfs there's a work-around where I can just specify the full module file path to insmod, but this is both annoying and doesn't perform dependency resolution like modprobe.

I suppose that the kernel module directory somehow doesn't pick up compressed module files. How can I load compressed kernel modules by their name with modprobe?


How to automatically load a module in Slackware?

$
0
0

Is there any way to automatically on boot, load a custom kernel module, in Slackware, without it being required to edit any files and adding a modprobe statement or similar?

Can I simply put my .ko file, somewhere, and it will get loaded on boot?

Is this possible?

RNDIS Server to make a computer as a peripheral

$
0
0

First of all my goal is this, have a computer as a peripheral device to connect it to anyone's computer with ssh protocol or web. The idea is doing this by using a plug and play USB cable .

Facts that I know:

  • USB is designed as Master/Slave Architecture, so simple connection doesn't work beacuse both computer are acting as a host.
  • Ethernet is the simplest solutions, I know but I don't want to loose that interface.
  • There is a cable that makes a connection as USB PC to PC cable link. But I am not sure if we can get ssh work with this.

Searching I found the RNDIS protocol, I think this maybe has a solution to my problem but I don't what is this for exactly. Here it says:

RNDIS support allows a PC to talk to a Linux-based embedded system over USB by making the embedded system look like a USB attached Ethernet adapter.

This is pretty much what I need. Could somebody guide me on what I want? Maybe I am missing the point, I do not know.

I have compile a new kernel with the USB GADGET DRIVERS options and setup g_ether.ko module. When I tried to load the module

sudo modprobe g_etherFATAL: Error inserting g_ether (/lib/modules/3.13.2/kernel/drivers/usb/gadget/g_ether.ko): No such device`

and

ls /lib/modules/3.13.2/kernel/drivers/usb/gadget/-rw-r--r--  1 root root 25072 feb 14 15:04 gadgetfs.ko-rw-r--r--  1 root root  9660 feb 14 15:04 g_cdc.ko-rw-r--r--  1 root root  5888 feb 14 15:04 g_dbgp.ko-rw-r--r--  1 root root 11676 feb 14 15:04 g_ether.ko-rw-r--r--  1 root root 12072 feb 14 15:04 g_mass_storage.ko-rw-r--r--  1 root root 22548 feb 14 15:04 g_printer.ko-rw-r--r--  1 root root  9604 feb 14 15:04 g_serial.ko-rw-r--r--  1 root root 29748 feb 14 15:04 g_webcam.ko-rw-r--r--  1 root root 13576 feb 14 15:04 g_zero.ko

Disable bridge module insert?

$
0
0

I have Fedora 20 setup with default kernel configuration, where bridge feature is enabled as a module (CONFIG_BRIDGE=m), and the bridge module loads as the system starts. I don't understand who initiates it, since I have not found anything about bridge.ko in /etc/sysconfig/modules/*. However it ends up in the memory and every time I have to 'rmmod' it.

I would like to prohibit loading of the bridge.ko on the start up, yet I still want to manually load/unload bridge.ko whenever necessary.

I know it is possible to use the blacklist feature in /etc/modprobe.d/blacklist.conf, but can anybody point out who is loading bridge.ko in default setup of Fedora 20?

Secure Boot - how does Linux revoke/blacklist vulnerable boot loaders/boot managers/kernel/modules signed with shim's built-in key?

$
0
0

Background

Shim can have a certificate built into it during compilation (see "Shim keys" paragraph here). The corresponding private key can then be used to sign the boot loader/manager and kernel. This approach abstracts Microsoft's UEFI signing away from those components - only shim needs to be Microsoft-signed, the rest are distribution-signed, enabling them to be updated and released quickly while maintaining the chain of trust.

Blacklisting

If vulnerabilities are found in the boot loader/manager or the kernel, then they must be patched and a new version signed and released. But we can't use the same signing key anymore can we? If we do, then shim would still be able to load the older, vulnerable versions. If the vulnerabilities could be exploited to execute arbitrary code, then attackers can turn them into bootkits and circumvent Secure Boot. This means that a new shim has to be built with a new certificate, and the old shim's hash must be blacklisted in Secure Boot's dbx.

I'm not very familiar with how kernel modules are signed and verified across distros, though I would hazard a guess that there would be cases where they are signed and verified against a certificate built into the kernel. If vulnerabilities enabling arbitrary code execution are found in any module, then it would have to be patched and resigned with a new kernel key, which means the kernel would have to be signed with a new shim key, which means the old shim must again be blacklisted in dbx.

Issue

This doesn't seem like a viable approach in the long run. Vulnerabilities in the boot loader, kernel, and kernel modules are continuously being found and fixed, which means we need to continuously generate new key pairs, rebuild shim with the new certificate, and blacklist the old shim. In addition any distro that allows users to install and/or run them while Secure Boot is enabled, and without prompting users to install certificates/hashes into the Secure Boot db, is probably using a shim with the distro's certificate built-in. This means we have to blacklist shims from all affected distros whenever an arbitrary code execution vulnerability is found in any of the aforementioned components. This won't be an issue for advanced users who are able to replace Microsoft's keys with their own, but it seems like regular users would have to continuously update their dbx in order to stay secure. Is this really the case here? Or is the number of distros using built-in keys too small for this to be an issue?

WSL 2 does not have /lib/modules/

$
0
0

I have the source code of a hello world kernel module that works in Ubuntu 20 in a laptop.Now I am trying to compile the same code in Ubuntu 20 but inside WSL2. For that I am using this:

make -C /sys/modules/$(shell uname -r)/build M=$(PWD) modules

The problem is that /lib/modules is empty. It seems that WSL2 does not bring anything in /lib/modules/4.19.104-microsoft-standard/build

I tried getting the headers using:

sudo apt search linux-headers-`uname -r`Sorting... DoneFull Text Search... Done

But nothing get's populated in the modules folder

Is there anything I need to do in order that folder contains all required modules?

How to find the changes done to a particular kernel module through all releases

$
0
0

I need to access source code of all past versions of read_write.c under /fs/ from 3.10 to 5.3.

So far I had to go through https://elixir.bootlin.com/ repeatedly and look at every single version that has read_write.c changes. I do not want to download the entire complete kernel collection 3.10 through 5.3. However I also want to see the differences even in minor versions. Is there anyway I can download the particular source code of a module for any given version (does not matter if I need to do it manually, I can always use diff and locate when the changes happened.) or see the version history of a module throughout all releases including minor versions.

How to find the kernel boot parameter for a given boot configuration option?

$
0
0

I have a Dell laptop running Debian Sid. Current kernel (4.15.4) is configured to load dell_smbios as module (CONFIG_DELL_SMBIOS=m). This produces the followning error while booting

dell_smbios: No dell-smbios drivers are loaded 

I want to add a kernel boot parameter to stop dell-smbios from being loaded. Something like dell_smbios=off (Used to diable ACPI, i.e acpi=off) or dell_smbios.disable=1 (Used to disable IPv6, i.e ipv6.disable=1).

So how do I know the specific kernel boot parameter for a given configuration option in the config file in /boot directory?


Infinite loop when unbind+bind the device to the same driver in udev

$
0
0

I am using Magic Mouse 2 with ubuntu 20.04. To use the scrolling feature, I had to install this driver: https://github.com/rohitpid/Linux-Magic-Trackpad-2-Driver. The only problem is that I need to execute these two lines every time I restart or reconnect the mouse via bluetooth:

echo "0005:004C:0269.0008" > /sys/bus/hid/drivers/magicmouse/unbindecho "0005:004C:0269.0008" > /sys/bus/hid/drivers/magicmouse/bind

If I did not unbind then bind after the mouse is connected, I could still use the magic mouse but the scrolling won't work.

Anyways, I was looking for a way to automate this whenever the mouse is connected via bluetooth. I found out about udev but could not get it to work without getting into infinite loop. Here is the content of my hid-magicmouse.rules file under /etc/udev/rules.d:

ACTION=="bind", KERNEL=="0005:004C:0269.*", SUBSYSTEM=="hid", DRIVER=="magicmouse", \RUN+="/bin/bash -c 'echo $kernel > /sys/bus/hid/drivers/magicmouse/unbind'", \RUN+="/bin/bash -c 'echo $kernel > /sys/bus/hid/drivers/magicmouse/bind'"

This gets into an infinite loop because the script will call itself again after executing the second line (bind command) which is the triggering action for this rule.

I tried changing the triggering action to "add" instead of "bind", but scrolling still does not work.

Here is the output of my udevadm monitor when the magic mouse is connected:

KERNEL[1684.898183] add      /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial1/serial1-0/bluetooth/hci0/hci0:12 (bluetooth)UDEV  [1684.905964] add      /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial1/serial1-0/bluetooth/hci0/hci0:12 (bluetooth)KERNEL[1685.029515] add      /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial1/serial1-0/bluetooth/hci0/hci0:12/0005:004C:0269.0008 (hid)KERNEL[1685.029970] add      /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial1/serial1-0/bluetooth/hci0/hci0:12/0005:004C:0269.0008/input/input494 (input)KERNEL[1685.030138] add      /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial1/serial1-0/bluetooth/hci0/hci0:12/0005:004C:0269.0008/input/input494/mouse1 (input)KERNEL[1685.030418] add      /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial1/serial1-0/bluetooth/hci0/hci0:12/0005:004C:0269.0008/input/input494/event15 (input)KERNEL[1685.030510] add      /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial1/serial1-0/bluetooth/hci0/hci0:12/0005:004C:0269.0008/hidraw/hidraw5 (hidraw)UDEV  [1685.034983] add      /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial1/serial1-0/bluetooth/hci0/hci0:12/0005:004C:0269.0008 (hid)UDEV  [1685.042271] add      /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial1/serial1-0/bluetooth/hci0/hci0:12/0005:004C:0269.0008/input/input494 (input)UDEV  [1685.050656] add      /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial1/serial1-0/bluetooth/hci0/hci0:12/0005:004C:0269.0008/hidraw/hidraw5 (hidraw)UDEV  [1685.050881] add      /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial1/serial1-0/bluetooth/hci0/hci0:12/0005:004C:0269.0008/input/input494/mouse1 (input)UDEV  [1685.088633] add      /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial1/serial1-0/bluetooth/hci0/hci0:12/0005:004C:0269.0008/input/input494/event15 (input)KERNEL[1685.627176] bind     /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial1/serial1-0/bluetooth/hci0/hci0:12/0005:004C:0269.0008 (hid)UDEV  [1685.632050] bind     /devices/pci0000:00/0000:00:1e.0/dw-apb-uart.2/serial1/serial1-0/bluetooth/hci0/hci0:12/0005:004C:0269.0008 (hid)

Any help to automate or fix this is appreciated!

How do I tell the linux kernel that I don't have IPMI?

$
0
0

I'm trying to clean up known or bogus error messages that shows up in the log when I boot my Debian server, in order to more clearly see actual errors. Now it's come to this:

Base address is zero, assuming no IPMI interface

Since I know that my system (Supermicro H8SGL) does not have IPMI (gotta pay extra - I didn't) it appears that the vendor sets the base address to zero to mark a non-existing feature, something that the kernel frowns upon according to the kernel patch introducing the message. From the changelog:

ipmi:dmi: Ignore IPMI SMBIOS entries with a zero base address

Looking at logs from systems all over the place, it looks like tons of broken systems exist that set the base address to zero. I can only guess that is some sort of non-standard idea to mark the interface as not being present. It can't be zero, anyway, so just complain and ignore it.

Can I tell the kernel at boot with some kind of flag that I don't even want it to try doing whatever it does in order to end up with this error? I'm not sure if this is a module that is being autoloaded, something built in to the kernel, or something else...

There is a possibly-relevant question here at U&L, Boot Error -> ipmi:dmi : Invalid offset : 0 but the answer is basically "just try newer kernels" and a bunch of people in forums who thinks it relates to Windows and SSDs, so it is not very helpful.

Udev rule setting up SocketCAN socket only works correctly only when run manually

$
0
0

I want to start slcand (the userspace daemon for the serial line CAN interface driver) when my Lawicel CanUSB dongle is plugged in. I followed Pascal Walter's step-by-step guide and all seems to work (slcan0 is there and i can bind(2)), except I never actually receive anything (only outgoing messages are visible in candump and Wireshark).

The udev rule looks as follows:

# Lawicel CANUSB moduleACTION=="add", ENV{ID_MODEL}=="CANUSB", ENV{SUBSYSTEM}=="tty", RUN+="/usr/bin/logger [udev] Lawicel CANUSB detected - running slcan_add.sh!", RUN+="/usr/local/bin/slcan_add.sh $kernel"ACTION=="remove", ENV{ID_MODEL}=="CANUSB", ENV{SUBSYSTEM}=="usb", RUN+="/usr/bin/logger [udev] Lawicel CANUSB removed - running slcan_remove.sh!", RUN+="/usr/local/bin/slcan_remove.sh"

with /usr/local/bin/slcan_add.sh

#!/bin/sh# Bind the USBCAN deviceslcand -o -c -f -s8 /dev/$1 slcan0sleep 2ifconfig slcan0 up 

and /usr/local/bin/slcan_remove.sh

#!/bin/sh# Remove the USBCAN devicepkill slcand

However when I manually execute sudo /usr/local/bin/slcan_remove.sh && sudo /usr/local/bin/slcan_add.sh ttyUSB0, everything works as expected and I can see all CAN messages with candump slcan0).

The interface looks just the same as with udev. ip link show slcan0 gives:

91: slcan0: <NOARP,UP,LOWER_UP> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10

The NetworkManager has a problem with slcan0, but that appears also when creating slcan0 manually as described above. The output of tail -f /var/log/syslog when plugging in is:

May 26 18:29:18 laurenz-T440p logger: [udev] Lawicel CANUSB detected - running slcan_add.shMay 26 18:29:18 laurenz-T440p slcand[14924]: starting on TTY device /dev/ttyUSB0May 26 18:29:18 laurenz-T440p slcand[14925]: attached TTY /dev/ttyUSB0 to netdevice slcan0May 26 18:29:18 laurenz-T440p slcand[14925]: netdevice slcan0 renamed to slcan0May 26 18:29:18 laurenz-T440p NetworkManager[866]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/slcan0, iface: slcan0)May 26 18:29:18 laurenz-T440p NetworkManager[866]:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/slcan0, iface: slcan0): no ifupdown configuration found.May 26 18:29:18 laurenz-T440p NetworkManager[866]: <warn> /sys/devices/virtual/net/slcan0: couldn't determine device driver; ignoring...

ps -fauxw | grep can (manual start as above):

root      1221  0.0  0.0   4336   100 ?        Ss   11:38   0:00          \_ slcand -o -c -f -s8 /dev/ttyUSB0 slcan0

ps -fauxw | grep can (re-plugging triggered udev start):

root      1362  0.0  0.0   4336    96 ?        Ss   11:45   0:00 slcand -o -c -f -s8 /dev/ttyUSB0 slcan0

What could the problem with udev be? How can I fix it?

Update: Ok, so I added an Ixxat USB-to-CAN V2 and installed its SocketCan driver. It has the same problem: Tx fine, Rx not working.
Interestingly, I can just plug the two together (120R in the middle). Then I run candump -d -e -c -x -t absolute any,0:0,#FFFFFFFF in one Terminal. In another, I send CAN frames with cansend can0 000# (Send one frame with CanID 0, length 0 via can0 (the Ixxat adapter)). The result depends on if I started the slcand manually or via udev.

Manual (as described above):

$ candump -d -e -c -x -t absolute any,0:0,#FFFFFFFF(1464614442.246548)  can0  TX - -  000   [0] (1464614442.249320)  slcan0  RX - -  000   [0]

Via Udev:

$ candump -d -e -c -x -t absolute any,0:0,#FFFFFFFF (1464614643.800545)  can0  RX - -  20000020   [8]  00 00 00 00 00 00 00 00   ERRORFRAME    no-acknowledgement-on-tx (1464614643.807361)  can0  RX - -  20000020   [8]  00 00 00 00 00 00 00 00   ERRORFRAME    no-acknowledgement-on-tx (1464614643.814058)  can0  RX - -  20000020   [8]  00 00 00 00 00 00 00 00   ERRORFRAME    no-acknowledgement-on-tx (1464614643.820840)  can0  RX - -  20000020   [8]  00 00 00 00 00 00 00 00   ERRORFRAME    no-acknowledgement-on-tx[and so on...]

Here is my lsmod | grep can:

vcan                   16384  0 slcan                  16384  1 can_dev                24576  2 ixx_pci,ixx_usbcan_raw                20480  0 can                    45056  1 can_raw

I'm on a Ubuntu 14.04 machine with a 4.4 kernel. uname -rv:

4.4.0-21-generic #37~14.04.1-Ubuntu SMP Wed Apr 20 16:33:38 UTC 2016

Replace original ko.xz module in CentOS 8 with patched module

$
0
0

I'm facing a problem with my wifi (Intel Wireless-AC 9462 “No WiFi Adapter Found”). My question is posted in forums.centos.org.

According to one message on www.spinics.net/lists/linux-wireless is a bug, and this patch must be applied.

My solution is to recompile the module according to wiki.centos.org.

I found a video youtube about of CentOS Build Kernel Modules.

I take a copy of my kernel version (4.18.0-193.6.3.el8_2.x86_64) and according to bug report, take changes from kernel 5.4 version.

And I created my fixed kernel module (iwlwifi.ko.xz) in my Centos located on

/lib/modules/4.18.0-193.6.3.el8_2.x86_64/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko.xz

Now, I need to backup it (the originaliwlwifi.ko.xz) and replace it.

My situation is this:

[root@centos iwlwifi]# pwd/lib/modules/4.18.0-193.6.3.el8_2.x86_64/kernel/drivers/net/wireless/intel/iwlwifi[root@centos iwlwifi]# ls -altotal 724drwxr-xr-x. 4 root root   4096 Jun 28 18:44 .drwxr-xr-x. 3 root root   4096 Jun 26 20:40 ..drwxr-xr-x. 2 root root   4096 Jun 26 20:40 dvm-rw-r--r--. 1 root root 616856 Jun 28 18:44 iwlwifi.ko-rw-r--r--. 1 root root 103560 Jun 10 06:23 iwlwifi.ko.xzdrwxr-xr-x. 2 root root   4096 Jun 26 20:40 mvm[root@centos iwlwifi]# 

As you can see the recent built version is iwlwifi.ko

Trying to remove the original

[root@centos iwlwifi]# rmmod -v iwlwifi.ko.xzrmmod: ERROR: Module iwlwifi is in use by: iwlmvm[root@centos iwlwifi]#

Obviously I can force it and remove it, but I need to enable again the iwlmvm module.

What and secure Steps that I need to do (remove the faulty module iwlwifi.ko.xz module and install my recent fixed module and enable the untouched iwlmvm module)?

How to replace one kernel module in the Linux kernel tree

$
0
0

I would like to update/exchange a single kernel module in a Linux kernel tree that I got from an embedded device vendor (Hardkernel) with the latest version from the Torvalds Linux kernel.

Could someone describe which components I need to edite and exchanged?

Thanks in advance,

Chris

Viewing all 1181 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>