Hot answers tagged

213

All modern CPUs have the capacity to interrupt the currently-executing machine instruction. They save enough state (usually, but not always, on the stack) to make it possible to resume execution later, as if nothing had happened (the interrupted instruction will be restarted from scratch, usually). Then they start executing an interrupt handler, which is ...


37

The shell does indeed have something to do with that message, and crsh indirectly calls a shell, which is probably bash. I wrote a small C program that always seg faults: #include <stdio.h> int main(int ac, char **av) { int *i = NULL; *i = 12; return 0; } When I run it from my default shell, zsh, I get this: 4 % ./segv ...


18

I can't seem to find any information on this aside from "the CPU's MMU sends a signal" and "the kernel directs it to the offending program, terminating it". This is a bit of a garbled summary. The Unix signal mechanism is entirely different from the CPU-specific events that start the process. In general, when a bad address is accessed (or written to a ...


17

A segmentation fault is an access to a memory address that isn't allowed (not part of the process, or trying to write read-only data, or execute non-executable data, ...). This is caught by the MMU (Memory Management Unit, today part of the CPU), causing an interrupt. The interrupt is handled by the kernel, which sends a SIGSEGFAULT signal (see signal(2) for ...


15

The entire kernel is loaded into memory at boot, typically along with an initramfs nowadays. (It is still possible to set up a system to boot without an initramfs but that's unusual on desktops and servers.) The initramfs's role is to provide the functionality needed to mount the "real" filesystems and continue booting the system. That involves kernel ...


5

The entire kernel (but not its modules) will be loaded into memory. If there are modules which the kernel will need before any filesystems are available (this usually means the drivers for the filesystems and their devices), then those modules will be in the initramfs (in memory), and the kernel will load them from there. Other modules can be loaded later ...


4

NetBSD has documentation here: Part V. Building the system You might be able to compile a NetBSD kernel on OSX. At a minimum, you would need the kernel source tree, i.e., /sys (which at least does not conflict with OSX's system directories). whatever tools are needed, you probably have to download source and compile those. build.sh is only a small part ...


3

All but the root bus (which is typically a platform bus, e.g. ACPI on PCs) are bridged off the root bus, and their order depends on enumeration. Now normally bus enumeration is mostly deterministic as the order in which devices on the bus are found is normally static, but there is no guarantee for that, and when two bus bridges are chained, enumeration is ...


2

Your code's exit() call ends up getting linked to the C library (libc) function exit(), which may not actually do the int $0x80. The call from your code's invocation of exit() function is actually compiled as call instruction into the Program Linkage Table, or PLT. The run-time dynamic linker takes care of mapping the file /usr/lib/libc.so into memory. ...


2

Speaking about Debian-derived distributions: They can differentiate multiple architectures within the same repository (including 32bit vs 64bit). The kernel modules are stored in a kernel-specific tree /lib/modules/$(uname -r)/ so you could build a package that included a module for all your possible different kernel versions and the right one would be ...


2

In the good old times of ISA sound cards, it was not possible to create device nodes in /dev/ dynamically, so all devices had to be preallocated. This resulted in a limit of 8 sound cards, and the drivers were written with this limit in mind. Later, when devfs and USB were introduced, this limit was removed. However, the easiest way to do this was to make ...


2

450MB is not much for a root+boot partition on a modern amd64 system. If you want to install multiple kernels, you're going to have to reorganize your partitions. Even if you don't, it's pretty tight. Given the partitions you have now, I suggest moving the root partition to what is now /var. Since you're going to move the root partition, boot from rescue ...


2

The kernel in modern Linux setups is heavily module based, i.e., the kernel proper (loaded on boot into RAM) includes just the bare minimum functionality, all the rest is compiled as modules (loadable at runtime). To make this work even when e.g. the devices or filesystems required for boot are modules, an initramfs is loaded with the kernel (as the name ...


1

1ms is plenty to generate a few Ethernet frames, but on a typical Linux system, you can't count on not having the occasional pause. Even if you make your process high-priority, I don't think you can expect to always make a 1ms deadline. RTLinux combines a real-time operating system with Linux. Linux runs as a non-real-time-priority task in the real-time ...


1

In the first Linux diagram, above the "device driver" part; same for Bovet's diagram. When writing an operating system, you want to keep the device-dependent parts as isolated as possible, so you can add further devices cleanly. In Linux' case, "device driver for a disk" (or "network card", or "WiFi card", or whatever) is a class in the sense of object ...


1

I cannot comment so I guess an "Answer" will have to suffice. Have you upgraded your system at all? Now I am by no means an expert in this, but if you add additional PCI/PCI slots to an existing PCI bus, then there is the "possibility" that the numbers can change I believe. I would much rather have made this a comment in case I was wrong, but I am sure ...


1

This is probably a warn message (maybe the driver considers it important enough to mention). You did not specify which driver your USB hard drive is using so I can't point to the source line to verify this. More info on log levels here: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/linux/kern_levels.h?id=HEAD The easiest fix ...


1

Debian patches the official kernel code heavily, including the config program [1]. This changes how make allyesconfig/allnoconfig behaves. Also a lot of Kconfig files are modified and certain symbols selected without explicitly asking the user. If you remove all patches with quilt pop -a in the source code of the related Linux package (you can get it with ...


1

Looking over your kernel config, it looks like you enabled everything a modern system would need to boot without an initrd but you're using an older computer; I noticed in your lshw output you have an ISA bridge and a Pentium M 1.4 CPU. My guess is you're missing a PATA option like CONFIG_PATA_MPIIX or ATA_GENERIC or PATA_LEGACY, but instead of playing the ...


1

After various tests and installations with a Wacom Intuos draw CTL-490DW-S now everything works perfectly 1 - Install Linux-mint 17.3 64bit cinnamon In the terminal : 2 - sudo apt-get update 3 - sudo apt-get install linux-headers-$(uname -r) build-essential 4 - download : ...


1

The message appears in case that certain process (in this case sftp-server) doesn't get CPU for 120s (default limit). This could be caused by high load on the system. Generally this could be caused waiting on any resource, most likely candidates are CPU, disk and network. When debugging such problems you can test writing speed on disk: $ dd if=/dev/zero ...


1

If your embedded device uses U-boot, the kernel image might be written on a particular partition on a NAND flash. See this! If this is the case i think you can locate the binary by looking at your U-boot source code if you have access to it. You can also check the environment variable for clues. This will vary greatly depending on your system so I can't ...



Only top voted, non community-wiki answers of a minimum length are eligible