summaryrefslogtreecommitdiff
path: root/udevd.c
AgeCommit message (Collapse)Author
2005-08-04add NETLINK define for the lazy distrosKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-20make SYSFS{} usable for all devicesKay Sievers
Patch from: Hannes Reinecke <hare@suse.de>
2005-07-12udevd: set incoming socket buffer SO_RCVBUF to maximumKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-06udevd: optimize env-key parsingKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-01[PATCH] #define NETLINK_KOBJECT_UEVENTMarco d'Itri
On many systems the system kernel headers are not recent enough to compile udev.
2005-06-27add ID_TYPE to the id probersKay Sievers
Export the type of device from ata_id and scsi_id, also strip leading and trailing whitespace and substitute consecutive whitespace with a single underline char. From: Hannes Reinecke <hare@suse.de> Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-16udevd: control log-priority of the running daemon with udevcontrolKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-15udeveventrecorder: add small program that writes an event to diskKay Sievers
Used for debugging and event replay from initramfs. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-14udevinitsend: handle replay messages correctlyKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-08udevd: allow starting of udevd with stopped exec-queueKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-05udevd: improve timeout handlingKay Sievers
Allow to override some parameters by environment keys. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-05udevd: add udevcontrolKay Sievers
Controls the behavior of the running daemon. Currently only stopping and starting of the execution queue is supported. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-05udevd: listen for netlink eventsKay Sievers
After the first valid netlink-event all event with a serial number received on the udevsend socket will be ignored. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-04-26[PATCH] add RUN key to be able to run rule based notificationkay.sievers@vrfy.org
SUBSYSTEM=="block", RUN="/sbin/program" will execute the program only for block device events. ACTION="remove", SUBSYSTEM=="block", RUN"/sbin/program" will execute the program, if a block device is removed.
2005-04-26[PATCH] support log-priority levels in udev.confkay.sievers@vrfy.org
2005-04-26[PATCH] udevd: don't delay events with TIMEOUT in the environmentkay.sievers@vrfy.org
On Tue, 2005-03-15 at 09:25 +0100, Hannes Reinecke wrote: > The current implementation of the firmware class breaks a fundamental > assumption in udevd: that the physical device can be initialised fully > prior to executing the next event for that device. Thanks to Hannes for the patch.
2005-04-26[PATCH] fix ia64 compilekay.sievers@vrfy.org
2005-04-26[PATCH] replace strncpy()/strncat() by strlcpy()/strlcat()kay.sievers@vrfy.org
2005-04-26[PATCH] rename LOG to USE_LOG in all placeskay.sievers@vrfy.org
2005-04-26[PATCH] trivial rename of some variableskay.sievers@vrfy.org
2005-04-26[PATCH] udevd: fix valgrind warningmbuesch@freenet.de
==4304== Syscall param sigaction(act) contains uninitialised or unaddressable byte(s) ==4304== at 0x804A37B: (within /sbin/udevd) ==4304== Address 0x52BFE7FC is on thread 1's stack
2005-04-26[PATCH] udevd: throttle the forking of processeskay.sievers@vrfy.org
If the system reaches a defined limit of processes in running state, udevd starts to count its own processes in running state from its session (all forked hotplug child processes, subprocesses and callouts) and throttles further process forking if the limit is reached. This should help setups with hundreds of events emitted hotplug events in parallel with hundreds of processes in "R" state. which makes the machine unresponsible. I placed a 100% cpu time consuming program in /etc/hotplug.d/ which runs for 5 seconds. With this patch I can load "scsi_debug add_host=100" without any major problem. Without the patch the box is completly unresponsible for many minutes.
2005-04-26[PATCH] udevd: add possible initialization of expected_seqnumkay.sievers@vrfy.org
UDEVD_EXPECTED_SEQNUM=$[`cat /sys/kernel/hotplug_seqnum` + 1] ./udevd -d will init udevd, so the next event will not wait for any timeout.
2005-04-26[PATCH] udevd: it's obviously not the brightest idea to exit a device node ↵kay.sievers@vrfy.org
manager if it doesn't find /dev/null
2005-04-26[PATCH] udevd: separate socket handling to prepare for other event sourceskay.sievers@vrfy.org
2005-04-26[PATCH] udevd: support -d switch to become a daemonkay.sievers@vrfy.org
2005-04-26[PATCH] udevd: split up message receiving an queueingkay.sievers@vrfy.org
2005-04-26[PATCH] improve event sequence serializationkay.sievers@vrfy.org
We delay the execution of events if there is already an event running for the same device, a parent or a child device. "add" events with a reference to a physical device will also wait for the physical device to finish. Here we fix the devpath comparison logic to return "busy" only if a complete device names is matching. /block/sdaa will not longer block a /block/sda event.
2005-04-26[PATCH] limit the initial timeout of the udevd event handlingkay.sievers@vrfy.org
Define an inititialization phase, where we delay the events only for a short time to eventually recollect the event sequence instead of delaying the very first events for 10 seconds, which breaks the firmware loader.
2005-04-26[PATCH] handle renamed network interfaces properly if we manage hotplug.d/kay.sievers@vrfy.org
If we take over the hotplug call and manage the events we don't need to call the event fake script in dev.d/. Just set all expected values to the new network interface name and call hotplug.d/. This way the device renaming is completely handled inside of udev and userspace can't get confused.
2005-04-26[PATCH] klibc supports LOG_PID now, so remove our own implementationkay.sievers@vrfy.org
2005-04-26[PATCH] udevd: serialization of the event sequence of a chain of deviceskay.sievers@vrfy.org
Currently udevd delays only events for the same DEVPATH. Example of an "add" event sequence: /block/sda /block/sda/sda1 With this change, we make sure, that the udev process handling /block/sda has finished its work (waited for all attributes, created the node) before we fork the udev event for /block/sda/sda1. This way the event for sda1 can be sure, that the node for the main device is already created (may be useful for disk labels). It will not affect any parallel device handling, only the sequence of the devices directory chain is serialized. The 10.000 disks plugged in will still run as parallel events. :) The main motivation to do this is the program execution of the dev.d/ and hotplug.d/ directory. If we don't wait for the parent event to exit, we can't be sure that the executed scripts are run in the right order. On Thu, Dec 09, 2004 at 09:18:28AM +0100, Kay Sievers wrote: > On Wed, 2004-12-08 at 19:07 -0800, David Brownell wrote: > > Could that argument apply to the underlying hardware, too? > We now make sure that the sequence of events for a device > is serialized for every device chain and the class/block > devices which have a "device" link to a physical device are > handled after the physical device is fully populated and > notified to userspace. It will only work this way on kernels > later than 2.6.10-rc1 cause it depends on the PHYSDEVPATH > value in the hotplug environment.
2005-04-26[PATCH] udevsend/udevd handle events without a subsystemkay.sievers@vrfy.org
Accept event without a subsystem and pass it through udevd. Pass empty environment while starting udevd.
2005-04-26[PATCH] rename udev_lib to udev_utils and dev_d to udev_multiplexkay.sievers@vrfy.org
2005-04-26[PATCH] add MANAGED_EVENT to the forked udev environmentkay.sievers@vrfy.org
This will prevent a loop, if udev sends events back into the daemon.
2005-04-26[PATCH] close connection to syslog in forked udevd childkay.sievers@vrfy.org
2005-04-26[PATCH] udevd exit path cleanupkay.sievers@vrfy.org
2005-04-26[PATCH] prevent udevd crash if DEVPATH is not setkay.sievers@vrfy.org
Just move the event straight to the exec list and don't try to compare a NULL pointer.
2005-04-26[PATCH] remove udev_lib dependency from udevsend, which makes it smallerkay.sievers@vrfy.org
2005-04-26[PATCH] pass the whole event environment to udevdkay.sievers@vrfy.org
Make _all_ hotplug variables available to the forked udev, the udev callouts and the udev dev.d/ scripts. We put the whole environment into a buffer and send it over the udevd socket. udevd recreates *envp[] and passes it to the exec().
2005-04-26[PATCH] Don't use any syslog() in signal handler, cause it may deadlock.kay.sievers@vrfy.org
2005-04-26[PATCH] improve klibc fixup integrationkay.sievers@vrfy.org
2005-04-26[PATCH] cleanup udevd/udevstartkay.sievers@vrfy.org
Change to the same timeout loop we use in the rest of the code. Change some comments and names to be more descriptive. I'm mostly finished with the overall cleanup. I will post a new patch for the udevd-nofork experiment, which will be much smaller now.
2005-04-26[PATCH] sparse cleanups on the treegreg@kroah.com
2005-04-26[PATCH] close the syslogkay.sievers@vrfy.org
Seems that we never closed the opened syslog. Here is a patch to do this in all our binaries.
2005-04-26[PATCH] fix asmlinkagembuesch@freenet.de
This patch fixes the reintroduced bug with the sig_handler(), if we link against a -mregparm=3 compiled klibc on i386. It also fixes some compiler warnings about redefined asmlinkage on some systems. Also some (broken?) compilers on distros throw out warnings if asmlinkage is before "static void". This fixes it, too.
2005-04-26[PATCH] fix incompatible pointer type warningmbuesch@freenet.de
This patch fixes two warning: assignment from incompatible pointer type asmlinkage is the reason for the warning. We can simply cast to avoid it. It also fixes this warning: warning: implicit declaration of function `umask'
2005-04-26[PATCH] PATCH udev close on execharald@redhat.com
selinux wants a clean fd set, so better close all open fds
2005-04-26[PATCH] PATCH some cleanups and security fixesharald@redhat.com
posted by Steve Grubb on https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=130351
2005-04-26[PATCH] switch udev's seqnum to u64kay.sievers@vrfy.org
The kernel will use a u64 for the sequence number, so we want the same.