Re: [PATCH] udhcpc: add support for sending DHCPINFORM requests

2022-07-13 Thread Denys Vlasenko
Apologies for the delay. On Wed, Apr 20, 2022 at 8:35 PM Sinan Kaya wrote: > From b906997217b363c459fdbd2824bfe6c5ac69607e Mon Sep 17 00:00:00 2001 > From: Sinan Kaya > Date: Tue, 19 Apr 2022 13:47:19 + > Subject: [PATCH] udhcpc: add support for sending DHCPINFORM requests > > It is useful

Re: [PATCH v2 1/2] awk: fix use after free (CVE-2022-30065)

2022-07-11 Thread Denys Vlasenko
On Wed, Jun 29, 2022 at 11:50 AM Natanael Copa wrote: > Denys, > > This fix passes `./runtest awk`. We have used this fix in Alpine Linux > edge (development branch) for a week now and as far I know, there have > been no issues due to this. > > Can you please have another look? And push it to the

Re: [PATCH] lineedit: get PWD from ash

2022-07-03 Thread Denys Vlasenko
Applied, thank you. On Tue, Jun 28, 2022 at 2:46 PM Ron Yorston wrote: > > The line editing code and ash disagree when the current directory > is changed to a symbolic link: > >~ $ mkdir real >~ $ ln -s real link >~ $ cd link >~/real $ pwd >/home/rmyf36/link > > Note the

Re: [PATCH 2/2] vi: handle autoindent in 'cc' command

2022-06-26 Thread Denys Vlasenko
Applied both, thanks On Fri, Mar 18, 2022 at 12:31 PM Ron Yorston wrote: > > When the 'cc' command is invoked with autoindent enabled it > should use the indent of the first line being changed. > > The size of the indent has to be established before char_insert() > is called as the lines being

Re: [PATCH v2] ash,hush: use HOME for tab completion and prompts

2022-06-26 Thread Denys Vlasenko
Applied, thank you. On Thu, Mar 24, 2022 at 1:17 PM Ron Yorston wrote: > > ash and hush correctly use the value of HOME for tilde expansion. > However the line editing code in libbb obtains the user's home > directory by calling getpwuid(). Thus tildes in tab completion > and prompts may be

Re: [PATCH] libbb: restore special handling of nomsg errors

2022-06-26 Thread Denys Vlasenko
Applied, thank you. On Thu, Apr 21, 2022 at 9:02 AM Ron Yorston wrote: > > The functions bb_perror_nomsg() and bb_perror_nomsg_and_die() are > used to print error messages where no specific information is > available. For example: > >$ busybox mktemp -p / >mktemp: (null): Permission

Re: [PATCH] awk: fix use after free (CVE-2022-30065)

2022-06-14 Thread Denys Vlasenko
On Tue, Jun 14, 2022 at 8:55 AM Natanael Copa wrote: > Hi! > > Is there anything else I can do to help fix CVE-2022-30065? I have > created a testcase for the testsuite and proposed a fix, but I'm not > that familiar with awk code so I would appreciate some help with this > before pushing it to

Re: [PATCH] cpio: code shrink

2022-05-02 Thread Denys Vlasenko
On Thu, Feb 10, 2022 at 2:13 PM Ron Yorston wrote: > Use a generic llist_t to store the names of hardlinked files. > > function old new delta > cpio_o 11401122 -18 > > Signed-off-by: Ron Yorston

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

2022-05-02 Thread Denys Vlasenko
On Sun, May 1, 2022 at 3:07 PM David Laight wrote: > Using the same file twice is better than having nothing at all. > At least different systems use different values. > Unless you have a remote 'dos' attack that can crash the system > at exactly the right point in the boot sequence this is an >

Re: /sbin/init overrides HOME and TERM env vars

2022-05-02 Thread Denys Vlasenko
On Sat, Mar 12, 2022 at 11:20 AM jkm <8...@wp.pl> wrote: > > Looking at the kernel code in init/main.c, it does look like HOME=/ > > TERM=linux is hard coded in the kernel with no way to override this from > > the command line. > > I guess you are wrong. > HOME and TERM env vars can be overriden

Re: [PATCH] tsort: new applet

2022-05-02 Thread Denys Vlasenko
applied, thank you On Mon, Feb 21, 2022 at 12:59 AM David Leonard wrote: > > Thanks. Patch fixed, attached. > > By the way, is this the right default for config? > > +//config: default n > > David > > On Sun, 20 Feb 2022, tito wrote: > > > some minor fixes inline. > ... > > + /* binry

Re: add support for PATH in crontabs

2022-05-02 Thread Denys Vlasenko
Applied, thanks. On Tue, Mar 8, 2022 at 10:13 PM Paul Fox wrote: > > peter0x44 wrote: > > > I'm afraid I can't remember how to generate the cool automatic size > > > diffs. The code change seems to add fewer than 100 bytes, but I also > > > ifdefed a very old level 5 debug loop in

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

2022-05-02 Thread Denys Vlasenko
On Mon, May 2, 2022 at 8:26 AM Emmanuel Deloget wrote: > Le lun. 2 mai 2022 à 03:31, Denys Vlasenko a écrit > : > > > I beg to differ, and especially on some embedded systems where the RNG > > > might be quite controllable by an attacker from the outside (mostly >

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

2022-05-01 Thread Denys Vlasenko
On Sun, May 1, 2022 at 6:35 PM Emmanuel Deloget wrote: > > > - RNG is seeded and credited using file A. > > > - File A is unlinked but not fsync()d. > > > - TLS connection does something and a nonce is generated. > > > - System loses power and reboots. > > > - RNG is seeded and credited using

Re: [PATCH v9] seedrng: import SeedRNG utility for kernel RNG seed files

2022-05-01 Thread Denys Vlasenko
On Sun, May 1, 2022 at 10:05 AM tito wrote: > > On Fri, 29 Apr 2022 18:16:41 +0200 > Denys Vlasenko wrote: > > > On Wed, Apr 27, 2022 at 6:55 PM Jason A. Donenfeld wrote: > > > On Wed, Apr 27, 2022 at 06:15:50PM +0200, Denys Vlasenko wrote: > > > > C

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

2022-04-30 Thread Denys Vlasenko
On Sat, Apr 30, 2022 at 3:48 PM Jason A. Donenfeld wrote: > On Sat, Apr 30, 2022 at 3:12 PM Denys Vlasenko > wrote: > > > @@ -190,6 +192,8 @@ int seedrng_main(int argc UNUSED_PARAM, char *argv[]) > > > if (mkdir(seed_dir, 0700

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

2022-04-30 Thread Denys Vlasenko
On Sat, Apr 30, 2022 at 3:48 PM Jason A. Donenfeld wrote: > On Sat, Apr 30, 2022 at 3:12 PM Denys Vlasenko > wrote: > > > + /* The fsync() here is necessary for safety here, so that power > > > being pulled > > > +* at the wrong moment does

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

2022-04-30 Thread Denys Vlasenko
Additionally document the flock() and fsync() usage so that somebody > doesn't remove it. Apparently busybox developers like to remove things > they don't understand with no regards to security implications, so Denys > suggested I leave some comments here. > > Cc: Denys Vlasenko >

Re: [PATCH v9] seedrng: import SeedRNG utility for kernel RNG seed files

2022-04-29 Thread Denys Vlasenko
On Fri, Apr 29, 2022 at 6:57 PM Jason A. Donenfeld wrote: > On Fri, Apr 29, 2022 at 6:04 PM Denys Vlasenko > wrote: > > On Wed, Apr 27, 2022 at 6:55 PM Jason A. Donenfeld wrote: > > > On Wed, Apr 27, 2022 at 06:15:50PM +0200, Denys Vlasenko wrote: > > > >

Re: [PATCH v9] seedrng: import SeedRNG utility for kernel RNG seed files

2022-04-29 Thread Denys Vlasenko
On Fri, Apr 29, 2022 at 6:04 PM Denys Vlasenko wrote: > On Wed, Apr 27, 2022 at 6:55 PM Jason A. Donenfeld wrote: > > On Wed, Apr 27, 2022 at 06:15:50PM +0200, Denys Vlasenko wrote: > > > if ((unlink(filename) < 0 || fsync(dfd) < 0) && seed_len) { >

Re: [PATCH v9] seedrng: import SeedRNG utility for kernel RNG seed files

2022-04-29 Thread Denys Vlasenko
On Wed, Apr 27, 2022 at 6:55 PM Jason A. Donenfeld wrote: > On Wed, Apr 27, 2022 at 06:15:50PM +0200, Denys Vlasenko wrote: > > Can we replace all [s]size_t's with ints/unsigneds? We do not expect > > random pools anywhere near 4 gigabytes... > > Probably that's fine. Is the

Re: [PATCH v9] seedrng: import SeedRNG utility for kernel RNG seed files

2022-04-29 Thread Denys Vlasenko
On Wed, Apr 27, 2022 at 6:55 PM Jason A. Donenfeld wrote: > On Wed, Apr 27, 2022 at 06:15:50PM +0200, Denys Vlasenko wrote: > > if ((unlink(filename) < 0 || fsync(dfd) < 0) && seed_len) { > > bb_perror_msg("can't%s seed", &q

Re: [PATCH v9] seedrng: import SeedRNG utility for kernel RNG seed files

2022-04-27 Thread Denys Vlasenko
Good day Jason, On Wed, Apr 20, 2022 at 6:29 PM Jason A. Donenfeld wrote: > Hi Bernhard, > > On Wed, Apr 20, 2022 at 3:55 PM Bernhard Reutner-Fischer > wrote: > > I've applied this v9 now, thanks for the patch and thanks a lot for your > > patience! > > Excellent! Thank you. Feel free to CC me

Re: [PATCH] vi: improved handling of backspace in replace mode

2022-03-04 Thread Denys Vlasenko
Applied, thank you On Thu, Mar 3, 2022 at 12:41 PM Ron Yorston wrote: > > In replace mode ('R' command) the backspace character should get > special treatment: > > - backspace only goes back to the start of the replacement; > - backspacing over replaced characters restores the original text. > >

Re: suspected bug in timeout command

2022-03-01 Thread Denys Vlasenko
On Tue, Mar 1, 2022 at 11:15 PM David Laight wrote: > From: Denys Vlasenko > > and a separate "spawn 40k 'sleep 0.03'" loop > > seems to indicate that openat(fd, ".") on the exited > > /proc/PID fails, and continues to fail > > even if anot

Re: suspected bug in timeout command

2022-03-01 Thread Denys Vlasenko
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 child. E.g. it can send signals > to it, get waitpid notifica

Re: suspected bug in timeout command

2022-03-01 Thread Denys Vlasenko
On Tue, Mar 1, 2022 at 6:52 PM Steffen Nurpmeso wrote: > David Laight wrote in > : > |From: Denys Vlasenko > |> Sent: 01 March 2022 16:40 > |> On Tue, Feb 15, 2022 at 12:31 PM Rob Landley wrote: > |>> On 2/14/22 10:09 AM, Roberto A. Foglietta wrote:

Re: suspected bug in timeout command

2022-03-01 Thread Denys Vlasenko
On Tue, Feb 15, 2022 at 12:31 PM Rob Landley wrote: > On 2/14/22 10:09 AM, Roberto A. Foglietta wrote: > > However, if this bug shows-up, probably it means that the system has > > a lot of processes running and a lot of processes created and > > destroyed compared to the max PID available. Thus,

Re: [PATCH] ash: don't read past end of var in subvareval for bash substitutions

2022-02-28 Thread Denys Vlasenko
On Mon, Feb 28, 2022 at 8:38 AM wrote: > From: Sören Tempel > > Without this patch, BusyBox handles bash pattern substitutions without > a terminating '/' character incorrectly. > > Consider the following shell script: > > _bootstrapver=5.0.211-r0 >

Re: CONFIG_FEATURE_UNIX_LOCAL

2022-02-25 Thread Denys Vlasenko
On Mon, Feb 14, 2022 at 2:20 PM Spare Project wrote: > Using busybox and dropbear trying to blag unix socket forwarding without > installing more software. > > nc -l local:/tmp/socket doesn’t create any socket ? Incorrect syntax. Should be: nc -l -s local:/tmp/socket

Re: Error with make_single_applets and CONFIG_FEATURE_CUT_REGEX

2022-01-23 Thread Denys Vlasenko
Applied, thank you On Fri, Jan 21, 2022 at 2:36 AM Jeff Pohlmeyer wrote: > > I am getting a failure when CONFIG_FEATURE_CUT_REGEX=y is enabled: > > ./make_single_applets.sh CUT > > cut.c:(.text.cut_main+0x205): undefined reference to `xregcomp' > > It looks like adding this line: > >

Re: [PATCH] apply const trick to ptr_to_globals

2022-01-23 Thread Denys Vlasenko
Applied, thank you On Wed, Jan 12, 2022 at 7:55 PM Khem Raj wrote: > > This was missing in the previous attempt to fix it via [1] > > This helps fix segfaults when compiling with clang ( seen on riscv64 ) > > [ 452.428349] less[270]: unhandled signal 11 code 0x1 at 0x000c > in

Re: [PATCH] mkfs.vfat: fix volume label to be padded with space

2022-01-23 Thread Denys Vlasenko
Applied, thank you On Fri, Jan 21, 2022 at 12:17 PM Timo Teräs wrote: > > The specification requires volume label to be zero padded. > > Latest fsck.vfat will remove the zero padded volume label > as invalid. See also: > https://github.com/dosfstools/dosfstools/issues/172 > > Make the default

Re: [PATCH] Add support for long options to cmp

2022-01-23 Thread Denys Vlasenko
Applied, thank you. On Fri, Jan 21, 2022 at 3:00 PM Walter Lozano wrote: > > In order to improve compatibility with GNU cmp add support for long > options to busybox cmp. > > Signed-off-by: Walter Lozano > --- > editors/cmp.c | 15 ++- > 1 file changed, 14 insertions(+), 1

Re: [PATCH v2] XXXsum: handle binary sums with " " in the path

2022-01-08 Thread Denys Vlasenko
Applied, thank you On Fri, Jan 7, 2022 at 2:18 PM Emanuele Giacomelli wrote: > > If a line specifies a binary checksum whose path contains two adjacent > spaces, when checking digests with -c the two spaces will be used as the > separator between the digest and the pathname instead of " *", as

Re: [PATCH] fdisk: recognize EBBR protective partitions

2022-01-06 Thread Denys Vlasenko
Applied, thanks On Mon, Dec 13, 2021 at 10:08 AM Vincent Stehlé wrote: > > The MBR partition type 0xF8 is used by the Arm EBBR specification[1] for > protective partitions over fixed-location firmware images. > > [1]: https://github.com/ARM-software/ebbr > > Signed-off-by: Vincent Stehlé > ---

Re: sort -h?

2022-01-06 Thread Denys Vlasenko
Good day Rob. On Thu, Jan 6, 2022 at 12:59 AM Rob Landley wrote: > We presumably got pinged by the same guy. Over on my side of the mirror > https://github.com/landley/toybox/issues/184 and > https://github.com/landley/toybox/issues/312 resulted me adding and then > removing the feature again: >

Re: BusyBox sed 'w' loses data on occasion

2022-01-04 Thread Denys Vlasenko
Fixed in git. On Sun, Jan 2, 2022 at 2:49 AM Paul Eggert wrote: > > This bug in BusyBox 'sed' broke a Gnulib-based build; see > . > > The problem is that BusyBox 'sed' is confused about the 'w FILE' > command. When there are multiple 'w

Re: [PATCH v2] ed: add support for -s command-line option as mandated by POSIX

2021-12-29 Thread Denys Vlasenko
Applied, thank you On Wed, Dec 29, 2021 at 4:16 PM wrote: > > From: Sören Tempel > > Apart from the -p option, POSIX also mandates an -s option which > suppresses the output of byte counts for the e, E, r, and w command. > From these commands, Busybox ed presently only implements the r and w >

Re: [PATCH] ed: add support for -s command-line option as mandated by POSIX

2021-12-28 Thread Denys Vlasenko
On Tue, Dec 28, 2021 at 11:46 AM wrote: > > From: Sören Tempel > > Apart from the -p option, POSIX also mandates an -s option which > suppresses the output of byte counts for the e, E, r, and w command. > From these commands, Busybox ed presently only implements the r and w > commands. This

Re: scripts/shell.c doesn't support '\0'

2021-12-28 Thread Denys Vlasenko
On Tue, Dec 28, 2021 at 12:00 PM Chris Boot wrote: > On 28/12/2021 08:07, Denys Vlasenko wrote: > >> It > >> turns out that scripts/shell.c cannot output a NUL for the "\0" in the > >> test string, thus breaking this test. > > > > What is sc

Re: [PATCH] sed: do not ignore 'g' modifier when match starts with ^

2021-12-24 Thread Denys Vlasenko
Applied, thank you On Tue, Dec 21, 2021 at 2:01 PM Dominique Martinet wrote: > > It is perfectly valid to start a regex with ^ and have other patterns > with \| that can match more than once, e.g. the following example > should print ca, as illustrated with gnu sed: > $ echo 'abca' | sed -e

Re: [PATCH] ed: align output of read command with POSIX.1-2008

2021-12-19 Thread Denys Vlasenko
Applied, thanks On Wed, Nov 17, 2021 at 3:19 PM wrote: > > From: Sören Tempel > > POSIX.1-2008 mandates the following regarding the read command: > > If the read is successful, and -s was not specified, the number > of bytes read shall be written to standard output in the >

Re: [PATCH] ed: fix current line number for file passed via the command-line

2021-12-19 Thread Denys Vlasenko
Applied, thanks On Wed, Nov 17, 2021 at 3:16 PM wrote: > > From: Sören Tempel > > POSIX.1-2008 mandates the following regarding the file command-line > argument: > > If the file argument is given, ed shall simulate an e command > on the file named by the pathname […] > > The

Re: [PATCH] timeout: Add support for "-k" parameter.

2021-12-17 Thread Denys Vlasenko
On Sat, Oct 9, 2021 at 1:28 PM Matthew Slowe wrote: > Add support for GNU coreutils "-k" parameter to timeout applet. > > This patch moves the timing and process checking code into a separate > reusable function and adds a optional second timeout which will send a > SIGKILL to the process if it's

Re: [PATCH v2] ed: add support for -p command-line option as mandated by POSIX

2021-12-17 Thread Denys Vlasenko
Applied, thank you. On Sun, Nov 21, 2021 at 12:25 PM wrote: > > From: Sören Tempel > > The POSIX.1-2008 specification of ed(1) mandates two command-line > options: -p (for specifying a prompt string) and -s (to suppress writing > of byte counts). This commit adds support for the former.

Re: [PATCH] cmp: add support for -n

2021-12-17 Thread Denys Vlasenko
Applied, thank you On Thu, Nov 25, 2021 at 5:12 PM Walter Lozano wrote: > > Add support to for "-n" to cmp in order to compare at most n bytes. > > Signed-off-by: Walter Lozano > --- > editors/cmp.c | 13 ++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > > diff --git

Re: [PATCH] find: implement -samefile

2021-12-17 Thread Denys Vlasenko
Applied, thanks On Sun, Nov 28, 2021 at 11:28 AM Aaro Koskinen wrote: > > Implement -samefile. > > Signed-off-by: Aaro Koskinen > --- > findutils/find.c | 35 +++ > 1 file changed, 35 insertions(+) > > diff --git a/findutils/find.c b/findutils/find.c > index

Re: [PATCH] printf: allow 0 as a flag and allow multiple flags

2021-12-17 Thread Denys Vlasenko
On Thu, Dec 16, 2021 at 12:26 PM Ron Yorston wrote: > The '%' character in a format specification may be followed by > one or more flags from the list "+- #0". BusyBox printf didn't > support the '0' flag or allow multiple flags to be provided. > As a result the formats '%0*d' and '%0 d' were

Re: How to go forward with zstd

2021-12-13 Thread Denys Vlasenko
On Fri, Dec 10, 2021 at 10:17 PM Norbert Lange wrote: > Hello, > > the question is still open whether BB is ok with taking the upstream > zstd sources and semi-automatically export them [1]. cost is around > 17K in binary size with a few manual code removals, ie- without > diverting from upstream

Re: [PATCH] libarchive/get_header_ar.c: fix extraction of archives from binutils in deterministic mode

2021-12-12 Thread Denys Vlasenko
Applied, thanks! On Fri, Dec 10, 2021 at 2:30 PM Peter Korsgaard wrote: > > > "Peter" == Peter Korsgaard writes: > > > GNU binutils in deterministic mode (ar rD or built with > > --enable-deterministic-archives) hard codes file mode to 0644 (NOT 0100644) > > since

Re: udhcpc6 client_id option bug

2021-12-12 Thread Denys Vlasenko
On Thu, Dec 9, 2021 at 1:36 AM Danomi Manchego wrote: > Maybe udhcp_find_option needs a "bool dhcpv6" arg just like > udhcp_insert_new_option, or else maybe there needs to be a > udhcp_find_option6 option? Yes. Done so in git, please try it. ___

Re: xxd: incompatible -p option

2021-12-12 Thread Denys Vlasenko
On Mon, Dec 6, 2021 at 12:56 PM Rafał Miłecki wrote: > Hi, > > I deal with ~4 MiB of binary data stored as hex numbers in 1-line text > file. I need to convert numbers to raw binary data. That can be done > with -r -p options. > > With standalone xxd it works perfectly fine: > $ cat data.bin |

Re: [PATCH] Makefile.flags: use all cflags for crypt and rt checks

2021-12-12 Thread Denys Vlasenko
Applied, thank you. On Mon, Nov 8, 2021 at 5:56 PM Martin Kaiser wrote: > > From: Martin Kaiser > > To check if libcrypt and librt are available, we check if we can > compile and link a simple test program. > > These checks do not match the actual linking if CONFIG_STATIC is enabled. > For

Re: [PATCH] wget: custom Content-Type for --post-data and --post-file

2021-12-11 Thread Denys Vlasenko
THe patch is whitespace-damaged. Also buggy if !ENABLE_FEATURE_WGET_AUTHENTICATION. Fixed and applied. On Mon, Oct 18, 2021 at 8:03 PM Ildar Shaimordanov wrote: > > Allow end-users to customize Content-Type for --post-data and --post-file. > > More explanation in this PR:

Re: Request for 1.33.2 release

2021-11-24 Thread Denys Vlasenko
On Thu, Nov 11, 2021 at 5:09 PM Natanael Copa wrote: > Hi! > > I think it would be nice with a 1.33.2 release, with fixes for all the recent > CVEs. > > Those commits should be cherry-picked to 1_33_stable: > > 4d4fc5ca5ee4f (man: fix segfault in "man 1") CVE-2021-42373 This is not a security

Re: Backporting security fixes for 1_31_stable, 1_32_stable and 1_33_stable

2021-11-18 Thread Denys Vlasenko
On Thu, Nov 11, 2021 at 11:50 AM Natanael Copa wrote: > The list of awk fixes is a bit more complicated. I have no clue which > of the following commits fixes which CVE: > > $ git log --format=oneline 1_33_0..1_34_0 -- editors/awk.c > dabbeeb79356eef78528acd55e1f143ae80372f7 awk: whitespace and

Re: which -a

2021-11-09 Thread Denys Vlasenko
Fixed in git. On Tue, Oct 26, 2021 at 12:53 PM tito wrote: > > Hi, > today I noticed that the which command doesn't > show the -a command line option in its usage. > > Ciao, > Tito > ___ > busybox mailing list > busybox@busybox.net >

Re: [PATCH] ls: recognize "never" for LS_COLORS

2021-11-09 Thread Denys Vlasenko
On Thu, Oct 21, 2021 at 1:40 PM roger peppe wrote: > This patch was made to commit 836b79211df3aeaba1b8b65c6db5ee6193172cc0. > > The standard `ls` command uses the value "never" (not "none") to signify that > the output should not be colorized. This change lets the same value apply >

Re: [PATCH v2 1/2] cpio: add support for --ignore-devno like GNU cpio

2021-10-13 Thread Denys Vlasenko
Applied, thank you. On Wed, Aug 4, 2021 at 7:25 PM Ariadne Conill wrote: > > Hi, > > Just following up on this patch and the other one. It would be nice to > get them upstream. > > Ariadne > > On Mon, 28 Jun 2021, Ariadne Conill wrote: > > > The --ignore-devno option is used to set device

Re: [PATCH v2 2/2] cpio: add support for --renumber-inodes like GNU cpio

2021-10-13 Thread Denys Vlasenko
Applied, thank you. On Mon, Jun 28, 2021 at 4:32 PM Ariadne Conill wrote: > > The --renumber-inodes option renumbers the inodes starting from 1, > so that the sequence of inodes is always stable. This helps with > reproducibility. > > function old

Re: [PATCH] ed: align output of write command with POSIX-1.2008

2021-10-12 Thread Denys Vlasenko
Applied, thank you! On Sat, Jul 17, 2021 at 9:46 PM wrote: > > From: Sören Tempel > > POSIX.1-2008 mandates the following regarding the write command: > > If the command is successful, the number of bytes written shall > be written to standard output, unless the -s option was >

Re: [PATCH] ash: fix command name of shell scripts

2021-10-11 Thread Denys Vlasenko
On Mon, Oct 11, 2021 at 2:24 PM wrote: > I forgot to mention that the issue isn't triggered by the default > busybox configuration. > I noticed the issue in OpenWrt which uses > CONFIG_FEATURE_PREFER_APPLETS=y by default, > and that option triggers the issue. Aha. Reproduced. Fixed in git,

Re: [PATCH] ash: fix command name of shell scripts

2021-10-10 Thread Denys Vlasenko
On Sun, Oct 10, 2021 at 11:09 PM wrote: > Hello, > > when executing a script with ash from busybox in the shebang then the command > name will contain "sh" instead of the name of the script as expected. Can't reproduce: I see script name in comm field, not "sh" or "ash": $ cat comm.tests {

Re: [PATCH 0/1] Silence analyzer warning in chrt

2021-10-10 Thread Denys Vlasenko
On Sun, Oct 10, 2021 at 10:28 AM Bernhard Reutner-Fischer wrote: > > Fixes the following -fanalyzer warning with at least gcc-12. > Ok for trunk? Yes please ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox

Re: [PATCH] Make const ptr assign as function call in clang

2021-10-09 Thread Denys Vlasenko
ring there as well, right? From 5156b245536ce0f07165793f07c63fd9fa5dd3b7 Mon Sep 17 00:00:00 2001 From: YU Jincheng Date: Sun, 10 Oct 2021 02:19:51 +0800 Subject: [PATCH] Make const ptr assign as function call in clang - This can act as memory barrier in clang to avoid read before assign of a const ptr Signed-off-by: LoveSy

Re: [PATCH] Fix const pointer assignment trick on clang 9+

2021-10-09 Thread Denys Vlasenko
On Fri, Oct 8, 2021 at 10:39 AM 余生与君 wrote: > On Thu, Oct 7, 2021 at 9:48 PM Denys Vlasenko > wrote: > > On Thu, Oct 7, 2021 at 3:25 PM 余生与君 wrote: > > > > where p is a dummy, unused variable > > > No. p here shadows the global variable with the same name loca

Re: [PATCH] ash: improve speed of variable pattern substitution

2021-10-08 Thread Denys Vlasenko
On Wed, Jul 21, 2021 at 10:54 PM Alin Mr wrote: > > Ron, thanks for your quick patch and the hints. I saw your message and was > thinking through; fixed-length patterns don't need backtracking. '?' > (without '*') also results in fixed-length patterns, so maybe that'd be more > complicated to

Re: [PATCH] ash.c: speedup ${s:} substring (no quotes)

2021-10-08 Thread Denys Vlasenko
On Wed, Jul 28, 2021 at 10:40 AM Alin Mr wrote: > This trivial patch makes ${s:...} at least as fast as ${s#??..} in > simple tests. It's probably faster for longer substrings, but then one > wouldn't use ${s#"1024???s"} anyway -- one would switch away from sh. > memmove could possibly be

Re: [PATCH] libbb: better coreutils compatibility for realpath

2021-10-08 Thread Denys Vlasenko
Applied, thanks. On Sat, Jul 31, 2021 at 2:52 PM Ron Yorston wrote: > > Add some tests which coreutils realpath pass but BusyBox realpath > fails (bar one). Adjust xmalloc_realpath_coreutils() so the tests > pass: > > - Expand symbolic links before testing whether the last path component >

Re: [PATCH v2 1/1] mktemp: add tmpdir option

2021-10-08 Thread Denys Vlasenko
Applied, thanks On Fri, Jun 25, 2021 at 8:01 AM Andrej Valek wrote: > > Make mktemp more compatible with coreutils. > - add "--tmpdir" option > - add long variants for "d,q,u" options > > Note: Upstream ca-certificate update script started using this option. > > Signed-off-by: Andrej Valek >

Re: devmem: use mmap64 replace mmap

2021-10-08 Thread Denys Vlasenko
On Fri, Oct 8, 2021 at 10:16 AM xiechengliang wrote: > > I have built busybox with CONFIG_LFS=y, this problem still exists. > > mmap is defined in glibc as below: > void *mmap(void *addr, size_t len, int prot , int flags , int fd, off_t > offset); > The type of last parameter offset is off_ t,

Re: Redirection of stdout for commands

2021-10-08 Thread Denys Vlasenko
On Fri, Oct 8, 2021 at 4:15 PM wrote: > Hello there, > > 1st time post here. > > On a BusyBox based system (image built recently) I have a program > calling external executables and reading their text output. > This is done with fork, execl, and beforehand, redirecting the output > with dup2,

Re: [PATCH] Fix const pointer assignment trick on clang 9+

2021-10-08 Thread Denys Vlasenko
On Fri, Oct 8, 2021 at 4:21 PM Denys Vlasenko wrote: > Can you try this? > > #if defined(__clang_major__) && __clang_major__ >= 9 > /* Clang/llvm drops assignment to "constant" storage. Silently. > * Needs serious convincing to not eliminate the stor

Re: [PATCH] Fix const pointer assignment trick on clang 9+

2021-10-08 Thread Denys Vlasenko
On Fri, Oct 8, 2021 at 10:39 AM 余生与君 wrote: > On Thu, Oct 7, 2021 at 9:48 PM Denys Vlasenko > wrote: > > Can you try something more? E.g. (in current git): > > > > #define ASSIGN_CONST_PTR(p, v) do { \ > > *(void**)not_const_pp() = (void*)(v); \ >

Re: httpd ranges do not work over 4gb

2021-10-08 Thread Denys Vlasenko
On Fri, Oct 8, 2021 at 2:45 PM Lauri Kasanen wrote: > > Hi, > > On current bb master httpd, when the client requests valid Range: bytes > over 4gb, the response is wrong - it sends the entire file instead of > the requested range. > > E.g. > Range: bytes=5926192128-5926195199 > > This is on

Re: switch_root and /etc/inittab

2021-10-08 Thread Denys Vlasenko
I'm terribly late for this... On Tue, Jun 15, 2021 at 4:55 PM Porter, Jeremy wrote: > Thank you for the example--that was helpful to see how this works. > > I have initramfs in Linux enabled and I've been using that for a long time. I > should be able to use switch_root. > > I followed the

Re: Curious bug in remounting read-only cdrom mount point

2021-10-07 Thread Denys Vlasenko
On Mon, Aug 9, 2021 at 8:07 AM Roberto A. Foglietta wrote: > I found a corious bug in remounting a read-only cdrom mount point in busybox > v1.33.0. > Possibly the bug stays also in previous and later versions. > ssh root@10.0.2.17 'mount -o remount,rw /mnt/sr0; echo $?' #0 Should be fixed

Re: Would a patch implementing the netns feature to iplink.c be interesting?

2021-10-07 Thread Denys Vlasenko
On Mon, Sep 27, 2021 at 4:40 AM blowfist wrote: > Hey there, > > I've made a few patches to busybox to add a few standard features to > busybox which aren't yet supported in busybox. I'm using these for my project > jailTools and I was wondering if they would stand any chance of being merged >

Re: [PATCH v2] ntpd: support logging to syslog even if running in foreground

2021-10-07 Thread Denys Vlasenko
On Wed, Jul 7, 2021 at 12:06 AM Aleksander Mazur wrote: > Please consider attached version of the patch, which works for me. > > Dnia 2021-02-08, o godz. 16:37:14 > napisał(a): > > > Dnia 2021-01-16, o godz. 15:11:22 > > Joachim Wiberg napisał(a): > > > > > This patch adds support in ntpd for

Re: devmem: use mmap64 replace mmap

2021-10-07 Thread Denys Vlasenko
This should be solvable by building with CONFIG_LFS=y - this makes off_t 64-bit and makes all operations on files 64-bit aware. Can you try that? On Mon, Sep 27, 2021 at 4:06 PM xiechengliang wrote: > > Subject: [PATCH] devmem: The type of the physical address to be accessed by > > devmem is

Re: [PATCH 2/3] find: Unify time comparisons

2021-10-07 Thread Denys Vlasenko
Applied 1 and 2, thank you On Wed, Sep 29, 2021 at 1:42 PM Ismael Luceno wrote: > > Split the common part into a function, to be reused. > > The tail call is optimized, meaning now mmin/mtime just prepare arguments > and jump into the common code, thus near zero overhead. > > This reduces code

Re: [PATCH 3/3] find: implement -amin, -atime, -cmin, and -ctime

2021-10-07 Thread Denys Vlasenko
CC findutils/find.o findutils/find.c:435:23: error: ‘func_cmin’ defined but not used [-Werror=unused-function] 435 | static int FAST_FUNC func_##name(const char *fileName UNUSED_PARAM, \ | ^ findutils/find.c:715:1: note: in expansion of macro ‘ACTF’ 715

Re: [PATCH] Fix const pointer assignment trick on clang 9+

2021-10-07 Thread Denys Vlasenko
On Thu, Oct 7, 2021 at 3:25 PM 余生与君 wrote: > > where p is a dummy, unused variable > No. p here shadows the global variable with the same name local > variable so the following context (scope) will use this local variable > instead of the global one. Aha... The problem here is that even though

Re: [PATCH] Fix const pointer assignment trick on clang 9+

2021-10-07 Thread Denys Vlasenko
On Wed, Sep 29, 2021 at 11:37 AM LoveSy wrote: > > From: YU Jincheng > > - clang 9+ will load the const pointer first before the const > pointer assignment trick and thus cause null pointer defer. > - This patch creates a shadow variable to prevent the above from > happening for clang 9+. >

Re: [PATCH] Fix const pointer assignment trick on clang 9+

2021-10-07 Thread Denys Vlasenko
On Wed, Sep 29, 2021 at 11:37 AM LoveSy wrote: > > From: YU Jincheng > > - clang 9+ will load the const pointer first before the const > pointer assignment trick and thus cause null pointer defer. > - This patch creates a shadow variable to prevent the above from > happening for clang 9+. >

Re: [PATCH] wget: implement --post-file

2021-10-01 Thread Denys Vlasenko
On Tue, Sep 28, 2021 at 10:28 AM Ron Yorston wrote: > Add the --post-file option to send form data from a file. As with > --post-data it's up to the user to ensure that the data is encoded > as appropriate: all wget does is stuff the provided data into > the request. > > The --post-data and

Re: [PATCH] less: Ignore -X

2021-09-28 Thread Denys Vlasenko
Applied, thanks On Tue, Sep 28, 2021 at 9:48 PM Ismael Luceno wrote: > > The flag disables termcap init/deinit of the terminal, which the applet > doesn't do anyway. > > Signed-off-by: Ismael Luceno > --- > miscutils/less.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: allnoconfig fails to build

2021-09-28 Thread Denys Vlasenko
Fixed in git. On Tue, Sep 28, 2021 at 11:12 AM Norbert Lange wrote: > > Seems like the config option ASH_ALIAS *needs* to be always enabled > > CC shell/ash.o > /tmp/git/busybox/shell/ash.c: In function ‘freestrings’: > /tmp/git/busybox/shell/ash.c:10945:9: error: ‘struct strpush’ has no

Re: [PATCH] cal: implement -m

2021-09-21 Thread Denys Vlasenko
Applied, thank you On Tue, Sep 21, 2021 at 9:43 AM Ron Yorston wrote: > > Some people prefer the week to start on Monday. Add the '-m' > option to support this. > > function old new delta > cal_main

Re: wget command does not work

2021-09-21 Thread Denys Vlasenko
On Tue, Sep 21, 2021 at 9:45 AM Sukreet pal wrote: > > Hi busybox developers, > > I have a arm v7 processor which I am emulating in qemu and I have made a root > file system with busybox - 1.33.1. > > I am unable to use wget command to download anything on my virtual board but > I can ping to

Re: [PATCH] libbb: code shrink parse_datestr (again)

2021-09-18 Thread Denys Vlasenko
libbb/time.c:144:4: error: a label can only be part of a statement and a declaration is not a statement Applied, thank you On Sat, Sep 18, 2021 at 9:41 AM Ron Yorston wrote: > > Commit 9fe1548bb (date,touch: allow timezone offsets in dates) > mentioned the similarity between '@' format dates

Re: [PATCH] libbb: ensure mode_string is NUL terminated

2021-09-17 Thread Denys Vlasenko
Applied, thank you On Fri, Sep 17, 2021 at 11:16 AM Ron Yorston wrote: > > If the mode_string array is no longer static we can't rely on > it being NUL terminated. > > function old new delta > bb_mode_string

Re: [PATCH] chmod: correctly report changed modes

2021-09-16 Thread Denys Vlasenko
Applied, thanks On Thu, Sep 16, 2021 at 2:03 AM Wolf wrote: > > Chmod used to incorrectly report as changed even files for which the > mode did not change. This was caused by extra bits in the st_mode, that > were not present when parsed from passed argument in the form of octal > number. > ---

Re: [PATCH] date,touch: allow timezone offsets in dates

2021-09-16 Thread Denys Vlasenko
Applied, thank you. On Thu, Sep 16, 2021 at 11:26 AM Ron Yorston wrote: > > Allow ISO 8601 style dates to include a timezone offset. Like > the '@' format these dates aren't relative to the user's current > timezone and shouldn't be subject to DST adjustment. > > - The implementation uses the

Re: [PATCH] getopt: code shrink

2021-09-15 Thread Denys Vlasenko
Applied, thanks On Sun, Sep 12, 2021 at 1:26 PM Ron Yorston wrote: > > function old new delta > .rodata99277 99290 +13 > normalize177 142 -35 >

Re: [PATCH] libbb: code shrink parse_datestr

2021-09-15 Thread Denys Vlasenko
Applied, thank you. On Tue, Sep 14, 2021 at 9:53 AM Ron Yorston wrote: > > The default build uses strptime() in parse_datestr() to support the > 'month_name d HH:MM:SS ' format of GNU date. If we've linked > with strptime() there's an advantage is using it for other formats > too. > >

Re: [PATCH 2/3] ash: stopped jobs should only prevent exit from interactive shell

2021-09-14 Thread Denys Vlasenko
On Tue, Sep 14, 2021 at 3:45 PM Roberto A. Foglietta wrote: > Il giorno mar 14 set 2021 alle ore 12:24 Denys Vlasenko > ha scritto: > > > > I am going to replace every raise_exception(EXEXIT) with exitshell() > > > > and to remove the EXEXIT altogether. > &g

Re: [PATCH 2/3] ash: stopped jobs should only prevent exit from interactive shell

2021-09-14 Thread Denys Vlasenko
On Tue, Sep 14, 2021 at 10:04 AM Roberto A. Foglietta wrote: > Il giorno dom 12 set 2021 alle ore 18:55 Roberto A. Foglietta > ha scritto: > > > I am going to replace every raise_exception(EXEXIT) with exitshell() > > and to remove the EXEXIT altogether. There is only one: in exitcmd(), the

Re: [PATCH 0/3] ash: ignoreeof and interactive vs. non-interactive shells

2021-09-14 Thread Denys Vlasenko
Applied, thank you. Patch #3 can have fewer nesting: if (!top || numeof >= 50) break; if (!stoppedjobs()) { + if (!iflag) + break;

<    1   2   3   4   5   6   7   8   9   10   >