diff --git a/core/busybox/build b/core/busybox/build index a0d907e4..e9bf7390 100755 --- a/core/busybox/build +++ b/core/busybox/build @@ -1,6 +1,6 @@ #!/bin/sh -e -for patch in *.patch; do +for patch in patch/*.patch; do patch -p1 < "$patch" done diff --git a/core/busybox/checksums b/core/busybox/checksums index 60e2cb79..e83fe2a5 100644 --- a/core/busybox/checksums +++ b/core/busybox/checksums @@ -1,4 +1,4 @@ -c35d87f1d04b2b153d33c275c2632e40d388a88f19a9e71727e0bbbff51fe689 +12cec6bd2b16d8a9446dd16130f2b92982f1819f6e1c5f5887b6db03f5660d28 09c2f601fec4e5c10664c22f787dafb9424efe219bf826727c356da90dfd60d5 8d84b1719dca2a751c09072c20cd782a3c47f119a68d35316f89d851daf67b88 0f54301a73af461e8066bc805b48d991cfed513d08a2f036e015b19f97cb424a @@ -6,9 +6,8 @@ c35d87f1d04b2b153d33c275c2632e40d388a88f19a9e71727e0bbbff51fe689 f0e17fefc0af6b10205d72b242b6ef7481a58ff07726c62890ebc5893b96a396 73be7b16dcff44e88eb48696522794f529beddf9d5a139b8a76cc8685a9f6fc8 d70c4cd6381baeb3836c0387f53553021b48bdc851de49f1c86d836f7d0355fc -31b58b4de281ffd65c39a9e83103c57b6dfd2dcf9c19a41f3a9cfa35ef3d263b -e31d4458807b9e686bea993c19237b21dc573f5c15b313d68d474aff7d81a745 -6e9c7bccc102d0e8fa062c750c9d00ec6de6aa67d6b4c6f6b0539247798e6c71 +b9262c2dbc2c42f932ccb24a522092ff66fa1b3195c00583db6d303ff2b61ca0 +f6141447a68127cd4997689687bd8c0f8b7e63e0a17d6eb09d4178b4947c0ce3 ebd61afac770d3d9cae5c411f44002496fb18b28cf7b77520072a3909852246e 814dea14ac612125e97dcc1d619219b2c9dfc14850bf48d858421fb2c98eca12 4a5981f4b0d791fe9b84b0b2e01ae905f6565c8245b3cd603e6decf34ddad71a diff --git a/core/busybox/files/.config b/core/busybox/files/.config index 26f44a7e..5cb9dc75 100644 --- a/core/busybox/files/.config +++ b/core/busybox/files/.config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Busybox version: 1.32.0 -# Sat Jun 27 10:54:15 2020 +# Busybox version: 1.33.1 +# Wed Jun 30 10:12:55 2021 # CONFIG_HAVE_DOT_CONFIG=y @@ -36,7 +36,6 @@ CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" # CONFIG_FEATURE_CLEAN_UP is not set CONFIG_FEATURE_SYSLOG_INFO=y CONFIG_FEATURE_SYSLOG=y -CONFIG_PLATFORM_LINUX=y # # Build Options @@ -55,6 +54,7 @@ CONFIG_EXTRA_LDFLAGS="" CONFIG_EXTRA_LDLIBS="" CONFIG_USE_PORTABLE_CODE=y CONFIG_STACK_OPTIMIZATION_386=y +CONFIG_STATIC_LIBGCC=y # # Installation Options ("make install" behavior) @@ -331,6 +331,7 @@ CONFIG_UNIQ=y CONFIG_UNLINK=y CONFIG_USLEEP=y CONFIG_UUDECODE=y +# CONFIG_BASE32 is not set CONFIG_BASE64=y CONFIG_UUENCODE=y CONFIG_WC=y @@ -623,7 +624,6 @@ CONFIG_FSTRIM=y CONFIG_GETOPT=y CONFIG_FEATURE_GETOPT_LONG=y CONFIG_HEXDUMP=y -CONFIG_FEATURE_HEXDUMP_REVERSE=y CONFIG_HD=y # CONFIG_XXD is not set CONFIG_HWCLOCK=y @@ -716,6 +716,7 @@ CONFIG_VOLUMEID=y CONFIG_FEATURE_VOLUMEID_BCACHE=y CONFIG_FEATURE_VOLUMEID_BTRFS=y CONFIG_FEATURE_VOLUMEID_CRAMFS=y +# CONFIG_FEATURE_VOLUMEID_EROFS is not set CONFIG_FEATURE_VOLUMEID_EXFAT=y CONFIG_FEATURE_VOLUMEID_EXT=y CONFIG_FEATURE_VOLUMEID_F2FS=y @@ -875,6 +876,10 @@ CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y CONFIG_FEATURE_HTTPD_ERROR_PAGES=y CONFIG_FEATURE_HTTPD_PROXY=y CONFIG_FEATURE_HTTPD_GZIP=y +# CONFIG_FEATURE_HTTPD_ETAG is not set +# CONFIG_FEATURE_HTTPD_LAST_MODIFIED is not set +# CONFIG_FEATURE_HTTPD_DATE is not set +# CONFIG_FEATURE_HTTPD_ACL_IP is not set CONFIG_IFCONFIG=y CONFIG_FEATURE_IFCONFIG_STATUS=y CONFIG_FEATURE_IFCONFIG_SLIP=y @@ -969,13 +974,13 @@ CONFIG_TLS=y CONFIG_TUNCTL=y CONFIG_FEATURE_TUNCTL_UG=y CONFIG_VCONFIG=y -CONFIG_WGET=y -CONFIG_FEATURE_WGET_LONG_OPTIONS=y -CONFIG_FEATURE_WGET_STATUSBAR=y -CONFIG_FEATURE_WGET_AUTHENTICATION=y -CONFIG_FEATURE_WGET_TIMEOUT=y -CONFIG_FEATURE_WGET_HTTPS=y -CONFIG_FEATURE_WGET_OPENSSL=y +# CONFIG_WGET is not set +# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set +# CONFIG_FEATURE_WGET_STATUSBAR is not set +# CONFIG_FEATURE_WGET_AUTHENTICATION is not set +# CONFIG_FEATURE_WGET_TIMEOUT is not set +# CONFIG_FEATURE_WGET_HTTPS is not set +# CONFIG_FEATURE_WGET_OPENSSL is not set CONFIG_WHOIS=y # CONFIG_ZCIP is not set # CONFIG_UDHCPD is not set diff --git a/core/busybox/files/.config-suid b/core/busybox/files/.config-suid index 93d52667..72e3afd6 100644 --- a/core/busybox/files/.config-suid +++ b/core/busybox/files/.config-suid @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Busybox version: 1.32.0 -# Sat Jun 27 10:56:42 2020 +# Busybox version: 1.33.1 +# Wed Jun 30 10:16:08 2021 # CONFIG_HAVE_DOT_CONFIG=y @@ -36,7 +36,6 @@ CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" # CONFIG_FEATURE_CLEAN_UP is not set CONFIG_FEATURE_SYSLOG_INFO=y CONFIG_FEATURE_SYSLOG=y -CONFIG_PLATFORM_LINUX=y # # Build Options @@ -55,6 +54,7 @@ CONFIG_EXTRA_LDFLAGS="" CONFIG_EXTRA_LDLIBS="" CONFIG_USE_PORTABLE_CODE=y # CONFIG_STACK_OPTIMIZATION_386 is not set +CONFIG_STATIC_LIBGCC=y # # Installation Options ("make install" behavior) @@ -327,6 +327,7 @@ CONFIG_UNAME_OSNAME="" # CONFIG_UNLINK is not set # CONFIG_USLEEP is not set # CONFIG_UUDECODE is not set +# CONFIG_BASE32 is not set # CONFIG_BASE64 is not set # CONFIG_UUENCODE is not set # CONFIG_WC is not set @@ -607,7 +608,6 @@ CONFIG_DEFAULT_DEPMOD_FILE="" # CONFIG_GETOPT is not set # CONFIG_FEATURE_GETOPT_LONG is not set # CONFIG_HEXDUMP is not set -# CONFIG_FEATURE_HEXDUMP_REVERSE is not set # CONFIG_HD is not set # CONFIG_XXD is not set # CONFIG_HWCLOCK is not set @@ -620,6 +620,7 @@ CONFIG_DEFAULT_DEPMOD_FILE="" # CONFIG_LOSETUP is not set # CONFIG_LSPCI is not set # CONFIG_LSUSB is not set +# CONFIG_FEATURE_LSUSB_STRINGS is not set # CONFIG_MDEV is not set # CONFIG_FEATURE_MDEV_CONF is not set # CONFIG_FEATURE_MDEV_RENAME is not set @@ -691,6 +692,7 @@ CONFIG_DEFAULT_DEPMOD_FILE="" # CONFIG_FEATURE_VOLUMEID_BCACHE is not set # CONFIG_FEATURE_VOLUMEID_BTRFS is not set # CONFIG_FEATURE_VOLUMEID_CRAMFS is not set +# CONFIG_FEATURE_VOLUMEID_EROFS is not set # CONFIG_FEATURE_VOLUMEID_EXFAT is not set # CONFIG_FEATURE_VOLUMEID_EXT is not set # CONFIG_FEATURE_VOLUMEID_F2FS is not set @@ -850,6 +852,10 @@ CONFIG_FEATURE_IPV6=y # CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set # CONFIG_FEATURE_HTTPD_PROXY is not set # CONFIG_FEATURE_HTTPD_GZIP is not set +# CONFIG_FEATURE_HTTPD_ETAG is not set +# CONFIG_FEATURE_HTTPD_LAST_MODIFIED is not set +# CONFIG_FEATURE_HTTPD_DATE is not set +# CONFIG_FEATURE_HTTPD_ACL_IP is not set # CONFIG_IFCONFIG is not set # CONFIG_FEATURE_IFCONFIG_STATUS is not set # CONFIG_FEATURE_IFCONFIG_SLIP is not set diff --git a/core/busybox/patches/fix-UB+clang.patch b/core/busybox/patches/fix-UB+clang.patch deleted file mode 100644 index 4f4bbbdb..00000000 --- a/core/busybox/patches/fix-UB+clang.patch +++ /dev/null @@ -1,172 +0,0 @@ -From d941b59087d34cb93053b638c066bf080122e7bb Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 16 Jan 2019 22:39:24 -0800 -Subject: [PATCH] Turn ptr_to_globals and bb_errno to be non const - -writing to a const variable is undefined behavior - -This is undefined as per (C99 6.7.3 paragraph 5) see [1] - -errno and ptr_to_globals is written to in code, this fails with -segfaults when compiled with clang - -unsigned FAST_FUNC bb_strtou(const char *arg, char **endp, int base) -{ - unsigned long v; - char *endptr; - - if (!endp) endp = &endptr; - *endp = (char*) arg; - - if (!isalnum(arg[0])) return ret_ERANGE(); - errno = 0; - v = strtoul(arg, endp, base); - if (v > UINT_MAX) return ret_ERANGE(); - return handle_errors(v, endp); - } - -without 'const' ( working code ) - -Dump of assembler code for function bb_strtou: - 0x0000555555568298 <+0>: push %rbx - 0x0000555555568299 <+1>: sub $0x10,%rsp - 0x000055555556829d <+5>: test %rsi,%rsi - 0x00005555555682a0 <+8>: lea 0x8(%rsp),%rbx - 0x00005555555682a5 <+13>: cmovne %rsi,%rbx - 0x00005555555682a9 <+17>: mov %rdi,(%rbx) - 0x00005555555682ac <+20>: mov (%rdi),%al - 0x00005555555682ae <+22>: lea -0x30(%rax),%ecx - 0x00005555555682b1 <+25>: cmp $0xa,%cl - 0x00005555555682b4 <+28>: jb 0x5555555682be - 0x00005555555682b6 <+30>: or $0x20,%al - 0x00005555555682b8 <+32>: add $0x9f,%al - 0x00005555555682ba <+34>: cmp $0x1a,%al - 0x00005555555682bc <+36>: jae 0x5555555682dc - 0x00005555555682be <+38>: mov 0x107da3(%rip),%rax # 0x555555670068 -=> 0x00005555555682c5 <+45>: movl $0x0,(%rax) - 0x00005555555682cb <+51>: mov %rbx,%rsi - 0x00005555555682ce <+54>: callq 0x555555564310 - 0x00005555555682d3 <+59>: mov %rax,%rcx - 0x00005555555682d6 <+62>: shr $0x20,%rcx - 0x00005555555682da <+66>: je 0x5555555682f0 - 0x00005555555682dc <+68>: mov 0x107d85(%rip),%rax # 0x555555670068 - 0x00005555555682e3 <+75>: movl $0x22,(%rax) - 0x00005555555682e9 <+81>: mov $0xffffffff,%eax - 0x00005555555682ee <+86>: jmp 0x5555555682fb - 0x00005555555682f0 <+88>: mov %rax,%rdi - 0x00005555555682f3 <+91>: mov %rbx,%rsi - 0x00005555555682f6 <+94>: callq 0x5555555681e8 - 0x00005555555682fb <+99>: add $0x10,%rsp - 0x00005555555682ff <+103>: pop %rbx - 0x0000555555568300 <+104>: retq - -here address of bb_errno is valid rax = 0x7ffff7cac6c0 - -with 'const' ( non-working code ) - -Dump of assembler code for function bb_strtou: - 0x00005555555682a4 <+0>: push %r14 - 0x00005555555682a6 <+2>: push %rbx - 0x00005555555682a7 <+3>: push %rax - 0x00005555555682a8 <+4>: test %rsi,%rsi - 0x00005555555682ab <+7>: mov %rsp,%rbx - 0x00005555555682ae <+10>: cmovne %rsi,%rbx - 0x00005555555682b2 <+14>: mov %rdi,(%rbx) - 0x00005555555682b5 <+17>: mov (%rdi),%al - 0x00005555555682b7 <+19>: lea -0x30(%rax),%ecx - 0x00005555555682ba <+22>: cmp $0xa,%cl - 0x00005555555682bd <+25>: jb 0x5555555682d6 - 0x00005555555682bf <+27>: or $0x20,%al - 0x00005555555682c1 <+29>: add $0x9f,%al - 0x00005555555682c3 <+31>: cmp $0x1a,%al - 0x00005555555682c5 <+33>: jb 0x5555555682d6 - 0x00005555555682c7 <+35>: mov 0x107d9a(%rip),%rax # 0x555555670068 - 0x00005555555682ce <+42>: movl $0x22,(%rax) - 0x00005555555682d4 <+48>: jmp 0x5555555682fc - 0x00005555555682d6 <+50>: mov 0x107d8b(%rip),%r14 # 0x555555670068 -=> 0x00005555555682dd <+57>: movl $0x0,(%r14) - 0x00005555555682e4 <+64>: mov %rbx,%rsi - 0x00005555555682e7 <+67>: callq 0x555555564300 - 0x00005555555682ec <+72>: mov %rax,%rcx - 0x00005555555682ef <+75>: shr $0x20,%rcx - 0x00005555555682f3 <+79>: je 0x555555568303 - 0x00005555555682f5 <+81>: movl $0x22,(%r14) - 0x00005555555682fc <+88>: mov $0xffffffff,%eax - 0x0000555555568301 <+93>: jmp 0x55555556830e - 0x0000555555568303 <+95>: mov %rax,%rdi - 0x0000555555568306 <+98>: mov %rbx,%rsi - 0x0000555555568309 <+101>: callq 0x5555555681f4 - 0x000055555556830e <+106>: add $0x8,%rsp - 0x0000555555568312 <+110>: pop %rbx - 0x0000555555568313 <+111>: pop %r14 - 0x0000555555568315 <+113>: retq - -r14 is 0x0 and writing to this ofcourse ends up in segfault - -[1] https://bugs.llvm.org/show_bug.cgi?id=39919 - -Signed-off-by: Khem Raj ---- - coreutils/test.c | 2 +- - include/libbb.h | 4 ++-- - libbb/lineedit.c | 2 +- - shell/ash.c | 5 ++--- - 4 files changed, 6 insertions(+), 7 deletions(-) - ---- a/coreutils/test.c -+++ b/coreutils/test.c -@@ -401,7 +401,7 @@ struct test_statics { - }; - - /* See test_ptr_hack.c */ --extern struct test_statics *const test_ptr_to_statics; -+extern struct test_statics *test_ptr_to_statics; - - #define S (*test_ptr_to_statics) - #define args (S.args ) ---- a/include/libbb.h -+++ b/include/libbb.h -@@ -342,7 +342,7 @@ struct BUG_off_t_size_is_misdetected { - #if defined(__GLIBC__) - /* glibc uses __errno_location() to get a ptr to errno */ - /* We can just memorize it once - no multithreading in busybox :) */ --extern int *const bb_errno; -+extern int *bb_errno; - #undef errno - #define errno (*bb_errno) - #endif -@@ -2168,7 +2168,7 @@ struct globals; - /* '*const' ptr makes gcc optimize code much better. - * Magic prevents ptr_to_globals from going into rodata. - * If you want to assign a value, use SET_PTR_TO_GLOBALS(x) */ --extern struct globals *const ptr_to_globals; -+extern struct globals *ptr_to_globals; - - #if defined(__clang_major__) && __clang_major__ >= 9 - /* Clang/llvm drops assignment to "constant" storage. Silently. ---- a/libbb/lineedit.c -+++ b/libbb/lineedit.c -@@ -181,7 +181,7 @@ struct lineedit_statics { - }; - - /* See lineedit_ptr_hack.c */ --extern struct lineedit_statics *const lineedit_ptr_to_statics; -+extern struct lineedit_statics * lineedit_ptr_to_statics; - - #define S (*lineedit_ptr_to_statics) - #define state (S.state ) ---- a/shell/ash.c -+++ b/shell/ash.c -@@ -300,10 +300,9 @@ typedef long arith_t; - * set "-DBB_GLOBAL_CONST=''" in CONFIG_EXTRA_CFLAGS to disable - * this optimization. - */ --#ifndef BB_GLOBAL_CONST --# define BB_GLOBAL_CONST const --#endif - -+#undef BB_GLOBAL_CONST -+#define BB_GLOBAL_CONST - - /* ============ Hash table sizes. Configurable. */ - diff --git a/core/busybox/sources b/core/busybox/sources index 73b4d100..1e15468c 100644 --- a/core/busybox/sources +++ b/core/busybox/sources @@ -1,12 +1,11 @@ -https://busybox.net/downloads/busybox-1.32.0.tar.bz2 -patches/adduser-no-setgid.patch -patches/fsck-resolve-uuid.patch -patches/modprobe-kernel-version.patch -patches/print-unicode.patch -patches/install-fix-chown.patch -patches/lsusb-vendor-product.patch -patches/unzip-usage-no-error.patch -patches/fix-UB+clang.patch +https://busybox.net/downloads/busybox-1.33.1.tar.bz2 +patches/adduser-no-setgid.patch patch +patches/fsck-resolve-uuid.patch patch +patches/modprobe-kernel-version.patch patch +patches/print-unicode.patch patch +patches/install-fix-chown.patch patch +patches/lsusb-vendor-product.patch patch +patches/unzip-usage-no-error.patch patch files/.config files/.config-suid files/acpid.run diff --git a/core/busybox/version b/core/busybox/version index c5fef111..741d8133 100644 --- a/core/busybox/version +++ b/core/busybox/version @@ -1 +1 @@ -1.32.0 3 +1.33.1 1