Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all 12260 articles
Browse latest View live

call a kernel module function from program at user space

$
0
0

I developed a kernel module and some functions on it. Now i need to develop a program in the user space and call some functions which are in the kernel module.

I also need to access some global variable that are in the kernel module on my program at the user space.


How to build a Linux kernel module so that it is compatible with all kernel releases?

$
0
0

I want to build a kernel module that will be compatible with all the kernel’s releases.For example, if I build a kernel module on kernel 3.2.0-29 and try to load it on 3.2.0-86, I get the following error:

modprobe my_driver

FATAL: Error inserting my_driver (/lib/modules/3.2.0-86-generic/kernel/fs/my_drv/my_drv.ko): Invalid module format

[ In the log messeges: my_drv: disagrees about version of symbol module_layout ]

How can I build a kernel module on 3.2.0-29 that will be good for all 3.2.0 releases.

unknown symbol set_memory_rw

$
0
0

I am trying to develop a kernel module that hooks the READ system call. for some reason it just doesn't recognize that function.

I saw another question of this sort but I didn't really understand the answer or what to do.

I am working on Kali 4.19.93 with Raspberry-pi 4

My code:

#include <linux/module.h>#include <linux/kernel.h>#include <linux/init.h>#include <linux/moduleparam.h>#include <linux/syscalls.h>#include <linux/slab.h>#include <linux/kern_levels.h>#include <asm/unistd.h>#include <asm/cacheflush.h>#include <linux/semaphore.h>#include <asm/set_memory.h>MODULE_LICENSE("GPL");MODULE_AUTHOR("Omri Ben David");MODULE_DESCRIPTION("Hooking Linux System calls");MODULE_VERSION("1.0");unsigned long** SYS_CALL_TABLE = (unsigned long**) 0xc02011c4;asmlinkage ssize_t (*original_read) (int fd, char *buf, size_t count);asmlinkage ssize_t HookRead(unsigned int fd, char * buf, size_t count){    printk(KERN_INFO "Rootkit_Debug: Yay you entered my function!!\n Now you can read\n");    return (*original_read)(fd,buf,count);}   static int __init SetHooks(void){    printk(KERN_INFO "Hooks Will now be set, hold on tight\n");    printk(KERN_INFO "System calls table is at address %p\n",SYS_CALL_TABLE);    original_read = (void*) SYS_CALL_TABLE[__NR_read];    set_memory_rw((long unsigned int)SYS_CALL_TABLE,1);    SYS_CALL_TABLE[__NR_read] = (unsigned long*)HookRead;    printk(KERN_INFO "System calls hooked successfully\n");    return 0;}static void __exit HookCleanup(void){    printk(KERN_INFO "System calls restore innitiated\n");    SYS_CALL_TABLE[__NR_read] = (unsigned long*) original_read;    printk(KERN_INFO "System successfully restored. hope you had fun");}module_init(SetHooks);module_exit(HookCleanup);

Handling an undefined instruction in the kernel

$
0
0

So I'm playing around with reading system registers in the kernel and I've recently run into a bit of a roadblock.

In ARM64, certain system registers (e.g. OSECCR_EL1) are not always implemented. If they are implemented, then trying an mrs instruction is fine - nothing bad happens. But if they AREN'T implemented, then the kernel throws an Oops due to an undefined instruction.

This isn't unreasonable, however, as I'm inside a kernel module while running this mrs instruction, I don't see an easy way to recover from this oops, or even recognize that a particular system register read was going to fail in the first place.

Is there any easy way to identify beforehand whether a system register is valid, or at the very least, handle a kernel oops in a way that doesn't immediately stop my kernel module function execution?

How to add appArmor to linux distributions

$
0
0

I am trying to add appArrmor to my img.

This is the .config file that my device use.

I have add CONFIG_SECURITY_APPARMOR=yCONFIG_SECURITY_APPARMOR_HASH=yCONFIG_SECURITY_APPARMOR_HASH_DEFAULT=yCONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1 but sudo apparmor_status still returnapparmor module is not loaded.

I have too questions

  1. Is there a way to show all the .config on the running machine to know if appArmor is indeed included.
  2. Are there other things that I need to set in order to make appArmor work.

Is it possible to map a process into memory without mapping the kernel?

$
0
0

The OSDev wiki says that:

It is traditional and generally good to have your kernel mapped in every user process

Why is that though? Can't the process be mapped to memory solely? What are the advantages of mapping the kernel and wouldn't that be a waste of space?

Also, is it possible to access the kernel space from the user space and why would I do that?

Kernel panic with exitcode=0x00000004 after /init

$
0
0

I have an embedded ARM system with processor AT91SAM9G45. I try to build linux kernel with initramfs for this system. Kernel version is 4.14.79.

After loading kernel and initramfs image at device I have following:

  1. Kernel definitely finds out initramfs image, unpacks it and sets it into memory.

  2. Kernel definityle finds all files in initramfs image, I see it in debug messages I've added into linux kernel source code.

  3. After unpacking initramfs image kernel tries to start /init process. /init processes starts and instantly returns 0 (0 means no errors) and then instantly throws kernel panic message:

Freeing unused kernel memory: 384K

This architecture does not have kernel memory protection.

run_init_process BEFORE /init

run_init_process AFTER /init, result = 0

Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004

"run_init_process_BEFORE /init" and "run_init_process /init, result = 0" are debug messages that I've added to linux source code.

Initramfs image is build by using busybox.

There is no difference, what an initial script or executable file I try to start. Results are same. If /init script tries to echo some message and sleep for some seconds, kernel does not show message and does not wait, and throws panic message instantly.

So I compiled statically this simple program and tried to start it:

#include <stdio.h>int main(int argc, char *argv){  printf("Hello world!\n");  sleep(999999999);}

Same result, with no "Hello world!" and with no sleeping:

Freeing unused kernel memory: 384K

This architecture does not have kernel memory protection.

run_init_process BEFORE /hello

run_init_process AFTER /hello, result = 0

Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004

If I compile this program with x86_64 gcc compiler, result is -8:

Same result, with no "Hello world!" and sleeping:

Freeing unused kernel memory: 384K

This architecture does not have kernel memory protection.

run_init_process BEFORE /hello

run_init_process AFTER /hello, result = -8

Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004

So it means that linux kernel defines whether the file is executable at current platform.

If I compile hello.c program with no static linking, result is -2 (and kernel panic message after this). If I put .so files into initramfs image at the /lib folder, result is 0, and kernel panic message after this. If I put .so files that are compiled with x86_64 compiler, result is -13, and kernel panic message after this.

So what's the reason of this message? I cannot find it out.

Read/Write the MTD flash via Octeon Simple Executive

$
0
0

Cavium Octeon appliance has mtd0 to 5 flash present. I want to log/dump firmware/Simple Executive crash backtrace to one of the solid state storage/ flash in the appliance. For that I try to initialize the flash with simple executive helping function in cvmx-flash.c;

cvmx_flash_initialize();

but on boot up the initialize function in Simple Executive prints

cvmx-flash: No CFI chips found

The cvmx_flash_initialize() in cvmx-flash.c code is shared below;

void cvmx_flash_initialize(void){int boot_region;int chip_id = 0;memset(flash_info, 0, sizeof(flash_info));/* Loop through each boot bus chip select region */for (boot_region=0; boot_region<MAX_NUM_FLASH_CHIPS; boot_region++){    cvmx_mio_boot_reg_cfgx_t region_cfg;    region_cfg.u64 = cvmx_read_csr(CVMX_MIO_BOOT_REG_CFG0 + boot_region*8);    /* Only try chip select regions that are enabled. This assumes the        bootloader already setup the flash */    if (region_cfg.s.en)    {        /* Convert the hardware address to a pointer. Note that the bootbus,            unlike memory, isn't 1:1 mapped in the simple exec */        void *base_ptr = cvmx_phys_to_ptr((region_cfg.s.base<<16) | 0xffffffff80000000ull);        if (__cvmx_flash_query_cfi(chip_id, base_ptr) == 0)        {            /* Valid CFI flash chip found */            chip_id++;        }    }}if (chip_id == 0){    cvmx_dprintf("cvmx-flash: No CFI chips found\n");}}

The __cvmx_flash_query_cfi(chip_id, base_ptr) function fails in following QRY verification;

 /* Make sure we get the QRY response we should */if ((__cvmx_flash_read_cmd(chip_id, 0x10) != 'Q') ||    (__cvmx_flash_read_cmd(chip_id, 0x11) != 'R') ||    (__cvmx_flash_read_cmd(chip_id, 0x12) != 'Y')){    flash->base_ptr = NULL;    return -1;}

The __cvmx_flash_query_cfi(chip_id, base_ptr) complete function is shared below;

static int __cvmx_flash_query_cfi(int chip_id, void *base_ptr){int region;cvmx_flash_t *flash = flash_info + chip_id;/* Set the minimum needed for the read and write primitives to work */flash->base_ptr = base_ptr;flash->is_16bit = 1;   /* FIXME: Currently assumes the chip is 16bits *//* Put flash in CFI query mode */__cvmx_flash_write_cmd(chip_id, 0x00, 0xf0); /* Reset the flash chip */__cvmx_flash_write_cmd(chip_id, 0x55, 0x98);/* Make sure we get the QRY response we should */if ((__cvmx_flash_read_cmd(chip_id, 0x10) != 'Q') ||    (__cvmx_flash_read_cmd(chip_id, 0x11) != 'R') ||    (__cvmx_flash_read_cmd(chip_id, 0x12) != 'Y')){    flash->base_ptr = NULL;    return -1;}/* Read the 16bit vendor ID */flash->vendor = __cvmx_flash_read_cmd16(chip_id, 0x13);/* Read the write timeout. The timeout is microseconds(us) is 2^0x1f    typically. The worst case is this value time 2^0x23 */flash->write_timeout = 1ull << (__cvmx_flash_read_cmd(chip_id, 0x1f) +                                __cvmx_flash_read_cmd(chip_id, 0x23));/* Read the erase timeout. The timeout is milliseconds(ms) is 2^0x21    typically. The worst case is this value time 2^0x25 */flash->erase_timeout = 1ull << (__cvmx_flash_read_cmd(chip_id, 0x21) +                                __cvmx_flash_read_cmd(chip_id, 0x25));/* Get the flash size. This is 2^0x27 */flash->size = 1<<__cvmx_flash_read_cmd(chip_id, 0x27);/* Get the number of different sized block regions from 0x2c */flash->num_regions = __cvmx_flash_read_cmd(chip_id, 0x2c);int start_offset = 0;/* Loop through all regions get information about each */for (region=0; region<flash->num_regions; region++){    cvmx_flash_region_t *rgn_ptr = flash->region + region;    rgn_ptr->start_offset = start_offset;    /* The number of blocks in each region is a 16 bit little endian        endian field. It is encoded at 0x2d + region*4 as (blocks-1) */    uint16_t blocks = __cvmx_flash_read_cmd16(chip_id, 0x2d + region*4);    rgn_ptr->num_blocks =  1u + blocks;    /* The size of each block is a 16 bit little endian endian field. It        is encoded at 0x2d + region*4 + 2 as (size/256). Zero is a special        case representing 128 */    uint16_t size = __cvmx_flash_read_cmd16(chip_id, 0x2d + region*4 + 2);    if (size == 0)        rgn_ptr->block_size = 128;    else        rgn_ptr->block_size = 256u * size;    start_offset += rgn_ptr->block_size * rgn_ptr->num_blocks;}/* Take the chip out of CFI query mode */switch (flash_info[chip_id].vendor){    case CFI_CMDSET_AMD_STANDARD:        __cvmx_flash_write_cmd(chip_id, 0x00, 0xf0);    case CFI_CMDSET_INTEL_STANDARD:    case CFI_CMDSET_INTEL_EXTENDED:        __cvmx_flash_write_cmd(chip_id, 0x00, 0xff);        break;}/* Convert the timeouts to cycles */flash->write_timeout *= cvmx_clock_get_rate(CVMX_CLOCK_CORE) / 1000000;flash->erase_timeout *= cvmx_clock_get_rate(CVMX_CLOCK_CORE) / 1000;#if DEBUG/* Print the information about the chip */cvmx_dprintf("cvmx-flash: Base pointer:  %p\n""            Vendor:        0x%04x\n""            Size:          %d bytes\n""            Num regions:   %d\n""            Erase timeout: %llu cycles\n""            Write timeout: %llu cycles\n",       flash->base_ptr,       (unsigned int)flash->vendor,       flash->size,       flash->num_regions,       (unsigned long long)flash->erase_timeout,       (unsigned long long)flash->write_timeout);for (region=0; region<flash->num_regions; region++){    cvmx_dprintf("            Region %d: offset 0x%x, %d blocks, %d bytes/block\n",           region,           flash->region[region].start_offset,           flash->region[region].num_blocks,           flash->region[region].block_size);}#endifreturn 0;}

However on boot up the linux shows that it has mtd flash present with CFI conformant;

Bootbus flash: Setting flash for 256MB flash at 0x10000000 with 2 bank(s)

phys_mapped_flash: Found 1 x16 devices at 0x0 in 16-bit bank

phys_mapped_flash: Found 1 x16 devices at 0x8000000 in 16-bit bank

Amd/Fujitsu Extended Query Table at 0x0040 phys_mapped_flash: CFI does

not contain boot bank location. Assuming top. number of CFI chips: 2

cfi_cmdset_0002: Disabling erase-suspend-program due to code

brokenness. Creating 6 MTD partitions on "phys_mapped_flash":

0x000000000000-0x000000200000 : "FAILSAFE-BOOTLOADER"

0x000000200000-0x0000003e0000 : "NORMAL-BOOTLOADER"

0x0000003e0000-0x000000400000 : "BOOTLOADER-ENVIRONMENT"

0x000000400000-0x000002200000 : "LINUX-KERNEL"

0x000002200000-0x000007200000 : "LINUX-FS"

0x000007200000-0x000008000000 : "RESERVED-14M"

and the flinfo in u-boot displays that mtd flash is present with CFI conformant;

Bank # 1: CFI conformant flash (16 x 16) Size: 128 MB in 1024 Sectors AMD Standard command set, Manufacturer ID: 0x01, Device ID:

0x227E2228 Erase timeout: 4096 ms, write timeout: 1 ms Buffer

write timeout: 3 ms, buffer size: 64 bytes Sector Start Addresses:

B0000000 RO etc etc (lots of hex numbers displayed)

Bank # 2: CFI conformant flash (16 x 16) Size: 128 MB in 1024 Sectors

AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x227E2228

Erase timeout: 4096 ms, write timeout: 1 ms Buffer write timeout: 3 ms, buffer size: 64 bytes

Sector Start Addresses: B8000000 etc etc (lots of hex numbers displayed)

The mtd flash of the device is already being used by the u-boot and linux but how can I use the same solid state storage/flash with utility functions of cvmx-flash.c in bare metal simple executive firmware of Cavium Octeon for the said purpose (i.e dumping crash)? How octeon simple executive firmware can read/write the solid state storage/flash that is already successfully accessible by linux & uboot?


Installing with apt failed due to trousers service [closed]

$
0
0

I was learning basics on checking fTPM 2.0 on my device. I was following the basics mentioned here :https://github.com/vchatterji/tpm2-luks

Where after installing tpm2-tss and ran command

sudo useradd --system --user-group tss

After that I installed tpm2-abrmd,

Since then whenever I run any apt-install tpm2-tools command, I get to see the following error:

Setting up trousers (0.3.14+fixed1-1build1) ...Job for trousers.service failed because the control process exited with error code.See "systemctl status trousers.service" and "journalctl -xe" for details.invoke-rc.d: initscript trousers, action "start" failed.● trousers.service - LSB: starts tcsd   Loaded: loaded (/etc/init.d/trousers; generated)   Active: failed (Result: exit-code) since Fri 2020-04-17 10:30:14 IST; 4ms ago     Docs: man:systemd-sysv-generator(8)  Process: 21485 ExecStart=/etc/init.d/trousers start (code=exited, status=30)Apr 17 10:30:14 ubuntu trousers[21485]:  * Starting Trusted Computing daemon tcsdApr 17 10:30:14 ubuntu trousers[21485]: /etc/init.d/trousers: 32: [: /dev/tpm0: unexpected operatorApr 17 10:30:14 ubuntu trousers[21485]:  * TPM device owner for /dev/tpmrm0 is not 'tss', this can cause problems.Apr 17 10:30:14 ubuntu tcsd[21492]: TCSD TDDL[21492]: TrouSerS ioctl: (25) Inappropriate ioctl for deviceApr 17 10:30:14 ubuntu tcsd[21492]: TCSD TDDL[21492]: TrouSerS Falling back to Read/Write device support.Apr 17 10:30:14 ubuntu tcsd[21492]: TCSD TCS[21492]: TrouSerS ERROR: TCS GetCapability failed with result = 0x1eApr 17 10:30:14 ubuntu trousers[21485]:    ...fail!Apr 17 10:30:14 ubuntu systemd[1]: trousers.service: Control process exited, code=exited status=30Apr 17 10:30:14 ubuntu systemd[1]: trousers.service: Failed with result 'exit-code'.Apr 17 10:30:14 ubuntu systemd[1]: Failed to start LSB: starts tcsd.dpkg: error processing package trousers (--configure): installed trousers package post-installation script subprocess returned error exit status 1dpkg: dependency problems prevent configuration of tpm-tools: tpm-tools depends on trousers; however:  Package trousers is not configured yet.dpkg: error processing package tpm-tools (--configure): dependency problems - leaving unconfiguredNo apport report written because the error message indicates its a followup error from a previous failure.                                                                                                          Errors were encountered while processing: trousers tpm-toolsE: Sub-process /usr/bin/dpkg returned an error code (1)

I want to check tpm2_pcrlist etc commands of tpm2-tss. Kindly help me here.

Also, I can see ls -l /dev/tpm* output as

ls -l /dev/tpm*crw------- 1 tss  tss   10,   224 Apr 17 10:30 /dev/tpm0crw------- 1 root root 241, 65536 Apr 17 10:05 /dev/tpmrm0

FYI I use kernel 5.6

How to disable vmwgfx driver without compile a new kernel on Ubuntu?

$
0
0

I know to disable it by compile a kernel without setting CONFIG_DRM_VMWGFX in config.But I don't want build a new kernel,can I achieve it by some configuration?

I tried to delete vmwgfx.ko from the lib/modules/.../kernel/driver directory and reboot,but the driver works well On Ubuntu 16.04.Why?Is the file elsewhere?

And I also tried to rmmod,but it's not work.

[root@ubuntu:] lsmod |grep vmwgfxvmwgfx                235405  4 drm_kms_helper        159169  1 vmwgfxttm                    99345  1 vmwgfxdrm                   370825  7 ttm,drm_kms_helper,vmwgfx[root@ubuntu:] rmmod -f vmwgfxrmmod: ERROR: ../libkmod/libkmod-module.c:793 kmod_module_remove_module()could not remove 'vmwgfx': Resource temporarily unavailable[root@ubuntu:] modprobe -r vmwgfxmodprobe: FATAL: Module vmwgfx is in use.

Secure removal in Linux Kernel

$
0
0

I try to write little module for secure removal in Linux Kernel. I am using system call interception with kprobes. The idea is this: before calling unlink, I intentionally open the file and write zeros into it. However, I get a problem that kprobes hooks cannot "sleep" and calling kernel_write() breaks the kernel. What could be the solutions to my problem? Maybe there is a variation of the kernel_write function without asynchronous writing?

What is the need of having both System.map file and /proc/kallsyms?

$
0
0

I just want to know the difference between System.map file and /proc/kallsyms.
I am using Linux 3.16 generic kernel. I know that both are the kernel symbol table.. When I did a compare on this files, both are having the same content.
So what is the need of having both?

Disable Intel HD4000 Graphics on Ubuntu 18 Linux (hardware failure)

$
0
0

So my Samsung Ativ Book 8 laptop has a Radeon 8770m and the integrated HdD4000 built into the intel i7-3635QM Processor. It looks like the HD4000 has some kind of hardware failure. Anytime I boot the computer, it just dies as it's going into Ubuntu. This happened on Windows too, so I switched to Linux to see if I could have more control. Also, the bios doesn't allow disabling of the HD4000.

The only way the laptop works while having proper intel and amd drivers is if I have an external monitor plugged in. If it shows the llvmpipe drivers, then the laptop works fine, but the external display doesn't work. Also I think the radeon gpu is disabled too.

My hope is to just completely disable the HD4000, maybe kernal level? Let everything run on the AMD 8770m. I'm okay with using my laptop basically as a desktop. It's old and the battery is trash anyways. Thank you for your help.

Writing a Linux driver for a weird keyboard

$
0
0

I own a keyboard that has an anti-ghosting mode.

It is toggled on/off using Fn+ScrollLock. When on, the codes sent are a bit different. The keyboard is still legitimate HID, but, for example, all modifier keys are seen by Linux as Shift and the actual modifier key is in another field of the event.

What I am looking for is either a ready driver (should someone happen to know about one) or some introduction to writing such input drivers. I do not know much about the ecosystem (evdev, libinput, etc.) and I do not even know where to start. If possible, the same driver should work both under X11 and under Wayland.

Just for the record, the keyboard's “shop” name is Modecom Volcano Gaming. The USB ID is258a:1006 and it is apparently not annotated in usb.ids. The keyboard works perfectly fine in both modes under Windows.

RHEL 8.1 Custome Lorax-Composer AMI Image Fails to Start

$
0
0

I'm using Lorax-Composer to try and build a custom RHEL 8.1 image for upload to amazon AWS. For testing I am using a generic image built with Lorax and just a baseos install.

I've followed the directions at the RHEL user portal without incident. I've also created a local repo mirror following the weldr instructions page, since lorax-composer can't read from the online repos. No issues.

I log into the cockpit gui, select the "stock" example development server, and the logs don't kick off any errors. I follow the RHEL directions to upload, convert to a snapshot, create an ami, and launch the instance (m5.xlarge resoruce to make sure there are no resource constraints) and... nothing. The instance goes to "running", but status checks never pass and the instance is non-responsive. Security groups allow all connections from 0/anyport and the instance won't answer pings or accept an ssh traffic. After about 5 mintues I can see the instance reboot. There are not monitoring logs or dumps from aws regarding the instance, everything is blank (and it looks like the cpu isn't even initalized, all the monitoring graphs are blank).

I've opened up aws rhel golden images from the aws marketplace using my dev account, but the goal is to be able to upload a custom image of the RHEL8 kernel. I did notice that RHEL8 golden images only go to 8.0, so I'm wondering if there's an issue packaging the 8.1 kernel? In order to use a RHEL8 golden image I have to use their ami to boot into 8.0 and then upgrade the kernel using Yum. I also tried using weldr to package the vm as a .vmdk and a .img and run the same conversion process, to see if it was an issue with the .ami kickstart script, but results are identical. I'm thinking it has to be an issue with the 8.1 build that lorax-composer is generating. Is there a way to force the 8.0 kernel to build out of the repo? I thought about pulling the rhel7.x repos but, even if that successfully created an ami I could use, it woudln't be much use as the point is to run rhel8 on aws with a custom image.

I've tried looking for how to package my own copy of 8.0, but I don't think the 8.0 Kernel is in the current RHEL developer's library. Does anyone have any ideas or experience dealing with custom ami image imports? I've attached the logs from the lorax-compsoer below, as theya re the only logs I have for this process...

I would also be open to using another .ami builder if anyone has had success with a different software package than lorax-composer to get custom rhel8 into aws.

+++++++++++++OUTPUT LOGS BELOW THIS LINE++++++++++++++++++++++++

08:22:33,935 INF isys: 8130388 kB (7939 MB) are available08:22:33,942 INF startup_utils: check_memory(): total:7939, needed:320, graphical:41008:22:33,942 INF startup_utils: Switching logging level to debug08:22:33,942 INF flags: Not doing 'syslog setup' in directory installation08:22:33,943 INF flags: Not doing 'early exception handler' in directory installation08:22:33,943 INF flags: Not doing 'start audit daemon' in directory installation08:22:33,943 INF main: anaconda called with cmdline = ['/usr/sbin/anaconda', '--kickstart', '/var/lib/lorax/composer/results/51e7e079-6ccf-4dda-a4e1-17bf69612190/final-kickstart.ks', '--cmdline', '--loglevel', 'debug', '--dirinstall', '--remotelog', '127.0.0.1:47435']08:22:33,944 INF main: Default encoding = utf-8 08:22:34,014 INF dbus.connection: Connecting to a default bus at unix:abstract=/tmp/dbus-Jbz3Xn04lu,guid=bb34e2f5f378c3e3eb55aacd5e99ad9a.08:22:34,384 INF startup_utils: Waiting 600 sec for modules to be started.08:22:35,387 INF startup_utils: Waiting 599 sec for modules to be started.08:22:36,461 INF startup_utils: Parsing kickstart: /var/lib/lorax/composer/results/51e7e079-6ccf-4dda-a4e1-17bf69612190/final-kickstart.ks08:22:36,792 WRN kickstart: Command clearpart will be parsed in DBus module.08:22:36,793 WRN kickstart: Command timezone will be parsed in DBus module.08:22:36,793 WRN kickstart: Command firewall will be parsed in DBus module.08:22:36,794 INF kickstart.kickstart.network: setting "link" for missing --device specification in kickstart08:22:36,794 WRN kickstart: Command keyboard will be parsed in DBus module.08:22:36,794 WRN kickstart: Command lang will be parsed in DBus module.08:22:36,794 WRN kickstart: Command selinux will be parsed in DBus module.08:22:36,795 WRN kickstart: Command bootloader will be parsed in DBus module.08:22:36,797 INF bootloader: bootloader EFIGRUB on EFI platform08:22:36,873 WRN kickstart: Command rootpw will be parsed in DBus module.08:22:36,876 INF flags: Not doing 'setup network module mode' in directory installation08:22:36,879 DBG main: Network module set up to not touch runtime system08:22:36,884 INF flags: Not doing 'activate keyboard' in directory installation08:22:36,906 DBG localization: setting locale to: en_US.UTF-808:22:36,906 INF flags: Not doing 'networkInitialize' in directory installation08:22:36,907 INF threading: Running Thread: AnaWaitForConnectingNMThread (140021088409344)08:22:36,908 INF flags: Not doing 'write user interaction config file' in directory installation08:22:36,908 DBG anaconda: setting display mode to TUI08:22:36,908 DBG anaconda: working in noninteractive mode08:22:36,916 WRN stdout: Not asking for VNC because of an automated install08:22:36,917 INF anaconda: Display mode is set to 'noninteractive text mode'.08:22:36,918 INF isys: 8130388 kB (7939 MB) are available08:22:36,923 INF startup_utils: check_memory(): total:7939, needed:320, graphical:41008:22:37,110 INF network: got 0 NTP servers from DHCP08:22:37,111 INF threading: Thread Done: AnaWaitForConnectingNMThread (140021088409344)08:22:37,159 DBG installclass: Searching /usr/lib64/python3.6/site-packages/pyanaconda/installclasses.08:22:37,179 DBG installclass: Found CentOS Linux (CentOSBaseInstallClass).08:22:37,179 DBG installclass: Found Red Hat Enterprise Linux (DefaultInstallClass).08:22:37,180 DBG installclass: Found Fedora (FedoraBaseInstallClass).08:22:37,180 DBG installclass: Found Atomic Host (AtomicHostInstallClass).08:22:37,180 DBG installclass: Found Fedora Server (FedoraServerInstallClass).08:22:37,180 DBG installclass: Found Fedora Workstation (FedoraWorkstationInstallClass).08:22:37,180 DBG installclass: Found Red Hat Enterprise Linux (RHELBaseInstallClass).08:22:37,180 DBG installclass: Found oVirt Node Next (OvirtInstallClass).08:22:37,180 DBG installclass: Found Red Hat Virtualization (RHEVInstallClass).08:22:37,180 DBG installclass: Found Scientific Linux (ScientificBaseInstallClass).08:22:37,180 INF installclass: Using a visible install class Red Hat Enterprise Linux (RHELBaseInstallClass).08:22:37,184 DBG storage: trying to set new default luks version to 'luks2'08:22:37,348 DBG payload: getting release version from tree at None (8.1)08:22:37,349 DBG payload: using default release version of 8.108:22:37,351 INF bootloader: bootloader EFIGRUB on EFI platform08:22:37,352 INF autopart: Detected 7.75 GiB of memory08:22:37,353 INF autopart: Suggested swap size (7.75 GiB) exceeds 10 % of disk space, using 10 % of disk space (0.0) instead.08:22:37,353 INF autopart: Swap attempt of 0.008:22:37,354 INF bootloader: bootloader EFIGRUB on EFI platform08:22:37,410 DBG storage_utils: LABEL=OEMDRV matches [] for devicetree=None and disks_only=True08:22:37,413 INF flags: Not doing 'initialize time' in directory installation08:22:37,450 DBG payload: Restarting payload thread08:22:37,451 INF threading: Running Thread: AnaPayloadRestartThread (140021088409344)08:22:37,451 INF geoloc: Geolocation is disabled for image or directory installation.08:22:37,451 INF geoloc: Geolocation is disabled for image or directory installation.08:22:37,451 INF flags: Not doing 'start chronyd' in directory installation08:22:37,452 INF threading: Running Thread: AnaPayloadThread (140020882605824)08:22:37,452 DBG payload: Updating payload thread state: 008:22:37,452 DBG payload: Updating payload thread state: 108:22:37,452 INF threading: Thread Done: AnaPayloadRestartThread (140021088409344)08:22:37,452 DBG payload: Updating payload thread state: 208:22:37,453 DBG payload: Updating payload thread state: 408:22:37,458 DBG simpleline: GLib event loop is used!08:22:37,475 DBG payload: retrieving treeinfo from http://localhost/rhel-8-for-x86_64-baseos-rpms (proxy:  ; sslverify: True)08:22:37,514 WRN payload: Install tree metadata can't be loaded!08:22:37,514 DBG payload: getting release version from tree at http://localhost/rhel-8-for-x86_64-baseos-rpms (8.1)08:22:37,514 DBG payload: using default release version of 8.108:22:37,859 DBG payload: Updating payload thread state: 508:22:37,865 INF core.util: Skipping detection of SMT.08:22:37,865 INF core.util: Skipping detection of unsupported hardware.08:22:37,901 INF lifecycle: Adding controller: SummaryHub08:22:38,695 INF lifecycle: Module initialized: LangSpoke08:22:38,699 INF lifecycle: Module initialized: TimeSpoke08:22:38,700 INF threading: Running Thread: AnaSourceWatcher (140020865296128)08:22:38,700 INF threading: Running Thread: AnaSoftwareWatcher (140021088409344)08:22:38,865 INF lifecycle: Module initialized: NetworkSpoke08:22:38,870 WRN ui.tui.hubs: Spoke StorageSpoke initialization failure!08:22:38,880 INF lifecycle: Module initialized: PasswordSpoke08:22:38,884 WRN ui.tui.hubs: Spoke PasswordSpoke initialization failure!08:22:38,885 INF lifecycle: Module initialized: UserSpoke08:22:38,886 WRN ui.tui.hubs: Spoke UserSpoke initialization failure!08:22:38,886 INF lifecycle: Initialization of all modules (7) has been started.08:22:45,801 INF payload: Refreshing environmentAddons08:22:45,951 DBG payload: Updating payload thread state: 608:22:45,951 DBG ui.tui.spokes.software_selection: Payload restarted, set new info and clear the old one.08:22:45,951 INF threading: Thread Done: AnaPayloadThread (140020882605824)08:22:45,951 INF lifecycle: Module initialized: SourceSpoke08:22:45,952 DBG ui.tui.spokes.software_selection: Apply called old env None, new env None and addons set()08:22:45,952 INF threading: Thread Done: AnaSourceWatcher (140020865296128)08:22:45,952 INF lifecycle: Module initialized: SoftwareSpoke08:22:45,953 INF lifecycle: All modules have been initialized.08:22:45,953 INF threading: Thread Done: AnaSoftwareWatcher (140021088409344)08:22:46,765 DBG simpleline: Scheduling screen SummaryHub08:22:46,766 DBG simpleline: New signal RenderScreenSignal enqueued with source ScreenScheduler08:22:46,767 DBG simpleline: Scheduling screen ProgressSpoke08:22:46,767 DBG simpleline: Starting main loop08:22:46,768 DBG simpleline: Processing screen ScreenData(SummaryHub,None,False)08:22:46,778 DBG payload: Source http://localhost/rhel-8-for-x86_64-baseos-rpms needs network for installation08:22:46,778 INF flags: Not doing 'require network connection' in directory installation08:22:46,778 INF flags: Not doing 'require network connection' in directory installation08:22:46,829 DBG simpleline: Input is required by ScreenData(SummaryHub,None,False) screen08:22:46,831 DBG payload: Source http://localhost/rhel-8-for-x86_64-baseos-rpms needs network for installation08:22:46,831 INF flags: Not doing 'require network connection' in directory installation08:22:46,831 DBG simpleline: New signal CloseScreenSignal enqueued with source SummaryHub08:22:46,831 DBG simpleline: Closing screen ScreenData(SummaryHub,None,False) from SummaryHub08:22:46,831 DBG simpleline: New signal RenderScreenSignal enqueued with source ScreenScheduler08:22:46,832 DBG simpleline: Processing screen ScreenData(ProgressSpoke,None,False)08:22:46,847 INF threading: Running Thread: AnaInstallThread (140021088409344)08:22:46,850 INF flags: Not doing 'save system time to HW clock' in directory installation08:22:46,854 INF flags: Not doing 'copy /etc/resolv.conf to sysroot' in directory installation08:22:46,855 INF installation: Top-level task queue: Installation queueNumber of task queues: 8Number of tasks: 15Task & task group listing: Task queue: Installation environment setup  Task: Setup addons Task queue: Early storage configuration  Task: Insert custom storage to ksdata  Task: Run pre-storage tasks  Task: Activate filesystems  Task: Write early storage Task queue: Pre-install scripts  Task: Run %pre-install scripts Task queue: Realm discover  Task: Discover realm to join Task queue: Pre install tasks  Task: Setup authselect  Task: Setup firewall  Task: Setup network  Task: Setup timezone  Task: Find additional packages & run preInstall() Task queue: Payload installation  Task: Install the payload Task queue: Late storage configuration  Task: Write late storage Task queue: Post-installation setup tasks  Task: Run post-installation setup tasks08:22:46,855 INF installation: Queue started: Installation environment setup (1/8)08:22:46,855 INF progress: Setting up the installation environment08:22:46,856 INF installation: Task started: Setup addons (1/15)08:22:46,856 WRN addons: Addon com_redhat_subscription_manager is using deprecated method signature08:22:46,856 WRN addons: Use setup(storage, ksdata, instClass, payload) instead08:22:46,856 DBG installation: Task completed: Setup addons (1/15) (0.0 s)08:22:46,856 INF progress: Setup addons08:22:46,856 INF installation: Queue started: Early storage configuration (2/8)08:22:46,857 INF progress: Configuring storage08:22:46,857 INF installation: Task started: Insert custom storage to ksdata (2/15)08:22:46,857 DBG installation: Task completed: Insert custom storage to ksdata (2/15) (0.0 s)08:22:46,857 INF progress: Insert custom storage to ksdata08:22:46,857 INF installation: Task started: Run pre-storage tasks (3/15)08:22:46,857 DBG installation: Task completed: Run pre-storage tasks (3/15) (0.0 s)08:22:46,858 INF progress: Run pre-storage tasks08:22:46,858 INF installation: Task started: Activate filesystems (4/15)08:22:49,080 DBG installation: Task completed: Activate filesystems (4/15) (2.2 s)08:22:49,081 INF progress: Activate filesystems08:22:49,081 INF installation: Task started: Write early storage (5/15)08:22:49,081 DBG installation: Task completed: Write early storage (5/15) (0.0 s)08:22:49,081 INF progress: Write early storage08:22:49,081 INF installation: Queue started: Pre-install scripts (3/8)08:22:49,082 INF progress: Running pre-installation scripts08:22:49,082 INF installation: Task started: Run %pre-install scripts (6/15)08:22:49,082 DBG installation: Task completed: Run %pre-install scripts (6/15) (0.0 s)08:22:49,082 INF progress: Run %pre-install scripts08:22:49,082 INF installation: Queue started: Realm discover (4/8)08:22:49,082 INF progress: Discovering realm to join08:22:49,083 INF installation: Task started: Discover realm to join (7/15)08:22:49,088 DBG installation: Task completed: Discover realm to join (7/15) (0.0 s)08:22:49,088 INF progress: Discover realm to join08:22:49,089 INF installation: Queue started: Pre install tasks (5/8)08:22:49,089 INF progress: Running pre-installation tasks08:22:49,089 INF installation: Task started: Setup authselect (8/15)08:22:49,094 DBG installation: Task completed: Setup authselect (8/15) (0.0 s)08:22:49,094 INF progress: Setup authselect08:22:49,095 INF installation: Task started: Setup firewall (9/15)08:22:49,098 DBG installation: Task completed: Setup firewall (9/15) (0.0 s)08:22:49,098 INF progress: Setup firewall08:22:49,098 INF installation: Task started: Setup network (10/15)08:22:49,119 DBG installation: Task completed: Setup network (10/15) (0.0 s)08:22:49,119 INF progress: Setup network08:22:49,120 INF installation: Task started: Setup timezone (11/15)08:22:49,256 DBG installation: Task completed: Setup timezone (11/15) (0.1 s)08:22:49,257 INF progress: Setup timezone08:22:49,257 INF installation: Task started: Find additional packages & run preInstall() (12/15)08:22:49,257 DBG payload: no package requirement added for storage08:22:49,257 DBG payload: no package requirement added for realm08:22:49,258 DBG payload: no package requirement added for authselect08:22:49,258 DBG payload: added package requirement 'firewalld' for firewall, strong=True08:22:49,258 DBG payload: no package requirement added for network08:22:49,258 DBG payload: added package requirement 'chrony' for ntp, strong=False08:22:49,265 DBG payload: no group requirement added for language groups08:22:49,272 DBG payload: added package requirement 'langpacks-en' for langpacks, strong=False08:22:49,297 DBG payload: added group requirement 'platform-vmware' for platform, strong=True08:22:49,302 DBG installation: Task completed: Find additional packages & run preInstall() (12/15) (0.0 s)08:22:49,302 INF progress: Find additional packages & run preInstall()08:22:49,303 INF installation: Queue started: Payload installation (6/8)08:22:49,303 INF progress: Installing.08:22:49,303 INF installation: Task started: Install the payload (13/15)08:22:49,304 INF progress: Starting package installation process08:22:50,138 DBG payload: apply with result True called on requirements [('package', 'firewalld', PayloadRequirement(id=firewalld, reasons=[PayloadRequirementReason(reason='firewall', strong=True)])), ('package', 'chrony', PayloadRequirement(id=chrony, reasons=[PayloadRequirementReason(reason='ntp', strong=False)])), ('package', 'langpacks-en', PayloadRequirement(id=langpacks-en, reasons=[PayloadRequirementReason(reason='langpacks', strong=False)])), ('group', 'platform-vmware', PayloadRequirement(id=platform-vmware, reasons=[PayloadRequirementReason(reason='platform', strong=True)]))]08:22:55,874 INF progress: Preparing transaction from installation source08:25:01,893 DBG installation: Task completed: Install the payload (13/15) (132.6 s)08:25:01,899 INF progress: Install the payload08:25:01,899 INF installation: Queue started: Late storage configuration (7/8)08:25:01,900 INF progress: Configuring storage08:25:01,900 INF installation: Task started: Write late storage (14/15)08:25:01,900 DBG installation: Task completed: Write late storage (14/15) (0.0 s)08:25:01,900 INF progress: Write late storage08:25:01,901 INF installation: Queue started: Post-installation setup tasks (8/8)08:25:01,901 INF progress: Performing post-installation setup tasks08:25:01,901 INF installation: Task started: Run post-installation setup tasks (15/15)08:25:01,943 DBG payload: The default target is already set.08:25:01,944 INF payload: Installation requirements: [('package', 'firewalld', PayloadRequirement(id=firewalld, reasons=[PayloadRequirementReason(reason='firewall', strong=True)])), ('package', 'chrony', PayloadRequirement(id=chrony, reasons=[PayloadRequirementReason(reason='ntp', strong=False)])), ('package', 'langpacks-en', PayloadRequirement(id=langpacks-en, reasons=[PayloadRequirementReason(reason='langpacks', strong=False)])), ('group', 'platform-vmware', PayloadRequirement(id=platform-vmware, reasons=[PayloadRequirementReason(reason='platform', strong=True)]))]08:25:01,946 DBG installation: Task completed: Run post-installation setup tasks (15/15) (0.0 s)08:25:01,946 INF progress: Run post-installation setup tasks08:25:01,946 INF threading: Thread Done: AnaInstallThread (140021088409344)08:25:01,947 INF threading: Running Thread: AnaConfigurationThread (140020873688832)08:25:01,955 INF installation: Not writing out user interaction config file due to directory install mode.08:25:01,956 INF installation: Top-level task queue: Configuration queueNumber of task queues: 6Number of tasks: 18Task & task group listing: Task queue: Installed system configuration  Task: Configure authselect  Task: Configure SELinux  Task: Configure first boot tasks  Task: Configure services  Task: Configure keyboard  Task: Configure timezone  Task: Configure language  Task: Configure firewall  Task: Configure X  Task: Configure system purpose Task queue: User creation  Task: Configure root  Task: Configure user groups  Task: Configure user  Task: Configure SSH key Task queue: Anaconda addon configuration  Task: Configure Anaconda addons Task queue: Initramfs generation  Task: Generate initramfs Task queue: Post installation scripts  Task: Run post installation scripts Task queue: Write configs and kickstarts  Task: Store kickstarts08:25:01,957 INF progress: Configuring installed system08:25:01,957 INF installation: Queue started: Installed system configuration (1/6)08:25:01,957 INF installation: Task started: Configure authselect (1/18)08:25:01,962 INF progress: Configure authselect08:25:01,962 DBG installation: Task completed: Configure authselect (1/18) (0.0 s)08:25:01,962 INF installation: Task started: Configure SELinux (2/18)08:25:01,967 INF progress: Configure SELinux08:25:01,967 DBG installation: Task completed: Configure SELinux (2/18) (0.0 s)08:25:01,967 INF installation: Task started: Configure first boot tasks (3/18)08:25:01,970 DBG kickstart: The initial-setup.service service will be disabled.08:25:02,089 INF progress: Configure first boot tasks08:25:02,090 DBG installation: Task completed: Configure first boot tasks (3/18) (0.1 s)08:25:02,090 INF installation: Task started: Configure services (4/18)08:25:02,095 DBG kickstart: Enabling the service chronyd.08:25:02,113 INF progress: Configure services08:25:02,113 DBG installation: Task completed: Configure services (4/18) (0.0 s)08:25:02,113 INF installation: Task started: Configure keyboard (5/18)08:25:02,636 INF progress: Configure keyboard08:25:02,636 DBG installation: Task completed: Configure keyboard (5/18) (0.5 s)08:25:02,637 INF installation: Task started: Configure timezone (6/18)08:25:02,828 INF progress: Configure timezone08:25:02,829 DBG installation: Task completed: Configure timezone (6/18) (0.2 s)08:25:02,829 INF installation: Task started: Configure language (7/18)08:25:02,871 INF progress: Configure language08:25:02,871 DBG installation: Task completed: Configure language (7/18) (0.0 s)08:25:02,871 INF installation: Task started: Configure firewall (8/18)08:25:03,535 INF progress: Configure firewall08:25:03,536 DBG installation: Task completed: Configure firewall (8/18) (0.7 s)08:25:03,536 INF installation: Task started: Configure X (9/18)08:25:03,542 DBG kickstart: Using the default target multi-user.target.08:25:03,542 DBG desktop: Setting systemd default target to: multi-user.target08:25:03,542 INF progress: Configure X08:25:03,543 DBG installation: Task completed: Configure X (9/18) (0.0 s)08:25:03,543 INF installation: Task started: Configure system purpose (10/18)08:25:03,552 INF progress: Configure system purpose08:25:03,552 DBG installation: Task completed: Configure system purpose (10/18) (0.0 s)08:25:03,553 INF progress: Creating users08:25:03,553 INF installation: Queue started: User creation (2/6)08:25:03,553 INF installation: Task started: Configure root (11/18)08:25:03,561 INF users: user account root setup with no password08:25:03,561 INF users: user account root locked08:25:03,692 INF progress: Configure root08:25:03,692 DBG installation: Task completed: Configure root (11/18) (0.1 s)08:25:03,693 INF installation: Task started: Configure user groups (12/18)08:25:03,694 INF progress: Configure user groups08:25:03,694 DBG installation: Task completed: Configure user groups (12/18) (0.0 s)08:25:03,694 INF installation: Task started: Configure user (13/18)08:25:03,831 INF progress: Configure user08:25:03,832 DBG installation: Task completed: Configure user (13/18) (0.1 s)08:25:03,832 INF installation: Task started: Configure SSH key (14/18)08:25:03,832 INF progress: Configure SSH key08:25:03,833 DBG installation: Task completed: Configure SSH key (14/18) (0.0 s)08:25:03,833 INF progress: Configuring addons08:25:03,834 INF installation: Queue started: Anaconda addon configuration (3/6)08:25:03,834 INF installation: Task started: Configure Anaconda addons (15/18)08:25:03,834 INF progress: Executing com_redhat_subscription_manager addon08:25:03,834 WRN addons: Addon com_redhat_subscription_manager is using deprecated method signature08:25:03,834 WRN addons: Use execute(storage, ksdata, instClass, users, payload) instead08:25:03,835 INF progress: Configure Anaconda addons08:25:03,835 DBG installation: Task completed: Configure Anaconda addons (15/18) (0.0 s)08:25:03,836 INF progress: Generating initramfs08:25:03,836 INF installation: Queue started: Initramfs generation (4/6)08:25:03,836 INF installation: Task started: Generate initramfs (16/18)08:25:03,836 WRN payload: new-kernel-pkg does not exist - grubby wasn't installed?  using dracut instead.08:25:03,908 INF payload: recreating initrd for 4.18.0-147.8.1.el8_1.x86_6408:25:19,069 INF progress: Generate initramfs08:25:19,069 DBG installation: Task completed: Generate initramfs (16/18) (15.2 s)08:25:19,070 INF progress: Running post-installation scripts08:25:19,071 INF installation: Queue started: Post installation scripts (5/6)08:25:19,071 INF installation: Task started: Run post installation scripts (17/18)08:25:19,071 INF kickstart.script: Running kickstart %%post script(s)08:25:19,624 INF kickstart.script: All kickstart %%post script(s) have been run08:25:19,624 INF progress: Run post installation scripts08:25:19,624 DBG installation: Task completed: Run post installation scripts (17/18) (0.6 s)08:25:19,625 INF progress: Storing configuration files and kickstarts08:25:19,625 INF installation: Queue started: Write configs and kickstarts (6/6)08:25:19,626 INF installation: Task started: Store kickstarts (18/18)08:25:19,705 INF progress: Store kickstarts08:25:19,705 DBG installation: Task completed: Store kickstarts (18/18) (0.1 s)08:25:19,706 INF threading: Thread Done: AnaConfigurationThread (140020873688832)08:25:19,708 DBG simpleline: Main loop ended. Running callback if set.08:25:19,962 DBG payload: getting release version from tree at None (8.1)08:25:19,962 DBG payload: using default release version of 8.1

attempting to install new kernel, error modules.order & Makefile Error 2

$
0
0

Attempting to install a new kernel.once it is compiled, I enter:

su -c "make modules_install install"

this error populates :

sed: can't read modules.order: No such file or directorymake[1]: *** [Makefile:1304: _modinst_] Error 2make: *** [Makefile:327: __build_one_by_one] Error 2

What is the solution?

Incomplete LSB comment. insserv: missing valid name for `Provides:' please add

$
0
0

recently I installed: Debian x86_64, oracle 11g and OCI8. I'd like to turn automatic the shell script below, but I received the following message error:

root@debian:/etc/init.d# uname -aLinux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux

root@debian:/etc/init.d# update-rc.d oracle-shm defaultsupdate-rc.d: using dependency based boot sequencinginsserv: Script oracle-shm is broken: incomplete LSB comment.insserv: missing valid name for `Provides:' please add.

Looking my configuration file it has the comment necessary, as you can see below.

#! /bin/shcase "$1" instart)  echo "Starting script /etc/init.d/oracle-shm"  # Run only once at system startup  rm -rf /dev/shm  mkdir /dev/shm  mount -t tmpfs shmfs -o size=2048m /dev/shm  touch /dev/shm/.oracle-shm  ;;stop)  echo "Stopping script /etc/init.d/oracle-shm"  echo "Nothing to do"  ;;*)  echo "Usage: /etc/init.d/oracle-shm {start|stop}"  exit 1  ;;esac#### BEGIN INIT INFO# Provides:          oracle-shm# Required-Start:    $remote_fs $syslog# Required-Stop:     $remote_fs $syslog# Default-Start:     2 3 4 5# Default-Stop:      0 1 6# Short-Description: Bind /run/shm to /dev/shm at system startup.# Description:       Fix to allow Oracle 11g use AMM.### END INIT

Could you please guide me to solve it? Thanks a lot! Marcos

Driver taints kernel and can't be unloaded

$
0
0

I have built a kernel module which is causing some problem. Some time after loading it, the driver stops working and at that moment, when I try to use rmmod to unload it, it blocks and I have to manually restart my device. I have managed to get this trace by using the main console of my card with a USB-TTL connexion:

Probe: Successfulxeno_sprinte_ida on AUART3: physical address=0x80070000 membase=0xc8e3c000 irq=234 uartclk=24000000Init: Successful------------[ cut here ]------------------------[ cut here ]------------WARNING: CPU: 0 PID: 825 at drivers/clk/clk.c:130 clk_enable_lock+0x98/0xd4Modules linked in: moduleXenoUartSimple(O-) snd_soc_mxs_sgtl5000 snd_soc_sgtl5000 snd_soc_mxs snd_soc_mxs_pcm snd_soc_core snd_pcm_dmaengine snd_pcm snd_timer snd soundcore ums_alauda uas ums_onetouch ums_cypress ums_karma ums_jumpshot ums_eneub6250 firmware_class ums_usbat ums_sddr55 ums_sddr09 ums_freecom ums_datafab ums_isd200 ums_realtek usb_storage scsi_mod ci_hdrc_usb2 ci_hdrc_imx usbmisc_imx ci_hdrc ehci_hcd usbmon usbcore usb_common mxs_mmc sdhci_pltfm sdhci mmc_block mmc_core jffs2 ntfs ext2 vfat fat ipv6 lm75 hwmon fuse xeno_udd xeno_rtipc xeno_can_flexcan xeno_can [last unloaded: moduleXenoUartSimple]CPU: 0 PID: 825 Comm: rmmod Tainted: G           O    4.9.24-ipipe-SPOS-0.2 #1Hardware name: Freescale MXS (Device Tree)I-pipe domain: Linux[<c000f540>] (unwind_backtrace) from [<c000d5d0>] (show_stack+0x10/0x14)[<c000d5d0>] (show_stack) from [<c0018cb0>] (__warn+0xd4/0xfc)[<c0018cb0>] (__warn) from [<c0018d88>] (warn_slowpath_null+0x20/0x28)[<c0018d88>] (warn_slowpath_null) from [<c0250dfc>] (clk_enable_lock+0x98/0xd4)[<c0250dfc>] (clk_enable_lock) from [<c0252500>] (clk_core_enable_lock+0xc/0x2c)[<c0252500>] (clk_core_enable_lock) from [<c0282ac0>] (pl011_console_write+0x20/0x1ac)[<c0282ac0>] (pl011_console_write) from [<c00480f0>] (call_console_drivers.constprop.11+0x98/0xac)[<c00480f0>] (call_console_drivers.constprop.11) from [<c0049104>] (console_unlock+0x2d0/0x6f0)[<c0049104>] (console_unlock) from [<c00497e4>] (vprintk_emit+0x2c0/0x49c)[<c00497e4>] (vprintk_emit) from [<c0049b4c>] (vprintk_default+0x20/0x28)[<c0049b4c>] (vprintk_default) from [<c00ade9c>] (printk+0xe8/0x188)[<c00ade9c>] (printk) from [<c0018c04>] (__warn+0x28/0xfc)[<c0018c04>] (__warn) from [<c0018d88>] (warn_slowpath_null+0x20/0x28)[<c0018d88>] (warn_slowpath_null) from [<c0252464>] (clk_core_disable_lock+0x18/0x24)[<c0252464>] (clk_core_disable_lock) from [<bf2fc184>] (rt_mxs_auart_remove+0x1c/0x54 [moduleXenoUartSimple])[<bf2fc184>] (rt_mxs_auart_remove [moduleXenoUartSimple]) from [<c028f620>] (__device_release_driver+0x70/0xfc)[<c028f620>] (__device_release_driver) from [<c028feb8>] (driver_detach+0xfc/0x100)[<c028feb8>] (driver_detach) from [<c028f1f4>] (bus_remove_driver+0x4c/0xa0)[<c028f1f4>] (bus_remove_driver) from [<bf2fcdd8>] (rt_mxs_auart_exit+0xc/0x20 [moduleXenoUartSimple])[<bf2fcdd8>] (rt_mxs_auart_exit [moduleXenoUartSimple]) from [<c006fd5c>] (SyS_delete_module+0x15c/0x1cc)[<c006fd5c>] (SyS_delete_module) from [<c000a500>] (ret_fast_syscall+0x0/0x38)---[ end trace 94d65edb72d57359 ]---------------[ cut here ]------------WARNING: CPU: 0 PID: 825 at drivers/clk/clk.c:131 clk_enable_lock+0xc0/0xd4Modules linked in: moduleXenoUartSimple(O-) snd_soc_mxs_sgtl5000 snd_soc_sgtl5000 snd_soc_mxs snd_soc_mxs_pcm snd_soc_core snd_pcm_dmaengine snd_pcm snd_timer snd soundcore ums_alauda uas ums_onetouch ums_cypress ums_karma ums_jumpshot ums_eneub6250 firmware_class ums_usbat ums_sddr55 ums_sddr09 ums_freecom ums_datafab ums_isd200 ums_realtek usb_storage scsi_mod ci_hdrc_usb2 ci_hdrc_imx usbmisc_imx ci_hdrc ehci_hcd usbmon usbcore usb_common mxs_mmc sdhci_pltfm sdhci mmc_block mmc_core jffs2 ntfs ext2 vfat fat ipv6 lm75 hwmon fuse xeno_udd xeno_rtipc xeno_can_flexcan xeno_can [last unloaded: moduleXenoUartSimple]CPU: 0 PID: 825 Comm: rmmod Tainted: G        W  O    4.9.24-ipipe-SPOS-0.2 #1Hardware name: Freescale MXS (Device Tree)I-pipe domain: Linux[<c000f540>] (unwind_backtrace) from [<c000d5d0>] (show_stack+0x10/0x14)[<c000d5d0>] (show_stack) from [<c0018cb0>] (__warn+0xd4/0xfc)[<c0018cb0>] (__warn) from [<c0018d88>] (warn_slowpath_null+0x20/0x28)[<c0018d88>] (warn_slowpath_null) from [<c0250e24>] (clk_enable_lock+0xc0/0xd4)[<c0250e24>] (clk_enable_lock) from [<c0252500>] (clk_core_enable_lock+0xc/0x2c)[<c0252500>] (clk_core_enable_lock) from [<c0282ac0>] (pl011_console_write+0x20/0x1ac)[<c0282ac0>] (pl011_console_write) from [<c00480f0>] (call_console_drivers.constprop.11+0x98/0xac)[<c00480f0>] (call_console_drivers.constprop.11) from [<c0049104>] (console_unlock+0x2d0/0x6f0)[<c0049104>] (console_unlock) from [<c00497e4>] (vprintk_emit+0x2c0/0x49c)[<c00497e4>] (vprintk_emit) from [<c0049b4c>] (vprintk_default+0x20/0x28)[<c0049b4c>] (vprintk_default) from [<c00ade9c>] (printk+0xe8/0x188)[<c00ade9c>] (printk) from [<c0018c04>] (__warn+0x28/0xfc)[<c0018c04>] (__warn) from [<c0018d88>] (warn_slowpath_null+0x20/0x28)[<c0018d88>] (warn_slowpath_null) from [<c0252464>] (clk_core_disable_lock+0x18/0x24)[<c0252464>] (clk_core_disable_lock) from [<bf2fc184>] (rt_mxs_auart_remove+0x1c/0x54 [moduleXenoUartSimple])[<bf2fc184>] (rt_mxs_auart_remove [moduleXenoUartSimple]) from [<c028f620>] (__device_release_driver+0x70/0xfc)[<c028f620>] (__device_release_driver) from [<c028feb8>] (driver_detach+0xfc/0x100)[<c028feb8>] (driver_detach) from [<c028f1f4>] (bus_remove_driver+0x4c/0xa0)[<c028f1f4>] (bus_remove_driver) from [<bf2fcdd8>] (rt_mxs_auart_exit+0xc/0x20 [moduleXenoUartSimple])[<bf2fcdd8>] (rt_mxs_auart_exit [moduleXenoUartSimple]) from [<c006fd5c>] (SyS_delete_module+0x15c/0x1cc)[<c006fd5c>] (SyS_delete_module) from [<c000a500>] (ret_fast_syscall+0x0/0x38)---[ end trace 94d65edb72d5735a ]---WARNING: CPU: 0 PID: 825 at drivers/clk/clk.c:594 clk_core_disable_lock+0x18/0x24Modules linked in: moduleXenoUartSimple(O-) snd_soc_mxs_sgtl5000 snd_soc_sgtl5000 snd_soc_mxs snd_soc_mxs_pcm snd_soc_core snd_pcm_dmaengine snd_pcm snd_timer snd soundcore ums_alauda uas ums_onetouch ums_cypress ums_karma ums_jumpshot ums_eneub6250 firmware_class ums_usbat ums_sddr55 ums_sddr09 ums_freecom ums_datafab ums_isd200 ums_realtek usb_storage scsi_mod ci_hdrc_usb2 ci_hdrc_imx usbmisc_imx ci_hdrc ehci_hcd usbmon usbcore usb_common mxs_mmc sdhci_pltfm sdhci mmc_block mmc_core jffs2 ntfs ext2 vfat fat ipv6 lm75 hwmon fuse xeno_udd xeno_rtipc xeno_can_flexcan xeno_can [last unloaded: moduleXenoUartSimple]CPU: 0 PID: 825 Comm: rmmod Tainted: G        W  O    4.9.24-ipipe-SPOS-0.2 #1Hardware name: Freescale MXS (Device Tree)I-pipe domain: Linux[<c000f540>] (unwind_backtrace) from [<c000d5d0>] (show_stack+0x10/0x14)[<c000d5d0>] (show_stack) from [<c0018cb0>] (__warn+0xd4/0xfc)[<c0018cb0>] (__warn) from [<c0018d88>] (warn_slowpath_null+0x20/0x28)[<c0018d88>] (warn_slowpath_null) from [<c0252464>] (clk_core_disable_lock+0x18/0x24)[<c0252464>] (clk_core_disable_lock) from [<bf2fc184>] (rt_mxs_auart_remove+0x1c/0x54 [moduleXenoUartSimple])[<bf2fc184>] (rt_mxs_auart_remove [moduleXenoUartSimple]) from [<c028f620>] (__device_release_driver+0x70/0xfc)[<c028f620>] (__device_release_driver) from [<c028feb8>] (driver_detach+0xfc/0x100)[<c028feb8>] (driver_detach) from [<c028f1f4>] (bus_remove_driver+0x4c/0xa0)[<c028f1f4>] (bus_remove_driver) from [<bf2fcdd8>] (rt_mxs_auart_exit+0xc/0x20 [moduleXenoUartSimple])[<bf2fcdd8>] (rt_mxs_auart_exit [moduleXenoUartSimple]) from [<c006fd5c>] (SyS_delete_module+0x15c/0x1cc)[<c006fd5c>] (SyS_delete_module) from [<c000a500>] (ret_fast_syscall+0x0/0x38)---[ end trace 94d65edb72d5735b ]---------------[ cut here ]------------WARNING: CPU: 0 PID: 825 at drivers/clk/clk.c:140 clk_enable_unlock+0xb0/0xf8Modules linked in: moduleXenoUartSimple(O-) snd_soc_mxs_sgtl5000 snd_soc_sgtl5000 snd_soc_mxs snd_soc_mxs_pcm snd_soc_core snd_pcm_dmaengine snd_pcm snd_timer snd soundcore ums_alauda uas ums_onetouch ums_cypress ums_karma ums_jumpshot ums_eneub6250 firmware_class ums_usbat ums_sddr55 ums_sddr09 ums_freecom ums_datafab ums_isd200 ums_realtek usb_storage scsi_mod ci_hdrc_usb2 ci_hdrc_imx usbmisc_imx ci_hdrc ehci_hcd usbmon usbcore usb_common mxs_mmc sdhci_pltfm sdhci mmc_block mmc_core jffs2 ntfs ext2 vfat fat ipv6 lm75 hwmon fuse xeno_udd xeno_rtipc xeno_can_flexcan xeno_can [last unloaded: moduleXenoUartSimple]CPU: 0 PID: 825 Comm: rmmod Tainted: G        W  O    4.9.24-ipipe-SPOS-0.2 #1Hardware name: Freescale MXS (Device Tree)I-pipe domain: Linux[<c000f540>] (unwind_backtrace) from [<c000d5d0>] (show_stack+0x10/0x14)[<c000d5d0>] (show_stack) from [<c0018cb0>] (__warn+0xd4/0xfc)[<c0018cb0>] (__warn) from [<c0018d88>] (warn_slowpath_null+0x20/0x28)[<c0018d88>] (warn_slowpath_null) from [<c0252404>] (clk_enable_unlock+0xb0/0xf8)[<c0252404>] (clk_enable_unlock) from [<bf2fc184>] (rt_mxs_auart_remove+0x1c/0x54 [moduleXenoUartSimple])[<bf2fc184>] (rt_mxs_auart_remove [moduleXenoUartSimple]) from [<c028f620>] (__device_release_driver+0x70/0xfc)[<c028f620>] (__device_release_driver) from [<c028feb8>] (driver_detach+0xfc/0x100)[<c028feb8>] (driver_detach) from [<c028f1f4>] (bus_remove_driver+0x4c/0xa0)[<c028f1f4>] (bus_remove_driver) from [<bf2fcdd8>] (rt_mxs_auart_exit+0xc/0x20 [moduleXenoUartSimple])[<bf2fcdd8>] (rt_mxs_auart_exit [moduleXenoUartSimple]) from [<c006fd5c>] (SyS_delete_module+0x15c/0x1cc)[<c006fd5c>] (SyS_delete_module) from [<c000a500>] (ret_fast_syscall+0x0/0x38)---[ end trace 94d65edb72d5735c ]---------------[ cut here ]------------WARNING: CPU: 0 PID: 825 at drivers/clk/clk.c:141 clk_enable_unlock+0xe4/0xf8Modules linked in: moduleXenoUartSimple(O-) snd_soc_mxs_sgtl5000 snd_soc_sgtl5000 snd_soc_mxs snd_soc_mxs_pcm snd_soc_core snd_pcm_dmaengine snd_pcm snd_timer snd soundcore ums_alauda uas ums_onetouch ums_cypress ums_karma ums_jumpshot ums_eneub6250 firmware_class ums_usbat ums_sddr55 ums_sddr09 ums_freecom ums_datafab ums_isd200 ums_realtek usb_storage scsi_mod ci_hdrc_usb2 ci_hdrc_imx usbmisc_imx ci_hdrc ehci_hcd usbmon usbcore usb_common mxs_mmc sdhci_pltfm sdhci mmc_block mmc_core jffs2 ntfs ext2 vfat fat ipv6 lm75 hwmon fuse xeno_udd xeno_rtipc xeno_can_flexcan xeno_can [last unloaded: moduleXenoUartSimple]CPU: 0 PID: 825 Comm: rmmod Tainted: G        W  O    4.9.24-ipipe-SPOS-0.2 #1Hardware name: Freescale MXS (Device Tree)I-pipe domain: Linux[<c000f540>] (unwind_backtrace) from [<c000d5d0>] (show_stack+0x10/0x14)[<c000d5d0>] (show_stack) from [<c0018cb0>] (__warn+0xd4/0xfc)[<c0018cb0>] (__warn) from [<c0018d88>] (warn_slowpath_null+0x20/0x28)[<c0018d88>] (warn_slowpath_null) from [<c0252438>] (clk_enable_unlock+0xe4/0xf8)[<c0252438>] (clk_enable_unlock) from [<bf2fc184>] (rt_mxs_auart_remove+0x1c/0x54 [moduleXenoUartSimple])[<bf2fc184>] (rt_mxs_auart_remove [moduleXenoUartSimple]) from [<c028f620>] (__device_release_driver+0x70/0xfc)[<c028f620>] (__device_release_driver) from [<c028feb8>] (driver_detach+0xfc/0x100)[<c028feb8>] (driver_detach) from [<c028f1f4>] (bus_remove_driver+0x4c/0xa0)[<c028f1f4>] (bus_remove_driver) from [<bf2fcdd8>] (rt_mxs_auart_exit+0xc/0x20 [moduleXenoUartSimple])[<bf2fcdd8>] (rt_mxs_auart_exit [moduleXenoUartSimple]) from [<c006fd5c>] (SyS_delete_module+0x15c/0x1cc)[<c006fd5c>] (SyS_delete_module) from [<c000a500>] (ret_fast_syscall+0x0/0x38)---[ end trace 94d65edb72d5735d ]---

This doesn't always happen and sometimes I can rmmod it without any problem. I suspect that this is related to the clock because of the message WARNING: CPU: 0 PID: 825 at drivers/clk/clk.c:130 clk_enable_lock

If useful, here is part of the driver code that I'm using (inspired by mxs-auart.c and rt_imx_uart.c)

MODULE_LICENSE("GPL");MODULE_DESCRIPTION("IMX28 UART RTDM driver");struct rt_mxs_auart_port {    unsigned long flags;    unsigned int mctrl_prev;    enum mxs_auart_type devtype;    const struct vendor_data *vendor;    struct clk *clk;    struct clk *clk_ahb;    unsigned char __iomem *membase; /* read/write[bwl] */    resource_size_t     mapbase;        /* for ioremap */    unsigned int irq;       /* irq number */    int fifosize;            /* TX fifo size*/    unsigned int uartclk;       /* base uart clock */    struct rtdm_device rtdm_dev;    /* RTDM device structure */};static int mxs_get_clks(struct rt_mxs_auart_port *s, struct platform_device *pdev){    int err;    if (!is_asm9260_auart(s)) {        s->clk = devm_clk_get(&pdev->dev, NULL);        return PTR_ERR_OR_ZERO(s->clk);    }    s->clk = devm_clk_get(&pdev->dev, "mod");    if (IS_ERR(s->clk)) {        pr_err("Failed to get \"mod\" clk\n");        return PTR_ERR(s->clk);    }    s->clk_ahb = devm_clk_get(&pdev->dev, "ahb");    if (IS_ERR(s->clk_ahb)) {        pr_err("Failed to get \"ahb\" clk\n");        return PTR_ERR(s->clk_ahb);    }    err = clk_prepare_enable(s->clk_ahb);    if (err) {        pr_err("Failed to enable ahb_clk!\n");        return err;    }    /*    err = clk_set_rate(s->clk, clk_get_rate(s->clk_ahb));    if (err) {        dev_err(s->dev, "Failed to set rate!\n");        goto disable_clk_ahb;    }    */    err = clk_prepare_enable(s->clk);    if (err) {        pr_err("Failed to enable clk!\n");        goto disable_clk_ahb;    }    return 0;disable_clk_ahb:    clk_disable_unprepare(s->clk_ahb);    return err;}static int rt_serial_mxs_probe_dt(struct rt_mxs_auart_port *s,        struct platform_device *pdev){    struct device_node *np = pdev->dev.of_node;    int ret;    if (!np)        /* no device tree device */        return 1;    ret = of_alias_get_id(np, "serial");    if (ret < 0) {        dev_err(&pdev->dev, "failed to get alias id: %d\n", ret);        return ret;    }    pdev->id = ret;    //s->port.line = ret;    return 0;}static int rt_mxs_auart_probe(struct platform_device *pdev){    const struct of_device_id *of_id =            of_match_device(mxs_auart_dt_ids, &pdev->dev);    //u32 version;    int ret;    //int irq;    struct resource *r;    //we're adding this    struct rtdm_device *dev;    struct rt_mxs_auart_port *s;    //allocate managed kernel memory    s = devm_kzalloc(&pdev->dev, sizeof(*s), GFP_KERNEL);    if (!s)        return -ENOMEM;    //s->port.dev = &pdev->dev;    //s->dev = &pdev->dev;    ret = rt_serial_mxs_probe_dt(s, pdev);    if (ret > 0)        pr_info("If ret>0\n");        //s->port.line = pdev->id < 0 ? 0 : pdev->id;//what do we do here?    else if (ret < 0){        return ret;        }    if (of_id) {        pdev->id_entry = of_id->data;        //s->devdata = of_id->data;        s->devtype = pdev->id_entry->driver_data;    }    r = platform_get_resource(pdev, IORESOURCE_MEM, 0);    if (!r)        return -ENXIO;    //get irq line    s->irq = platform_get_irq(pdev, 0);    if (s->irq < 0)        return -ENODEV;    //base memory    //s->membase = devm_ioremap_resource(&pdev->dev, r);    s->membase = ioremap(r->start, resource_size(r));    if (IS_ERR(s->membase))        return PTR_ERR(s->membase);    /*define the rtdm_device*/    dev = &s->rtdm_dev;    dev->driver = &ida_driver;    dev->label = "xeno_sprinte_ida";    dev->device_data = s;    ret = mxs_get_clks(s, pdev); //activate clocks    if (ret)        return ret;    s->uartclk = clk_get_rate(s->clk);    s->fifosize = MXS_AUART_FIFO_SIZE;    mxs_init_regs(s);    ret = rtdm_dev_register(dev); //register driver in RTDM space    if (ret)        return ret;    platform_set_drvdata(pdev, s); //add device-related data to device struct    pr_info("Probe: Successful\n");    pr_info("%s on AUART%d: physical address=0x%p membase=0x%p irq=%d uartclk=%d\n",           dev->name, pdev->id, r, s->membase, s->irq, s->uartclk);    return 0;}static int rt_mxs_auart_remove(struct platform_device *pdev){    struct rt_mxs_auart_port *s = platform_get_drvdata(pdev);    struct rtdm_device *dev = &s->rtdm_dev;    platform_set_drvdata(pdev, NULL);    clk_disable_unprepare(s->clk);    clk_disable_unprepare(s->clk_ahb);    rtdm_dev_unregister(dev);    pr_info("Remove: Successful\n");    return 0;}static struct platform_driver rt_mxs_auart_driver = {    .probe = rt_mxs_auart_probe,    .remove = rt_mxs_auart_remove,    .driver = {        .name = "xeno_sprinte_ida",        .of_match_table = mxs_auart_dt_ids,    },};static int __init rt_mxs_auart_init(void){    int ret;    /*what library to include?    if (!rtdm_available())    return -ENODEV;    */    ret = platform_driver_register(&rt_mxs_auart_driver);    if (ret) {        pr_err("%s; Could not register  driver (err=%d)\n",            __func__, ret);    }    pr_info("Init: Successful\n");    return ret;}static void __exit rt_mxs_auart_exit(void){    platform_driver_unregister(&rt_mxs_auart_driver);    pr_info("Exit: Successful\n");}module_init(rt_mxs_auart_init);module_exit(rt_mxs_auart_exit);

Does anyone have an idea?Thanks!

How to use wifi on kali linux bootable usb? [closed]

$
0
0

I have recently made my usb bootable and have burnt kali linux os on it.The boot is working pretty fine but I want wifi access since I'm using a laptop.Searched alot on youtube and google but didn't find anything.

Can anyone solve my query by providing step wise solution on how to access wifi in this scenario??

Is there a linux C function to get the file struct from the filename

$
0
0

I am attempting to make a system call that takes the filename as input and edits a tag that I will place the file struct . However, I cannot figure out how to find the file from the filename (it is required to do it this way for my class). I figure there is a syscall or function that exists to do it, but I am having trouble finding it.

Viewing all 12260 articles
Browse latest View live


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