Re: RFC: initialize /dev/urandom, is it necessary? Can we do it in a better way?

2023-09-19 Thread Michael Conrad
On 9/19/23 01:36, Roberto A. Foglietta wrote: On Tue, 19 Sept 2023 at 03:25, Michael Conrad wrote: On 9/18/23 06:14, Guillermo Rodriguez Garcia wrote: everything is compressed with gzip -7. This is the worst scenario. However, even in the worst scenario due

Re: RFC: initialize /dev/urandom, is it necessary? Can we do it in a better way?

2023-09-18 Thread Michael Conrad
On 9/18/23 06:14, Guillermo Rodriguez Garcia wrote: everything is compressed with gzip -7. This is the worst scenario. However, even in the worst scenario due to gzip one single bit of difference in the input generates a completely different compressed output: Compression (or

Re: busybox init returns fails with error code -1 (0x00007f00)

2022-10-25 Thread Michael Conrad
On 10/25/22 16:55, samuel ammonius wrote: Hello, I have a simple ISO filesystem set up with busybox and grub.These are the commands I use in GRUB2 to start the system: grub> set root=(cd) grub> linux /boot/bzImage root=/dev/sda1 grub> initrd /boot/initrd grub> boot I don't

Re: [PATCH v2] seedrng: limit poolsize to 256 bytes and document flock() and fsync() usage

2022-05-02 Thread Michael Conrad
On 5/2/22 09:54, Bernhard Reutner-Fischer wrote: There is also the case (that on my systems at least) udev initialisation reads from /dev/[u]random well before the S20 script loads any saved entropy. I've not tried to find out what the value is used for. I find at least one occurrence where the

Re: suspected bug in timeout command

2022-03-02 Thread Michael Conrad
On 3/2/22 02:45, Raffaello D. Di Napoli wrote: On 3/1/22 16:57, Denys Vlasenko wrote: On Tue, Mar 1, 2022 at 5:39 PM Denys Vlasenko wrote: Meanwhile: what "timeout" is doing is it tries to get out of the way of the PROG to be launched so that timeout's parent sees PROG (not timeout) as a

Re: grep: add option for better usability in pipelines

2022-02-16 Thread Michael Conrad
On 2/16/22 19:32, Kang-Che Sung wrote: Now, for an example where it makes a difference. Consider a Bash script like this: # enable automatic error handling set -eo pipefail # check for string "issues" in a logfile cat logfile | grep issue | sort --unique If there are no issues in

Re: suspected bug in timeout command

2022-02-12 Thread Michael Conrad
On 2/12/22 07:38, Michael Conrad wrote: Correctly using pidfd *still* requires that you be the parent process, else the child could get reaped and replaced before the pidfd is created.  As far as I can tell, the only purpose of pidfd is for waking on poll() instead of using signals, which

Re: suspected bug in timeout command

2022-02-12 Thread Michael Conrad
On 2/12/22 06:08, David Laight wrote: From: Raffaello D. Di Napoli Sent: 12 February 2022 01:33 On 2/11/22 16:22, Rob Landley wrote: On 2/9/22 11:12 AM, Baruch Siach wrote: Hi Sun, On Wed, Feb 09 2022, סאן עמר wrote: Hi, I'm using busybox for a while now (v1.29.2). and I had an issue with

Re: suspected bug in timeout command

2022-02-09 Thread Michael Conrad
On 2/9/22 12:12, Baruch Siach wrote: Hi Sun, On Wed, Feb 09 2022, סאן עמר wrote: Hi, I'm using busybox for a while now (v1.29.2). and I had an issue with a sigterm send randomly to a process of mine. I debugged it until I found it from the timeout process which was assigned before to another

Re: Tar component in busybox version 1.34.1 has a memory leak bug when trying to unpack a tar file.

2021-12-01 Thread Michael Conrad
On 12/1/21 7:42 AM, tito wrote: It can matter: consider large tar files on memory constrained devices. tar may fail to complete correctly, due to running out of memory, and in the process of running out of memory, may invoke the OOM killer in the process, which might kill some other process.

Re: [PATCH] shrink last_char_is function even more

2020-07-19 Thread Michael Conrad
On 7/19/2020 2:48 PM, Denys Vlasenko wrote: strrchr(s,c) will first find the end of s, then go backwards looking for c. The second part is wasted work, we only need to check the*last* char == c. Maybe a naive implementation, but why wouldn't they just record the last occurrence on a forward

Re: [PATCH 3/4] lsscsi: code shrink and refactor

2020-07-09 Thread Michael Conrad
On 7/9/2020 3:16 PM, Markus Gothe wrote: Jon Postel formulated the robustness principle decades ago. Still today it is a good advice to "be liberal in what you accept and strict in what you send". Counterexample: Internet Explorer It allowed so much garbage to render correctly that other

Re: Nuke

2020-06-22 Thread Michael Conrad
On 6/20/2020 10:55 PM, Eli Schwartz wrote: you should not "happen" to type in suspicious arguments to commands you don't understand I'd say about twice a year I accidentally dump some large body of text into my shell by accident.  The idea that one of those lines of text might start with the

Re: Busybox with a UEFI bios?

2020-05-04 Thread Michael Conrad
Busybox shouldn't have anything to do with BIOS or UEFI.  The boot loader and kernel handle those things, then once the kernel is running Busybox has a standard Posix environment to operate in.  You should investigate documentation on UEFI for the boot loader you are using. On 5/4/2020 4:10

Re: [PATCH] nslookup: skip line comments on parsing /etc/resolv.conf

2020-04-22 Thread Michael Conrad
On 4/22/2020 11:36 AM, Leesoo Ahn wrote: hence we save a few cycles while parsing But you are also suggesting adding bytes, right?  This is the second time you have proposed a patch that adds bulk to busybox to save a little performance at runtime, which is the opposite of the goal of the

Re: git smart http for busybox repo

2020-04-13 Thread Michael Conrad
On 4/13/2020 11:31 AM, Eli Schwartz wrote: by attempting to demonize the request as an attack from people demanding a workflow change from mailing lists and git to "mandatory github webflow omg so smart". I think he was serious, actually.  A rare case of needing to turn *off* your sarcasm

Re: Weird signal issues using yocto's warrior busybox (aarch64) when memory is cached

2020-01-30 Thread Michael Conrad
On 1/30/2020 12:53 AM, Sergio Paracuellos wrote: warning: core file may not match specified executable file. [New LWP 23217] warning: Could not load shared library symbols for 3 libraries, e.g. /lib/libm.so.6. Use the "info sharedlibrary" command to see the complete listing.

Re: Why almost every command is trying to read urandom?

2019-11-12 Thread Michael Conrad
On 11/12/19 2:47 PM, Mauro Condarelli wrote: In a recent kernel(5.x) / Buildroot / Busybox for an embedded system (mips/MT7628, if it matters) I see TONS of: |random: mount: uninitialized urandom read (4 bytes read) random: fsck.vfat: uninitialized urandom read (4 bytes read) random: tar:

Re: [PATCH] libbb: Converted safe_read to safe_write format

2019-10-18 Thread Michael Conrad
On 10/18/2019 10:54 AM, Denys Vlasenko wrote: On Thu, Oct 10, 2019 at 4:35 PM Martin Lewis wrote: Hello, Could you please elaborate on what was lacking in the INT_MAX part? As seen in write's man page: On Linux, write() (and similar system calls) will transfer at most 0x7000

Re: fdisk head inconsistency

2019-10-01 Thread Michael Conrad
On 10/1/2019 6:58 PM, Mauro Condarelli wrote: The former consistently swears I have "Geometry: 245 heads, 62 sectors/track, 1021 cylinders", while the latter insists on "Geometry: 4 heads, 16 sectors/track, 242560 cylinders". Physically the *same* card. Of course Debian Linux is accessing the

Re: fdisk head inconsistency

2019-09-30 Thread Michael Conrad
On 9/29/2019 8:57 AM, Mauro Condarelli wrote: Note: the SD card was originally formatted using Debian GNU/Linux fdisk on a desktop. I have several problems here, possibly all stemming from  a bogus detection of "disk geometry": - (n)ew partition always suggested sector 16 as starting point

Re: in initrd "exec sh /dev/console 2>&1" does not respond to keyboard

2019-02-27 Thread Michael Conrad
the Linux virtual console subsystem isn't connecting to your input devices. I'd suggest poking around in the input drivers section of the config and make sure things are compiled as "=y" and not as modules. On 2/27/2019 8:44 PM, David Mathog wrote: On 27-Feb-2019 17:37, Michael Conrad wr

Re: in initrd "exec sh /dev/console 2>&1" does not respond to keyboard

2019-02-27 Thread Michael Conrad
On 2/27/2019 6:00 PM, David Mathog wrote: On 27-Feb-2019 14:01, David Mathog wrote: This is really frustrating!  Perhaps there is some kernel parameter for 3.10.108 kernels which needs to be set (or unset)???  These are built into the kernel, seems like they should be enough CONFIG_HID=y

Re: [git commit] bc: new applet, throws warning

2018-12-06 Thread Michael Conrad
On 12/6/2018 11:48 AM, Gavin Howard wrote: you are going to have to make the bc not give good error messages and/or not check for errors as thoroughly (a massive chunk of the parser, which is the largest portion, is dedicated to error checking), reduce the quality of the code, reduce the

Re: [RFC PATCH v2] Allow applets to be implemented as scripts

2018-11-09 Thread Michael Conrad
On 11/7/2018 9:18 AM, Kang-Che Sung wrote: On Wed, Nov 7, 2018 at 9:54 PM Tito wrote: this embedded scripts patch looks like "featuritis" at its best to me. It is adding complexity for solving what problem exactly: avoiding to copy the scripts manually to the new system or to the new firmware

Re: License concerns when embedding script in busybox binary

2018-11-09 Thread Michael Conrad
On 11/7/2018 10:49 AM, Ron Yorston wrote: Kang-Che Sung wrote: Specifically, I think the current state of config ASH_EMBEDDED_SCRIPTS help text did not yet warn builders that the binary may be distributed **only when the embedding scripts are GPLv2-compatible**. Builder and distributors may

Re: less Idle time with busybox ash as bash vs bash

2018-09-07 Thread Michael Conrad
Busybox utilities are written in whatever way uses the fewest bytes.  Most standard utilities are optimized for speed.  Sometimes the reduced footprint of busybox can offset the lack of speed optimization because it can remain in disk cache or processor cache.  And sometimes not. If your bash

Re: [PATCH] wget: don't silently ignore certificate validation

2018-05-27 Thread Michael Conrad
The story just broke earlier this year how a casino hotel "smart thermometer" in the fish tank was used as a backdoor to attack the rest of their network. If a smart device running busybox is programmed to automatically check for firmware updates, the designers might expect HTTPS to be a

Re: add bb_info_msg was Re: Applets send errors to syslog during normal, successful operation

2018-03-06 Thread Michael Conrad
On 3/5/2018 5:11 PM, Deweloper wrote: Hi, I see your point, forget about this bb_info_msg stuff. The same result can still be achieved by using: syslog_level = LOG_INFO bb_error_msg(...) syslog_level = LOG_ERR if needed If I interpret bloatcheck results properly, the above costs extra 45 B of

Re: Proper defense against symlink attacks in tar, unzip et al

2018-02-19 Thread Michael Conrad
On 2/19/2018 11:15 AM, Denys Vlasenko wrote: On Mon, Feb 19, 2018 at 5:09 PM, Harald van Dijk wrote: Let's also brainstorm option 3: Allow symlinks which (a) start with one or more "../"; (b) never end up on a higher level of directory tree: "../dir/.." is ok,

Re: [PATCH] init: Add handshake to poweroff/reboot for signal handler setup

2018-02-14 Thread Michael Conrad
) + + BB_SIGNALS_SOCKET_STR_LEN); + if (fdrc == 0) + break; + sleep(1); + } On 2/14/2018 1:58 PM, Michael Conrad wrote

Re: [PATCH] init: Add handshake to poweroff/reboot for signal handler setup

2018-02-14 Thread Michael Conrad
On 2/14/2018 12:53 PM, Deb McLemore wrote: The only reproduction we were able to perform injected via a BMC soft poweroff being triggered. This then called into kernel/reboot.c (orderly_poweroff where the schedule_work was performed) utilizing the usermodehelper during the run_cmd

Re: [PATCH] ash: make bash_source command search current directory after PATH

2018-01-26 Thread Michael Conrad
On 1/26/2018 12:47 PM, Cathey, Jim wrote: My understanding, from years past, is that "source " (or ". ") is _exactly_ the same as "", except that it's running in _this_ shell rather than in a subshell. Thus it is able to affect environment variables that subsequent commands can inherit, etc.

Re: [PATCH] ash: make bash_source command search current directory after PATH

2018-01-26 Thread Michael Conrad
On 1/26/2018 9:15 AM, Denys Vlasenko wrote: On Fri, Jan 26, 2018 at 9:34 AM, Paul Otto wrote: According to the BASH documentation, the source command should: Read and execute commands from filename in the current shell environment and return the exit status of the last

Re: [PATCH] Fix runsvdir so it reaps children and avoid zombi processes when killed.

2018-01-09 Thread Michael Conrad
On 1/9/2018 1:53 PM, Laurent Bercot wrote: Zombies will _always_ be observable, even if you try to reap immediately.  Of course. I used "observable" in the broad sense, meaning there is a nonzero amount of time where init is not runnable, won't be scheduled, and won't immediately reap

Re: ash.c history loading and ENABLE_FEATURE_EDITING_SAVEHISTORY

2017-12-26 Thread Michael Conrad
On 12/24/2017 4:43 AM, Ceriel Jacobs wrote: Where is the user interface to quickly issue a pre-written shell function? And how to see the available functions? ls /usr/local/bin ...? Just add your "pre-written shell commands" in script files, give them a useful name, and put them in the

Re: BusyBox built-in shell (ash)

2017-12-12 Thread Michael Conrad
On 12/12/2017 6:28 PM, A.W.C. wrote: yes, I know that Squashfs is read-only filesystem. Tried again, not sure what need be changed here for this specific configuration and filesystems available. # mknod -m 666 /dev/null c 1 3 mknod: /dev/null: Read-only file system You say you understand

Re: Reboot implemention

2017-11-15 Thread Michael Conrad
On 11/13/2017 8:19 PM, Cathey, Jim wrote: >Is there a reason why BusyBox's [reboot] implementation is different, or is it a bug? The final fs cleanup, and the only one that really counts, is what the kernel does after init(8) exits. Pretty sure if init exits it is an immediate PANIC,

Re: [PATCH] ash: avoid GLIBC'ism %m

2017-07-22 Thread Michael Conrad
On 7/22/2017 2:56 PM, Johannes Schindelin wrote: Hi Denys, On Fri, 21 Jul 2017, Denys Vlasenko wrote: On Wed, Jul 19, 2017 at 3:47 AM, Jody Bruchon wrote: On 2017-07-18 9:15 PM, Kang-Che Sung wrote: On Wed, Jul 19, 2017 at 2:11 AM, Markus Gothe

Re: [PATCH 1/1] makedevs: set path size to match linux

2017-06-27 Thread Michael Conrad
On 6/27/2017 3:10 AM, Ralf Friedl wrote: Michael Conrad wrote: If you ask for large enough allocations on the stack, GCC will secretly give you malloc/free instead, which adds to code size. It might be that 4096 triggers this effect, and perhaps that was the reason for the original small-ish

Re: [PATCH 1/1] makedevs: set path size to match linux

2017-06-26 Thread Michael Conrad
On 6/26/2017 9:45 PM, Matthew Weber wrote: Baruch/Emmanuel, On Mon, Jun 26, 2017 at 7:36 PM, Emmanuel Deloget wrote: Hello, On Mon, Jun 26, 2017 at 11:23 PM, Matthew Weber wrote: Baruch, On Mon, Jun 26, 2017 at 3:55 PM, Baruch Siach

Re: # CONFIG_BUSYBOX is not set: breakage on master

2016-08-27 Thread Michael Conrad
On 8/27/2016 2:18 AM, Cristian Ionescu-Idbohrn wrote: On Sat, 27 Aug 2016, Denys Vlasenko wrote: config BUSYBOX bool "Include busybox applet" default y help The busybox applet provides general help regarding busybox and allows the included

Re: [PATCH] getrandom: new applet

2016-07-12 Thread Michael Conrad
On 7/12/2016 5:53 PM, Rich Felker wrote: On Tue, Jul 12, 2016 at 01:09:42PM -0400, Michael Conrad wrote: On 7/7/2016 11:49 AM, Rob Landley wrote: On 07/06/2016 11:41 AM, Etienne Champetier wrote: Now you really hate the fact that getrandom() is a syscall. I do not hate the fact getrandom

Re: [PATCH] getrandom: new applet

2016-07-12 Thread Michael Conrad
On 7/7/2016 11:49 AM, Rob Landley wrote: On 07/06/2016 11:41 AM, Etienne Champetier wrote: >Now you really hate the fact that getrandom() is a syscall. I do not hate the fact getrandom is a syscall. I'm asking what the point is of a new applet to call this syscall. You have suggested it could

Re: busybox sed, 'r' command

2016-03-23 Thread Michael Conrad
On 3/23/2016 12:12 PM, Ralf Friedl wrote: Cristian Ionescu-Idbohrn wrote: sed (GNU sed) 4.2.2 can do this: $ printf 'foo bar baz' | sed r - foo bar baz or, after storing the text in a file: $ printf 'foo bar baz' >/tmp/bar $ sed r /tmp/bar foo

Re: [PATCH v3 3/4] nsenter: new applet

2016-03-19 Thread Michael Conrad
On 3/16/2016 11:35 AM, Bartosz Gołaszewski wrote: 2016-03-15 21:45 GMT+01:00 Mike Frysinger : On 15 Mar 2016 12:00, Bartosz Gołaszewski wrote: Actually some time ago I sent a series extending the readahead applet. It was rejected eventually but one of the patches was

Re: [PATCH v3 3/4] nsenter: new applet

2016-03-14 Thread Michael Conrad
On 3/14/2016 2:27 PM, Mike Frysinger wrote: the code seems to assume that the byte size scales into the number of chars required to represent the number in base 10 when it's really a log scale. here's a table to show it's wonky: The number of bytes is also a log scale. The ratio of log_256

Re: NEED help with Busybox

2016-03-07 Thread Michael Conrad
These are mostly Unix questions, not busybox questions. But I'll answer off-list to get you started. On 3/6/2016 7:14 AM, Hiep Huynh wrote: Hi there, I'm a newbie to Busybox and I need your help with these questions: 1) How do I check if my Linux kernel system is using busybox? 2) Usually

Re: [PATCH] su: support denying accounts with blank password

2015-10-14 Thread Michael Conrad
On 10/14/2015 2:37 AM, Natanael Copa wrote: The security is based on physical access. The local technician can log in without password. (in theory, if you have physical access then you have access to it all anyway). And after all, it is the "local technician" the device is supposed to protect

Re: How to use read in Busybox v1.1.1 ?

2015-05-14 Thread Michael Conrad
On 5/14/2015 11:33 AM, Mike Yates wrote: On 13 May 2015 at 16:27, Michael Conrad mcon...@intellitree.com wrote: On 5/13/2015 7:45 AM, Mike Yates wrote: read -p Enter name: $name I have found that the $ is the issue - Busybox will only accept a variable name without it, while Bash accepts

Re: How to use read in Busybox v1.1.1 ?

2015-05-14 Thread Michael Conrad
On 5/14/2015 12:38 PM, Mike Yates wrote: After all, I was only using read as a convenient stop to debug prompt. The ash arg count error prevented read from stopping the script and was almost disastrous! Ok, so by works you mean stops to wait for a newline. That was the primary point of

Re: How to use read in Busybox v1.1.1 ?

2015-05-13 Thread Michael Conrad
On 5/13/2015 7:45 AM, Mike Yates wrote: On 11 May 2015 at 20:01, Bastian Bittorf bitt...@bluebottle.com wrote: * Mike Yates x...@fonehelp.co.uk [11.05.2015 18:05]: The command read in Busybox v1.23 functions just like in GNU bash but in the v1.1.1 in my old NAS it keeps complaining of not

Re: How to use read in Busybox v1.1.1 ?

2015-05-13 Thread Michael Conrad
On 5/13/2015 11:30 AM, Jody Bruchon wrote: On 05/13/2015 11:27 AM, Michael Conrad wrote: My bash behaves like busybox. As far as I know it has never been possible to read $foo and get the value placed into $foo (unless $foo=foo) I confirmed that bash on one of my servers does allow use of 'read

Re: Add a user/password interface for a Telnet and ftp connect

2015-03-18 Thread Michael Conrad
On 03/18/2015 10:50 AM, Alexis Guilloteau wrote: Hi, Right now i can run a Telnet daemon on one of my board using the command /usb/sbin/telnet -l /bin/sh and run a ftp daemon thanks to inetd.conf but each of the connection are anonymous (well, it ask for a user name but not for a

Re: [RFC] Proof-of-concept for netlink listener for mdev -i

2015-03-16 Thread Michael Conrad
On 03/15/2015 12:16 PM, Laurent Bercot wrote: On 15/03/2015 15:52, Natanael Copa wrote: I have simplified the long-time living netlink listener more by forwarding the netlink socket and letting the handler read directly from netlink. This factorize out the pipe and remove the need of any micro

Re: RFD: Rework/extending functionality of mdev

2015-03-13 Thread Michael Conrad
On 3/13/2015 11:21 AM, Harald Becker wrote: On 13.03.2015 12:41, Michael Conrad wrote: Stream-writes are not atomic, and your message can theoretically get cut in half and interleaved with another process writing the same fifo. (in practice, this is unlikely, but still an invalid design

Re: RFD: Rework/extending functionality of mdev

2015-03-13 Thread Michael Conrad
On 3/13/2015 9:48 AM, Harald Becker wrote: On 13.03.2015 12:29, Michael Conrad wrote: On 3/13/2015 3:25 AM, Harald Becker wrote: 1 - kernel-spawned hotplug helpers is the traditional way, 2 - netlink socket daemon is the right way to solve the forkbomb problem ACK, but #2 blocks usage

Re: RFD: Rework/extending functionality of mdev

2015-03-13 Thread Michael Conrad
On 3/13/2015 3:25 AM, Harald Becker wrote: 1 - kernel-spawned hotplug helpers is the traditional way, 2 - netlink socket daemon is the right way to solve the forkbomb problem ACK, but #2 blocks usage for those who like / need to stay at #1 / #0 In that case, I would offer this idea:

Re: RFD: Rework/extending functionality of mdev

2015-03-13 Thread Michael Conrad
On 3/13/2015 3:25 AM, Harald Becker wrote: This is splitting operation of a big process in different threads, using an interprocess communication method. Using a named pipe (fifo) is the proven Unix way for this ... and it allows #2 without blocking #1 or #0. Multiple processes writing into

Re: RFD: Rework/extending functionality of mdev

2015-03-12 Thread Michael Conrad
The question I was asking was only about this: On 3/12/2015 12:04 PM, Harald Becker wrote: but that one will only work when you either use the kernel hotplug helper mechanism, or the netlink approach. You drop out those who can't / doesn't want to use either. ...which I really do think

Re: RFD: Rework/extending functionality of mdev

2015-03-11 Thread Michael Conrad
On 3/11/2015 9:30 AM, Harald Becker wrote: So how can we avoid that unwanted parallelism, but still enable all of the above usage scenarios *and* still have a maximum of code sharing *and* a minimum of memory usage *without* delaying the average event handling too much? The gathering parts

Re: Question on busybox and loading firmware?

2014-09-23 Thread Michael Conrad
On 9/23/2014 2:05 AM, Michael D. Setzer II wrote: device class 'firmware': registering pci :02:08.0: Firmware left e100 interrupts enabled; disabling ipw2200 :02:02.0: Direct firmware load failed with error -2 firmware ipw2200-bss.fw: firmware: requesting ipw2200-bss.fw ipw2200:

Re: Question on busybox and loading firmware?

2014-09-22 Thread Michael Conrad
On 9/22/2014 10:27 AM, Michael D. Setzer II wrote: On 22 Sep 2014 at 10:32, Gustavo Zacarias wrote: On 09/22/2014 09:56 AM, Michael D. Setzer II wrote: Was already able to find the firmware since it was included with the installation of the fedora 20 on the notebook. Issue is that I placed

Re: How do I (unconditionally) enable unicode support in busybox?

2014-08-10 Thread Michael Conrad
On 08/10/2014 03:39 AM, James Bowlin wrote: I ran into problems like this years ago when I tried it before. I had given up before because there were just so many variables (kernel header version ublibc version, binutils version, buildroot version, busybox version, and more) that could cause the

Re: shutdown busybox and start another PID1 process

2014-08-09 Thread Michael Conrad
On 08/09/2014 07:02 AM, Rieker Flaik wrote: But here I can't do that because /sbin/init has taken over PID 1 and spawned processes. So I first have to shut this pre-OS down before booting into the next. Is there a way to kill all processes and start a shellscript as PID 1 again? Maybe by

Re: How do I (unconditionally) enable unicode support in busybox?

2014-08-04 Thread Michael Conrad
On 8/4/2014 2:48 PM, James Bowlin wrote: BTW, the following code is an infinite loop in my initrd: [ $LANG = en_US.UTF-8 ] || LANG=en_US.UTF-8 exec $0 $@ I think you should focus on this bug. Which busybox version? Which libc version? Because my busybox runs it just fine. (as should any

Re: [PATCH] top: fix parsing of /proc/meminfo

2014-07-22 Thread Michael Conrad
On 07/21/2014 04:44 PM, Dan Fandrich wrote: On Sun, Jul 20, 2014 at 11:20:13AM +0300, Timo Teras wrote: On Sat, 19 Jul 2014 21:31:33 +0200 Dan Fandrich d...@coneharvesters.com wrote: On Fri, Jul 18, 2014 at 10:07:06PM +0300, Timo Teräs wrote: and do it in smaller code: diff --git

Re: /proc/pid/cmdline and udhcpcd

2014-03-26 Thread Michael Conrad
On 03/26/2014 09:13 AM, Cristian Ionescu-Idbohrn wrote: On Wed, 26 Mar 2014, Denys Vlasenko wrote: But how that respawn tool going to work with other programs? As I've written in a previous message, I know nothing of such other programs, but I'd be intrested to learn more. There is no

Re: Ntpd config file support

2014-03-18 Thread Michael Conrad
On 3/18/2014 3:09 PM, Mike Dean wrote: Helping them with this usually results in grumbling about it being overcomplicated to perform what should be such a simple task. IMHO, the plethora of unix config file syntaxes are much harder to learn than reading a quick manpage (or --help in this

Re: Ntpd config file support

2014-03-18 Thread Michael Conrad
On 3/18/2014 3:54 PM, Mike Dean wrote: So you're telling me that a plain text script which takes more than 300 bytes is a better solution than an option that could be configured out? But your full text option, enabled by default, takes less than 300 bytes I suppose? I'm not sure I follow.

Re: Running a script every second

2014-03-06 Thread Michael Conrad
I know this borders on bike-shedding, but if you really want to run something exactly 60 times per elapsed minute you need to compare calls to clock_gettime(CLOCK_MONOTONIC). Nothing else will work reliably in all cases, and certainly not signals. (if the system is lagged significantly, two

Re: Looking for simple ifplugd example script

2014-02-21 Thread Michael Conrad
On 02/21/2014 05:39 AM, Bryan Evenson wrote: It means that busybox/examples/var_service/README is badly located, or badly written, or both. I found the README you were talking about. I have never used runsvdir before and I don't have it included in my version of Busybox. I didn't realize

Re: [PATCH] ping: try SOCK_DGRAM if no root privileges

2014-01-10 Thread Michael Conrad
On 1/10/2014 12:37 AM, Laurent Bercot wrote: You're performing too much work copying your argument list. :P The wrapper should be entirely transparent: busybox shouldn't even notice it has been run through it, so it should be called with the exact same argv. Here's what I do [...] If you

Re: bnx2 firmware loading?

2013-12-03 Thread Michael Conrad
On 12/03/2013 09:15 AM, Lauri Kasanen wrote: Recent kernels can load firmware without userspace help, perhaps you'd want to backport those changes. Interesting! However I like the ability to log which firmware blobs were attempted. Maybe the right fix is a kernel build option to always log

Re: bnx2 firmware loading?

2013-12-02 Thread Michael Conrad
On 12/2/2013 4:58 PM, Michael Di Domenico wrote: when i try to do a 'modprobe bnx2', it fails with a message saying it cannot load the firmware files 'bnx2/bnx-firmware-0.6.1b.fw' however, i do in fact have the firmware files in '/lib/firmware/bnx2' oddly enough the bnx2 module does load after

Re: Question about the installation directory of programs

2013-11-12 Thread Michael Conrad
On 11/8/2013 9:57 PM, ChenQi wrote: I'm asking this because our project may also need a separation of / and /usr. In other words, we need to make sure the system can still boot up for recovery and repair even if /usr is missing. As busybox is an important part of our system, I want to know

Re: [PATCH] init: handle kexec clean reboot

2013-05-26 Thread Michael Conrad
On 05/22/2013 01:41 PM, Laurent Bercot wrote: So, as I expected, killall5 is a heavy monster, scanning the process list in /proc (so, not portable), and killing them one by one unless they match some criteria. Absolutely ugly, needs some specific tweaks to support FUSE, and would exhibit a huge

Re: [PATCH] init: handle kexec clean reboot

2013-05-26 Thread Michael Conrad
On 05/22/2013 10:28 PM, Harald Becker wrote: To grab Laurent's idea: What about a separate shutdown applet in Busybox: kill(-1,TERM), sleep, kill(-1,KILL), sleep, umount, sync then exec into the given remainder of command line? And remove all special shutdown processing from init process? Vor

Re: CTRL-ALT-DEL not working as expected. Seeking for advices

2013-03-30 Thread Michael Conrad
On 03/29/2013 11:56 AM, Harald Becker wrote: Hi Denys ! Hence my suggestion to add this sigprocmask to unblock all signals *AND* restore all signal actions to there default as part of the cttyhack applet. I would like to hear people confirming that kernel indeed blocks ant signals to pid 1.

Re: CTRL-ALT-DEL not working as expected. Seeking for advices

2013-03-30 Thread Michael Conrad
On 03/30/2013 05:34 AM, Laurent Bercot wrote: So perhaps the confusion is that Linux is simply not delivering the signal (regardless of sigprocmask) unless you install a signal handler. No, this is not the problem. Every shell in the world traps SIGINT. Hm, true... but then the problem

Re: CTRL-ALT-DEL not working as expected. Seeking for advices

2013-03-30 Thread Michael Conrad
On 03/30/2013 01:58 PM, Ralf Friedl wrote: The kernel is never compiled with an initramfs. The kernel is often compiled to use an initramfs, if the boot loader supplies one. Actually, check kconfig for newer kernels. They have an option to automatically create the cpio archive from a

Re: busybox will not run any other binary - configuration issue on my end

2013-03-12 Thread Michael Conrad
On 3/12/2013 1:39 PM, Paul Smith wrote: On Tue, 2013-03-12 at 12:35 -0400, q5sys wrote: however when I try to start any other program, like another shell for example, zsh, bash, etc. Busybox returns that the command is not found. The kernel tries to invoke the proper ld.so but can't find it,

Re: BeagleBone for ALSA jackd

2012-10-25 Thread Michael Conrad
On 10/24/2012 8:53 AM, Grant wrote: I would like to build as minimal of a system as possible on a BeagleBone. I only need ALSA and jackd to work. Would this work well with busybox? I'm very familiar with Gentoo but a system like this would be set up entirely outside of the Gentoo framework?

Re: [PATCH] Add xorpipe utility

2012-09-13 Thread Michael Conrad
On 9/12/2012 10:42 PM, j...@jodybruchon.com wrote: My rationale behind writing this simple utility is as follows: Moving data through a fully encrypted tunnel like SSH is too slow for me, so I use netcat/socat for moving large chunks of data between systems. I don't want the data to be easily

Re: [vamos-dev] [PATCH 1/3] fix literal error warning

2012-09-10 Thread Michael Conrad
On 9/10/2012 11:46 AM, Michael Tokarev wrote: On 10.09.2012 19:31, Manuel Zerpies wrote: Hey guys, what about this patch? Is there anyone who can have a look at it? [] - bb_perror_msg(filename); + bb_perror_msg(%s, filename); Please stop fixing a

Re: [vamos-dev] [PATCH 1/3] fix literal error warning

2012-09-10 Thread Michael Conrad
On 9/10/2012 12:36 PM, Michael Conrad wrote: On 9/10/2012 11:46 AM, Michael Tokarev wrote: On 10.09.2012 19:31, Manuel Zerpies wrote: Hey guys, what about this patch? Is there anyone who can have a look at it? [] -bb_perror_msg(filename); +bb_perror_msg(%s, filename

Re: shell parsing bug with

2012-09-07 Thread Michael Conrad
On 09/07/12 01:00, Rich Felker wrote: On Fri, Sep 07, 2012 at 06:50:48AM +0200, Harald Becker wrote: Sorry if it sound provocative, I'm just interested/wondering what/why are you doing here. Nothing more. I'm not doing it. I'm just uncomfortable with having a shell that will misinterpret

Re: httpd w/PHP performance

2012-06-21 Thread Michael Conrad
On 6/21/2012 8:39 AM, Gary Altenberg wrote: On 6/21/2012 5:01 AM, Laurent Bercot wrote: There might also be some downsides to repeated alloc/free in the embedded environment. Not at all. As long as you have enough memory to serve the requests, and dynamic allocations are kept to a

Re: httpd w/PHP performance

2012-06-21 Thread Michael Conrad
On 6/21/2012 6:01 AM, Laurent Bercot wrote: I have an application that runs well using lighttpd with PHP. In an effort to reduce the memory footprint I tried porting it to the busybox ( 1.20.1 ) httpd. It was easy to get this working and it seems to work properly. What isn't good enough is

Re: Mounting Filesystem over existing directory

2012-06-04 Thread Michael Conrad
On 06/04/2012 10:06 AM, Laurent Bercot wrote: Is that correct. In my system i can update the kernel boot args. But i believe that if the mounting of the root partition fails then the kernel will panic. You can do some basic tests before rebooting, including whether the mounting works (mount

Re: Mounting Filesystem over existing directory

2012-06-01 Thread Michael Conrad
On 5/31/2012 2:04 AM, Bartos-Elekes Zsolt wrote: Michael Conrad wrote: Unionfs has one problem though: the only way to get correct behavior is to merge path A and B onto mountpoint C. (C can't be the same as A or B). Perhaps this is valid only for older versions of unionfs. I am using

Re: Mounting Filesystem over existing directory

2012-06-01 Thread Michael Conrad
On 6/1/2012 2:42 AM, Laurent Bercot wrote: Out of curiosity, Is is possible to free up the resources used by initramfs. I would be very interested in knowing how this can be done. Initramfs is really just a tmpfs which the kernel copies files into at boot-time. You free it by removing all

Re: Mounting Filesystem over existing directory

2012-05-30 Thread Michael Conrad
On 5/30/2012 3:08 AM, Sameer Naik wrote: Thanks for the quick response. I will check out the links Bartos provided. Certainly, my query is not related to busybox, but where else can i find a better community for my query :) Regards ~Sameer Indeed, you're posting your question to a lot of

Re: Possible change to /etc/mdev.conf default?

2012-05-14 Thread Michael Conrad
On 05/14/2012 01:45 AM, Walter Dnes wrote: On Sun, May 13, 2012 at 05:47:15PM -0600, Michael J. Hammel wrote On Sun, 2012-05-13 at 18:14 -0400, Walter Dnes wrote: I was spelunking through my /etc/mdev.conf, looking at the syntax, when something occured to me looking at... sr[0-9]*

Re: OTP feature for /bin/login

2012-05-08 Thread Michael Conrad
On 5/8/2012 6:56 PM, Rich Felker wrote: On Tue, May 08, 2012 at 05:38:26PM -0400, Michael Conrad wrote: With the little amount of thought I've done on it so far, I've concluded that a viable system would have to have executables instead of shared objects as atoms, i.e. the /bin/login program

Re: Dangerous behaviour of mktemp when unknown flags are used

2012-04-17 Thread Michael Conrad
On 04/17/2012 02:30 PM, Rich Felker wrote: On Tue, Apr 17, 2012 at 03:48:20PM +0200, Denys Vlasenko wrote: On Tue, Apr 10, 2012 at 4:24 AM, John Spencer maillist-busy...@barfooze.de wrote: (this is busybox 1.19.2) /src/build/zlib-1.2.6/Makefile:tempfile := $(shell mktemp -u __XX)

Re: [PATCH] arpping in udhcpc

2012-04-11 Thread Michael Conrad
If you both look closely at the function in question (monotonic_ms) you will see that it is already 64-bit, and using the linux CLOCK_MONOTONIC which is never affected by changes to the system time. Adrian is correct that the 'long long' return of monotonic_ms is being stored in a 'unsigned',

Re: [PATCH] ash: setsid and TIOCSCTTY when enabling job control.

2012-03-12 Thread Michael Conrad
Would this have an effect on scripts being used as init which did not previously have a controlling terminal? There are quite a few commands which change behavior when run with/without a tty. (the usual fix for enabling job control is to run agetty in your init script) -Mike On 3/12/2012

Re: do stuff after shutdown

2012-02-24 Thread Michael Conrad
On 2/23/2012 7:59 PM, Laurent Bercot wrote: You mean process 1. ;) Right :-) Whose idea was it to count from 1, anyway? [ Side note : panicking when process 1 exits is a *very* silly thing for the kernel to do. Process 1 exiting, instead of being forbidden, should mean the end of the

Re: do stuff after shutdown

2012-02-23 Thread Michael Conrad
On 2/23/2012 4:52 PM, Michael Di Domenico wrote: I have a busybox system booting over pxe, it does some stuff and then eventually boots up my main linux distro. my question is; when i'm done with my main linux distro, is it possible to run commands back in the busybox shell after the switchroot

  1   2   >