Sizes of busybox-1.35.0 and busybox-1.36.0 (with equivalent config, static uclibc build):
+ text data bss dec hex filename
+1044070 908 14328 1059306 1029ea busybox-1.35.0
+1046317 908 14328 1061553 1032b1 busybox-1.36.0
+
+
+
+
Changes since previous release:
+
Aaro Koskinen:
+ devmem: add 128-bit width
+
+Bernhard Reutner-Fischer (3):
+ kbuild: fix building sha256
+ kbuild: Prefer -Oz over -Os
+ seedrng: manually inline seed_rng
+
+Brandon Maier:
+ xxd: fix typo in trivial usage
+
+Dario Binacchi (2):
+ fbset: abort on not handled options
+ fbset: support setting pixel clock rate
+
+David Leonard:
+ tsort: new applet
+
+Denys Vlasenko:
+ Makefile.flags: add resolv to LDLIBS for linux compilers too (not only gnu ones)
+ build system: detect if build host has no bzip2
+ libbb/loop: fix compile failure (name collision)
+ libbb/loop: optionally use ioctl(LOOP_CONFIGURE) to set up loopdevs
+ libbb/loop: restore the correct return vaule of set_loop()
+ libbb/sha1: add config-selectable fully unrolled version, closes 14391
+ libbb/sha1: add config-selectable partially unrolled version
+ libbb/sha1: assembly versions for x86
+ libbb/sha1: optional x86 hardware accelerated hashing
+ libbb/sha256: optional x86 hardware accelerated hashing
+ libbb: change xstrndup, xmemdup to take size_t as size parameter
+ libbb: factor out fflush_stdout_and_exit(EXIT_SUCCESS)
+ libbb: fflush_stdout_and_exit(0) still exits with _error_ (not 0!) if fflush fails
+ libbb: fix fallout from nth_string() robustification, closes 14726
+ libbb: introduce and use chdir_or_warn()
+ libbb: invert the meaning of SETUP_ENV_NO_CHDIR -> SETUP_ENV_CHDIR
+ tls: P256: remove NOP macro sp_256_norm_8()
+ tls: include signature_algorithms extension in client hello message
+ examples/var_service/dhcp_if: make helper scripts more talkative
+ testsuite/mount.tests: accomodate umount failure seen on 5.18.0
+ testsuite/sha1sum.tests: fix false positive failure
+ testsuite/tree.tests: fix false positive failure
+ shell: add comments about SIGINT-related problems
+ shell: fix compile failures in some configs
+ ash,hush: fix handling of SIGINT while waiting for interactive input
+ ash: ^C with SIG_INGed SIGINT should not exit the shell
+ ash: do not truncate failed tilde expansion on unknown user names
+ ash: fix ifs cleanup on error paths
+ ash: fix unsafe use of mempcpy
+ ash: fix use-after-free in pattern substituon code
+ awk: input numbers are never octal or hex (only program consts can be)
+ bc: hopefully fix bug 14956 (use-after-free)
+ cut: build fix for FEATURE_CUT_REGEX
+ ifplugd: split -a into -a and -A, latter disables upping in iface creation
+ init: do not set HOME
+ ls: implement ls -sh (human-readable allocated blocks)
+ md5/shaXsum: use FEATURE_COPYBUF_KB to size the buffer instead of fixed 4k
+ mv: fix error in !VERBOSE configs
+ nmeter: %[md] %[mw] - dirty file-backed pages, writeback pages
+ powertop: fix cpuid asm: ebx saving/restoring is properly done by gcc
+ scripts/echo.c: fix NUL handling in "abc\0 def"
+ sed: correctly handle 'w FILE' commands writing to the same file
+ sed: fix double-free in FEATURE_CLEAN_UP=y configs
+ sed: fix handling of escaped delimiters in s/// replacement
+ sed: fix handling of escaped delimiters in s/// search pattern, closes 14541
+ seedrng: chdir to the SEED_DIRECTORY - avoid concat_path_file's
+ seedrng: do not hash in a constant string, it's not adding entropy
+ seedrng: do not hash lengths, they are very predictable
+ seedrng: do not try to continue on unexpected errors (just exit)
+ seedrng: explain why we need locking and fsync'ing
+ seedrng: include file/dir names in error messages
+ seedrng: it's not a part of util-linux, move to miscutils
+ seedrng: prepare read_new_seed() to not need a "success" retval
+ seedrng: re-add fsync after unlink, and explain its purpose
+ seedrng: reduce MAX_SEED_LEN from 512 to 256
+ seedrng: remove redundant assignment
+ seedrng: remove unnecessary zero-filling of local variables
+ seedrng: restore error check on fsync
+ seedrng: simplify read_new_seed() to not have error return
+ seedrng: use more xfuncs where appropriate
+ shaNNNsum: accept one-space "HASH FILENAME" format for -c, closes 14866
+ sort: fix -k2M (wasn't skipping leading whitespace)
+ sort: fix -s -r interaction: 'stable' order is not affected by -r
+ sort: fix sort -s -u, closes 14871
+ sort: support -h
+ sulogin: increase util-linux compatibility
+ sulogin: start _login_ shell only with -p
+ sulogin: util-linux does not say "normal startup" on Ctrl-D
+ taskset: fix printf format mismatch in !FEATURE_TASKSET_FANCY config. closes 14616
+ top: fix display of large PID/PPID
+ top: improve large PID display in memory ('s') mode
+ tree: make it unicode-aware
+ tree: unicode tweak (use normal space char, 0x20)
+ udhcpc6: add missed big-endian conversions
+ udhcpc6: align FF02__1_2[]
+ udhcpc6: downgrade "opening listen socket" log level to 2
+ udhcpc6: fix binding to network aliases
+ udhcpc6: fix sending of renew messages
+ udhcpc6: use a different default config script
+ xargs: implement -o, closes 15146
+ xxd -r: handle offsets
+ xxd -r: without -p, stop at more than one whitespace, closes 14786
+ xxd: fix use of non-initialized data
+ xxd: use bb_simple_perror_msg... where appropriate
+
+Emanuele Giacomelli:
+ XXXsum: handle binary sums with " " in the path
+
+Grob Grobmann:
+ vi: add 'ZQ' quitting command
+
+Henrique Rodrigues:
+ ping: fix typo in --help text
+
+Jason A. Donenfeld (10):
+ seedrng: import SeedRNG utility for kernel RNG seed files
+ seedrng: use libbb functions
+ seedrng: hoist bb_strtoul out of min/max
+ seedrng: remove some global variables
+ seedrng: further reduce size
+ seedrng: use predefined strings where possible
+ seedrng: avoid needless runtime strlen() call
+ seedrng: compress format strings with %s arguments
+ seedrng: code-golf even smaller
+ seedrng: prune header includes
+
+Khem Raj:
+ apply const trick to ptr_to_globals
+
+Louis Sautier:
+ pkill: add -e to display the name and PID of the process being killed
+
+Ludwig Nussel:
+ libbb: mark stack in assembly files read-only
+
+Natanael Copa (2):
+ awk: fix use after free (CVE-2022-30065)
+ more: accept and ignore -e
+
+Paul Fox:
+ crond: implement support for setting PATH in crontab files
+
+Peter Kaestle:
+ unzip -l: add missed big-endian conversions date and time
+
+Roger Knecht:
+ tree: new applet
+
+Ron Yorston (8):
+ vi: improved handling of backspace in replace mode
+ vi: fix backspace over tab in commands
+ libbb: restore special handling of nomsg errors
+ ash,hush: use HOME for tab completion and prompts
+ vi: fix regression in autoindent handling
+ vi: handle autoindent in 'cc' command
+ lineedit: get PWD from ash
+ libbb: make '--help' handling more consistent
+
+Samuel Thibault:
+ Fix non-Linux builds
+
+Shawn Landden:
+ ash: optional sleep builtin
+
+S??ren Tempel (3):
+ ed: add support for -s command-line option as mandated by POSIX
+ ash: don't read past end of var in subvareval for bash substitutions
+ ash: fix use-after-free in bash pattern substitution
+
+Timo Ter??s:
+ mkfs.vfat: fix volume label to be padded with space
+
+Vincent Stehl??:
+ fdisk: recognize EBBR protective partitions
+
+Walter Lozano:
+ Add support for long options to cmp
+
+Xiaoming Ni (4):
+ loop: fix a race when a free loop device is snatched
+ loop: refactor: extract subfunction get_next_free_loop()
+ loop: simplify code of LOOP_SET_FD failure
+ loop: refactor: extract subfunction set_loopdev_params()
+
+
+
+
+
26 December 2021 -- BusyBox 1.35.0 (unstable)
BusyBox 1.35.0.
(git,
From vda.linux at googlemail.com Tue Jan 3 16:11:37 2023
From: vda.linux at googlemail.com (Denys Vlasenko)
Date: Tue, 3 Jan 2023 17:11:37 +0100
Subject: [git commit] typo fix; remove uninteresting changelog entry
Message-ID: <20230103161210.075B887310@busybox.osuosl.org>
commit: https://git.busybox.net/busybox-website/commit/?id=0b52d2d12f63892c13d2f9f94774562e94eb6a57
branch: https://git.busybox.net/busybox-website/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko
---
news.html | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/news.html b/news.html
index e859d3f..a6430d6 100644
--- a/news.html
+++ b/news.html
@@ -71,7 +71,7 @@ Denys Vlasenko:
build system: detect if build host has no bzip2
libbb/loop: fix compile failure (name collision)
libbb/loop: optionally use ioctl(LOOP_CONFIGURE) to set up loopdevs
- libbb/loop: restore the correct return vaule of set_loop()
+ libbb/loop: restore the correct return value of set_loop()
libbb/sha1: add config-selectable fully unrolled version, closes 14391
libbb/sha1: add config-selectable partially unrolled version
libbb/sha1: assembly versions for x86
@@ -88,7 +88,6 @@ Denys Vlasenko:
examples/var_service/dhcp_if: make helper scripts more talkative
testsuite/mount.tests: accomodate umount failure seen on 5.18.0
testsuite/sha1sum.tests: fix false positive failure
- testsuite/tree.tests: fix false positive failure
shell: add comments about SIGINT-related problems
shell: fix compile failures in some configs
ash,hush: fix handling of SIGINT while waiting for interactive input
From vda.linux at googlemail.com Tue Jan 3 17:12:43 2023
From: vda.linux at googlemail.com (Denys Vlasenko)
Date: Tue, 3 Jan 2023 18:12:43 +0100
Subject: [git commit] typo fix
Message-ID: <20230103171306.92E2B87318@busybox.osuosl.org>
commit: https://git.busybox.net/busybox-website/commit/?id=77d5de74b904136d1d3c9eb1452577fba5148bbf
branch: https://git.busybox.net/busybox-website/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko
---
news.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/news.html b/news.html
index a6430d6..d7d54fb 100644
--- a/news.html
+++ b/news.html
@@ -95,7 +95,7 @@ Denys Vlasenko:
ash: do not truncate failed tilde expansion on unknown user names
ash: fix ifs cleanup on error paths
ash: fix unsafe use of mempcpy
- ash: fix use-after-free in pattern substituon code
+ ash: fix use-after-free in pattern substitution code
awk: input numbers are never octal or hex (only program consts can be)
bc: hopefully fix bug 14956 (use-after-free)
cut: build fix for FEATURE_CUT_REGEX
From vda.linux at googlemail.com Wed Jan 4 01:01:28 2023
From: vda.linux at googlemail.com (Denys Vlasenko)
Date: Wed, 4 Jan 2023 02:01:28 +0100
Subject: [git commit] Further tweak the release message
Message-ID: <20230104010144.2375B873AF@busybox.osuosl.org>
commit: https://git.busybox.net/busybox-website/commit/?id=65f778d5123dd139278ef03d456cf8a2f829579b
branch: https://git.busybox.net/busybox-website/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko
---
news.html | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/news.html b/news.html
index d7d54fb..f986ea7 100644
--- a/news.html
+++ b/news.html
@@ -40,6 +40,8 @@
patches,
how to add a patch)
+
Note: udhcpc6 now uses a different helper script by default (/usr/share/udhcpc/default6.script).
+
Sizes of busybox-1.35.0 and busybox-1.36.0 (with equivalent config, static uclibc build):
text data bss dec hex filename
1044070 908 14328 1059306 1029ea busybox-1.35.0
@@ -69,6 +71,7 @@ David Leonard:
Denys Vlasenko:
Makefile.flags: add resolv to LDLIBS for linux compilers too (not only gnu ones)
build system: detect if build host has no bzip2
+ scripts/echo.c: fix NUL handling in "abc\0 def"
libbb/loop: fix compile failure (name collision)
libbb/loop: optionally use ioctl(LOOP_CONFIGURE) to set up loopdevs
libbb/loop: restore the correct return value of set_loop()
@@ -106,7 +109,6 @@ Denys Vlasenko:
mv: fix error in !VERBOSE configs
nmeter: %[md] %[mw] - dirty file-backed pages, writeback pages
powertop: fix cpuid asm: ebx saving/restoring is properly done by gcc
- scripts/echo.c: fix NUL handling in "abc\0 def"
sed: correctly handle 'w FILE' commands writing to the same file
sed: fix double-free in FEATURE_CLEAN_UP=y configs
sed: fix handling of escaped delimiters in s/// replacement
@@ -117,8 +119,6 @@ Denys Vlasenko:
seedrng: do not try to continue on unexpected errors (just exit)
seedrng: explain why we need locking and fsync'ing
seedrng: include file/dir names in error messages
- seedrng: it's not a part of util-linux, move to miscutils
- seedrng: prepare read_new_seed() to not need a "success" retval
seedrng: re-add fsync after unlink, and explain its purpose
seedrng: reduce MAX_SEED_LEN from 512 to 256
seedrng: remove redundant assignment
@@ -195,14 +195,14 @@ Roger Knecht:
tree: new applet
Ron Yorston (8):
- vi: improved handling of backspace in replace mode
- vi: fix backspace over tab in commands
libbb: restore special handling of nomsg errors
+ libbb: make '--help' handling more consistent
+ lineedit: get PWD from ash
ash,hush: use HOME for tab completion and prompts
vi: fix regression in autoindent handling
vi: handle autoindent in 'cc' command
- lineedit: get PWD from ash
- libbb: make '--help' handling more consistent
+ vi: improved handling of backspace in replace mode
+ vi: fix backspace over tab in commands
Samuel Thibault:
Fix non-Linux builds
@@ -229,7 +229,6 @@ Xiaoming Ni (4):
loop: refactor: extract subfunction get_next_free_loop()
loop: simplify code of LOOP_SET_FD failure
loop: refactor: extract subfunction set_loopdev_params()
-
From vda.linux at googlemail.com Thu Jan 5 15:21:48 2023
From: vda.linux at googlemail.com (Denys Vlasenko)
Date: Thu, 5 Jan 2023 16:21:48 +0100
Subject: [git commit] ed: don't use memcpy with overlapping memory regions
Message-ID: <20230105152201.3303E87635@busybox.osuosl.org>
commit: https://git.busybox.net/busybox/commit/?id=ca96022d6edaaf619324db5a481698231d74d1df
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
The memcpy invocations in the subCommand function, modified by this
commit, previously used memcpy with overlapping memory regions. This is
undefined behavior. On Alpine Linux, it causes BusyBox ed to crash since
we compile BusyBox with -D_FORTIFY_SOURCE=2 and our fortify-headers
implementation catches this source of undefined behavior [0]. The issue
can only be triggered if the replacement string is the same size or
shorter than the old string.
Looking at the code, it seems to me that a memmove(3) is what was
actually intended here, this commit modifies the code accordingly.
[0]: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13504
Signed-off-by: S??ren Tempel
Signed-off-by: Denys Vlasenko
---
editors/ed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/editors/ed.c b/editors/ed.c
index 209ce9942..4a84f7433 100644
--- a/editors/ed.c
+++ b/editors/ed.c
@@ -720,7 +720,7 @@ static void subCommand(const char *cmd, int num1, int num2)
if (deltaLen <= 0) {
memcpy(&lp->data[offset], newStr, newLen);
if (deltaLen) {
- memcpy(&lp->data[offset + newLen],
+ memmove(&lp->data[offset + newLen],
&lp->data[offset + oldLen],
lp->len - offset - oldLen);
From vda at busybox.net Tue Jan 3 14:15:41 2023
From: vda at busybox.net (Denys Vlasenko)
Date: Tue, 3 Jan 2023 15:15:41 +0100
Subject: [branch/1_36_stable] new branch created
Message-ID: <20230105152431.0864A87636@busybox.osuosl.org>
commit: https://git.busybox.net/busybox/commit/?id=70f77e4617e06077231b8b63c3fb3406d7f8865d
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/1_36_stable
From vda.linux at googlemail.com Thu Jan 5 15:26:49 2023
From: vda.linux at googlemail.com (Denys Vlasenko)
Date: Thu, 5 Jan 2023 16:26:49 +0100
Subject: [git commit branch/1_36_stable] ed: don't use memcpy with overlapping
memory regions
Message-ID: <20230105152716.1348687638@busybox.osuosl.org>
commit: https://git.busybox.net/busybox/commit/?id=f15dfd86c4fba78881071dd0f5c63466fa9737a2
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/1_36_stable
The memcpy invocations in the subCommand function, modified by this
commit, previously used memcpy with overlapping memory regions. This is
undefined behavior. On Alpine Linux, it causes BusyBox ed to crash since
we compile BusyBox with -D_FORTIFY_SOURCE=2 and our fortify-headers
implementation catches this source of undefined behavior [0]. The issue
can only be triggered if the replacement string is the same size or
shorter than the old string.
Looking at the code, it seems to me that a memmove(3) is what was
actually intended here, this commit modifies the code accordingly.
[0]: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13504
Signed-off-by: S??ren Tempel
Signed-off-by: Denys Vlasenko
---
editors/ed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/editors/ed.c b/editors/ed.c
index 209ce9942..4a84f7433 100644
--- a/editors/ed.c
+++ b/editors/ed.c
@@ -720,7 +720,7 @@ static void subCommand(const char *cmd, int num1, int num2)
if (deltaLen <= 0) {
memcpy(&lp->data[offset], newStr, newLen);
if (deltaLen) {
- memcpy(&lp->data[offset + newLen],
+ memmove(&lp->data[offset + newLen],
&lp->data[offset + oldLen],
lp->len - offset - oldLen);
From bugzilla at busybox.net Sat Jan 7 13:48:04 2023
From: bugzilla at busybox.net (bugzilla at busybox.net)
Date: Sat, 07 Jan 2023 13:48:04 +0000
Subject: [Bug 6242] rpc: switch to libtirpc
In-Reply-To:
References:
Message-ID:
https://bugs.busybox.net/show_bug.cgi?id=6242
--- Comment #4 from 306595428 at qq.com <306595428 at qq.com> ---
how to switch rpc to libtirpc ? thanks!
--
You are receiving this mail because:
You are on the CC list for the bug.
From bugzilla at busybox.net Sat Jan 7 13:55:13 2023
From: bugzilla at busybox.net (bugzilla at busybox.net)
Date: Sat, 07 Jan 2023 13:55:13 +0000
Subject: [Bug 4562] need to link against libtirpc with FEATURE_MOUNT_NFS and
glibc-2.14+
In-Reply-To:
References:
Message-ID:
https://bugs.busybox.net/show_bug.cgi?id=4562
--- Comment #8 from 306595428 at qq.com <306595428 at qq.com> ---
(In reply to Denys Vlasenko from comment #5)
how to do it? i had add CONFIG_EXTRA_LDLIBS: libtirpc and tirpc, the result
also is failed.
--
You are receiving this mail because:
You are on the CC list for the bug.
From bugzilla at busybox.net Sun Jan 8 20:30:06 2023
From: bugzilla at busybox.net (bugzilla at busybox.net)
Date: Sun, 08 Jan 2023 20:30:06 +0000
Subject: [Bug 15236] New: [1.36] SIGILL on accessing sha256 on some CPUs
Message-ID:
https://bugs.busybox.net/show_bug.cgi?id=15236
Bug ID: 15236
Summary: [1.36] SIGILL on accessing sha256 on some CPUs
Product: Busybox
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: tonistiigi at gmail.com
CC: busybox-cvs at busybox.net, vda.linux at googlemail.com
Target Milestone: ---
Since 1.36, accessing sha256sum sometimes errors "illegal instruction". v1.35
seems to work properly.
This can be demonstrated in Github Actions infra, which schedules jobs on
different types of CPUs, causing them to fail when they hit the wrong one.
Please see
https://github.com/tonistiigi/gh-busybox-sigill-debug/actions/runs/3858482123/jobs/6577057476
for logs.
In GH infra:
Good CPUs: 8370C, E5-2673
Bad CPUs: 8171M, 8272CL
Likely regression from
https://github.com/mirror/busybox/commit/6472ac942898437e040171cec991de1c0b962f72
but didn't verify.
--
You are receiving this mail because:
You are on the CC list for the bug.
From bugzilla at busybox.net Wed Jan 11 17:02:45 2023
From: bugzilla at busybox.net (bugzilla at busybox.net)
Date: Wed, 11 Jan 2023 17:02:45 +0000
Subject: [Bug 14226] Busybox md5sum fails to support backslashes in filenames
In-Reply-To:
References:
Message-ID:
https://bugs.busybox.net/show_bug.cgi?id=14226
--- Comment #1 from tlaurion ---
The same behavior applies to sha256sum -c
For example (taken out of
https://github.com/osresearch/heads/pull/1262#issuecomment-1377744973)
cd /boot
mkdir "$(echo -e 'hidden dir\b\b\b\b\b\b\b\b\b\bshowed dir')"
cd *hidden*
touch "$(echo -e 'file with newline\ncharacter')"
touch "file with textual new\nline"
find ./ -type f ! -path './kexec*' -print0 | xargs -0 sha256sum > /tmp/test
sha256sum -c /tmp/test | grep -v 'OK'
sha256sum: can't open './showed dir/file with newline': No such file or
directory
./showed dir/file with newline: FAILED
sha256sum: WARNING: 2 of 340 computed checksums did NOT match
cat /tmp/test
(exerpt)
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ./showed
dir/file with textual new\nline
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ./showed
dir/file with newline
character
cat /tmp/test | grep show
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ./showed
dir/file with textual new\nline
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ./showed
dir/file with newline
ls
(exerpt)
hidden dir??????????showed dir
/boot # cd *hidden*
/boot/showed dir # ls
file with newline?character file with textual new\nline
----
This impacts more than mda5/sha256: this extends to ls and other busybox
applets
--
You are receiving this mail because:
You are on the CC list for the bug.
From bugzilla at busybox.net Fri Jan 13 01:25:36 2023
From: bugzilla at busybox.net (bugzilla at busybox.net)
Date: Fri, 13 Jan 2023 01:25:36 +0000
Subject: [Bug 15256] New: ash treats SIGWINCH as typed newline
Message-ID:
https://bugs.busybox.net/show_bug.cgi?id=15256
Bug ID: 15256
Summary: ash treats SIGWINCH as typed newline
Product: Busybox
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: elly at elly.town
CC: busybox-cvs at busybox.net
Target Milestone: ---
As the summary says. If you start ash, then resize the window it's in, ash acts
as though you had typed a blank line. To reproduce this without resizing a
window, you can start ash in one terminal then send SIGWINCH to it from another
terminal; ash reacts by re-displaying the prompt on a new line as though an
empty line had been typed.
This was introduced some time between 1_35_stable and 1_36_stable, maybe by
12566e7f9b5e5c5d445bc4d36991d134b431dc6c.
--
You are receiving this mail because:
You are on the CC list for the bug.
From vda.linux at googlemail.com Tue Jan 17 15:48:54 2023
From: vda.linux at googlemail.com (Denys Vlasenko)
Date: Tue, 17 Jan 2023 16:48:54 +0100
Subject: [git commit] ntpd: make NTP client and server Y2036/2038-ready
Message-ID: <20230117160249.9B0D587C46@busybox.osuosl.org>
commit: https://git.busybox.net/busybox/commit/?id=85acf71d2579ebe4eec05c6f31901adffa700adc
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
The 32-bit integer part of the NTP timestamp overflows in year 2036,
which starts the second NTP era.
Modify the timestamp conversion to shift values between 1900-1970 (in
the first era) to the second era to enable the client to measure its
offset correctly until year 2106 (assuming 64-bit time_t).
Also update the conversion from double used when stepping the clock to
work with 64-bit time_t after reaching the maximum 32-bit value in 2038
and the server conversion to work correctly in the next NTP era.
function old new delta
lfp_to_d 51 64 +13
step_time 326 332 +6
.rodata 105260 105264 +4
d_to_lfp 100 86 -14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 23/-14) Total: 9 bytes
Signed-off-by: Miroslav Lichvar
Signed-off-by: Denys Vlasenko
---
networking/ntpd.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/networking/ntpd.c b/networking/ntpd.c
index 204e1d7c2..4365166ff 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -554,7 +554,7 @@ gettime1900d(void)
static void
d_to_tv(struct timeval *tv, double d)
{
- tv->tv_sec = (long)d;
+ tv->tv_sec = (time_t)d;
tv->tv_usec = (d - tv->tv_sec) * 1000000;
}
@@ -565,6 +565,14 @@ lfp_to_d(l_fixedpt_t lfp)
lfp.int_partl = ntohl(lfp.int_partl);
lfp.fractionl = ntohl(lfp.fractionl);
ret = (double)lfp.int_partl + ((double)lfp.fractionl / UINT_MAX);
+ /*
+ * Shift timestamps before 1970 to the second NTP era (2036-2106):
+ * int_partl value of OFFSET_1900_1970 (2208988800) is interpreted as
+ * the start of year 1970 and it is the minimal representable time,
+ * all values form the sequence 2208988800..0xffffffff,0..2208988799.
+ */
+ if (lfp.int_partl < OFFSET_1900_1970)
+ ret += (double)(1ULL << 32); /* because int_partl is 32-bit wide */
return ret;
}
static NOINLINE double
@@ -582,8 +590,8 @@ d_to_lfp(l_fixedpt_t *lfp, double d)
{
uint32_t intl;
uint32_t frac;
- intl = (uint32_t)d;
- frac = (uint32_t)((d - intl) * UINT_MAX);
+ intl = (uint32_t)(time_t)d;
+ frac = (uint32_t)((d - (time_t)d) * UINT_MAX);
lfp->int_partl = htonl(intl);
lfp->fractionl = htonl(frac);
}
From vda.linux at googlemail.com Tue Jan 17 16:01:05 2023
From: vda.linux at googlemail.com (Denys Vlasenko)
Date: Tue, 17 Jan 2023 17:01:05 +0100
Subject: [git commit] ntpd: correct fixed->float conversions of fractions
Message-ID: <20230117160249.A5F9087634@busybox.osuosl.org>
commit: https://git.busybox.net/busybox/commit/?id=c344ca6c7f5d8468624ae518d2912d1d9612cb91
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Need to divide by (1<<32), not by (1<<32)-1.
Fraction of 0xffffffff is not 1 whole second.
function old new delta
.rodata 105264 105268 +4
Signed-off-by: Denys Vlasenko
---
networking/ntpd.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/networking/ntpd.c b/networking/ntpd.c
index 4365166ff..ff49550e9 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -564,7 +564,7 @@ lfp_to_d(l_fixedpt_t lfp)
double ret;
lfp.int_partl = ntohl(lfp.int_partl);
lfp.fractionl = ntohl(lfp.fractionl);
- ret = (double)lfp.int_partl + ((double)lfp.fractionl / UINT_MAX);
+ ret = (double)lfp.int_partl + ((double)lfp.fractionl / (1ULL << 32));
/*
* Shift timestamps before 1970 to the second NTP era (2036-2106):
* int_partl value of OFFSET_1900_1970 (2208988800) is interpreted as
@@ -581,7 +581,7 @@ sfp_to_d(s_fixedpt_t sfp)
double ret;
sfp.int_parts = ntohs(sfp.int_parts);
sfp.fractions = ntohs(sfp.fractions);
- ret = (double)sfp.int_parts + ((double)sfp.fractions / USHRT_MAX);
+ ret = (double)sfp.int_parts + ((double)sfp.fractions / (1 << 16));
return ret;
}
#if ENABLE_FEATURE_NTPD_SERVER
@@ -591,7 +591,7 @@ d_to_lfp(l_fixedpt_t *lfp, double d)
uint32_t intl;
uint32_t frac;
intl = (uint32_t)(time_t)d;
- frac = (uint32_t)((d - (time_t)d) * UINT_MAX);
+ frac = (uint32_t)((d - (time_t)d) * 0xffffffff);
lfp->int_partl = htonl(intl);
lfp->fractionl = htonl(frac);
}
@@ -601,7 +601,7 @@ d_to_sfp(s_fixedpt_t *sfp, double d)
uint16_t ints;
uint16_t frac;
ints = (uint16_t)d;
- frac = (uint16_t)((d - ints) * USHRT_MAX);
+ frac = (uint16_t)((d - ints) * 0xffff);
sfp->int_parts = htons(ints);
sfp->fractions = htons(frac);
}
From vda at busybox.net Wed Jan 18 16:38:26 2023
From: vda at busybox.net (Denys Vlasenko)
Date: Wed, 18 Jan 2023 16:38:26 -0000
Subject: [tag/1_36_0] new tag created
Message-ID: <20230118163825.9D79487CAA@busybox.osuosl.org>
commit: https://git.busybox.net/busybox/commit/?id=70f77e4617e06077231b8b63c3fb3406d7f8865d
tag: https://git.busybox.net/busybox/commit/?id=refs/tags/1_36_0
Bump version to 1.36.0
From vda.linux at googlemail.com Wed Jan 18 17:04:22 2023
From: vda.linux at googlemail.com (Denys Vlasenko)
Date: Wed, 18 Jan 2023 18:04:22 +0100
Subject: [git commit] ntpd: correct comment: 2^-20 is ~1 microsecond (confused
with 10^-20)
Message-ID: <20230118170547.AEFFE87C45@busybox.osuosl.org>
commit: https://git.busybox.net/busybox/commit/?id=1040f78176c7dad57aadbbd023e8ac094606ac25
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko
---
networking/ntpd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/networking/ntpd.c b/networking/ntpd.c
index db04eb272..c7519b8fb 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -1040,7 +1040,7 @@ step_time(double offset)
/* This code adds floating point value on the order of 1.0
* to a value of ~4 billion (as of years 203x).
* With 52-bit mantissa, "only" 20 bits of offset's precision
- * are used (0.01 attosecond), the rest is lost.
+ * are used (~1 microsecond), the rest is lost.
* Some 200 billion years later, when tvc.tv_sec would have
* 63 significant bits, the precision loss would be catastrophic,
* a more complex code would be needed.
From vda.linux at googlemail.com Wed Jan 18 16:42:17 2023
From: vda.linux at googlemail.com (Denys Vlasenko)
Date: Wed, 18 Jan 2023 17:42:17 +0100
Subject: [git commit] ntpd: fold d_to_tv() into its only caller
Message-ID: <20230118170547.A5A1987CEE@busybox.osuosl.org>
commit: https://git.busybox.net/busybox/commit/?id=479bd7af0d24d123326c1ceb447e015e9e2955d7
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko
---
networking/ntpd.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/networking/ntpd.c b/networking/ntpd.c
index ff49550e9..db04eb272 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -551,13 +551,6 @@ gettime1900d(void)
return G.cur_time;
}
-static void
-d_to_tv(struct timeval *tv, double d)
-{
- tv->tv_sec = (time_t)d;
- tv->tv_usec = (d - tv->tv_sec) * 1000000;
-}
-
static NOINLINE double
lfp_to_d(l_fixedpt_t lfp)
{
@@ -1044,8 +1037,17 @@ step_time(double offset)
time_t tval;
xgettimeofday(&tvc);
+ /* This code adds floating point value on the order of 1.0
+ * to a value of ~4 billion (as of years 203x).
+ * With 52-bit mantissa, "only" 20 bits of offset's precision
+ * are used (0.01 attosecond), the rest is lost.
+ * Some 200 billion years later, when tvc.tv_sec would have
+ * 63 significant bits, the precision loss would be catastrophic,
+ * a more complex code would be needed.
+ */
dtime = tvc.tv_sec + (1.0e-6 * tvc.tv_usec) + offset;
- d_to_tv(&tvn, dtime);
+ tvn.tv_sec = (time_t)dtime;
+ tvn.tv_usec = (dtime - tvn.tv_sec) * 1000000;
xsettimeofday(&tvn);
VERB2 {
From bugzilla at busybox.net Thu Jan 19 16:23:43 2023
From: bugzilla at busybox.net (bugzilla at busybox.net)
Date: Thu, 19 Jan 2023 16:23:43 +0000
Subject: [Bug 15256] ash treats SIGWINCH as typed newline
In-Reply-To:
References:
Message-ID:
https://bugs.busybox.net/show_bug.cgi?id=15256
--- Comment #1 from maribu ---
Created attachment 9466
--> https://bugs.busybox.net/attachment.cgi?id=9466&action=edit
proposed fix
Hi,
the attached patch seems to fix the issue for me.
Cheers
--
You are receiving this mail because:
You are on the CC list for the bug.
From bugzilla at busybox.net Thu Jan 19 16:27:52 2023
From: bugzilla at busybox.net (bugzilla at busybox.net)
Date: Thu, 19 Jan 2023 16:27:52 +0000
Subject: [Bug 15261] New: Feature request for mount. Add options -L/-U
Message-ID:
https://bugs.busybox.net/show_bug.cgi?id=15261
Bug ID: 15261
Summary: Feature request for mount. Add options -L/-U
Product: Busybox
Version: 1.35.x
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: jbleyel at gmx.net
CC: busybox-cvs at busybox.net
Target Milestone: ---
Feature request for mount.
Can you please add the -L and -U option to mount like the linux mount command.
-L, --label