aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * hush: if !JOBS, skip tests which wouldn't workDenys Vlasenko2025-08-0313-2/+41
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: don't save history in subshells; on NOMMU, don't be interactive on reexecDenys Vlasenko2025-08-031-54/+72
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: rename hush_exit to save_history_run_exit_trap_and_exit, sigexit to ↵Denys Vlasenko2025-08-031-15/+15
| | | | | | | | | | | | restore_ttypgrp_and_killsig_or__exit Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shell: fix the check of empty HISTFILEDenys Vlasenko2025-08-031-1/+1
| | | | | | | | | | | | | | | | The check for "" history file is done on a wrong state pointer. Fixes: shell: empty HISTFILE disables history saving, just as unset one did Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ftpd: code shrink, move replace_char() to libbbDenys Vlasenko2025-08-027-53/+46
| | | | | | | | | | | | | | | | | | | | | | function old new delta modprobe_main 803 804 +1 escape_text 127 122 -5 replace 18 - -18 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/1 up/down: 1/-23) Total: -22 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ls: don't do unnecessary tty operations when called from ftpdDenys Vlasenko2025-08-011-5/+13
| | | | | | | | | | | | | | function old new delta ls_main 660 690 +30 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ls: code shrinkDenys Vlasenko2025-08-011-19/+20
| | | | | | | | | | | | Looks like gcc can figure this out by itself, but let's be explicit Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/dump: much faster formatting of %_u on x86Denys Vlasenko2025-08-012-3/+19
| | | | | | | | | | | | | | function old new delta display 1485 1481 -4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: code shrinkDenys Vlasenko2025-08-011-4/+9
| | | | | | | | | | | | | | function old new delta static.PBKDF2_SHA256 219 165 -54 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ls: fix -Q to match GNUDenys Vlasenko2025-08-016-34/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta print_name 137 229 +92 display_files 375 402 +27 c_escape_conv_str00 - 24 +24 display 1476 1485 +9 conv_str 33 - -33 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 3/0 up/down: 152/-33) Total: 119 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ls: lack of -q should not suppress -QDenys Vlasenko2025-07-311-4/+6
| | | | | | | | | | | | | | | | | | | | function old new delta print_name 134 137 +3 display_files 374 375 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 4/0) Total: 4 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ls: implement -q, fix -w0, reduce startup timeDenys Vlasenko2025-07-312-62/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta ls_main 598 660 +62 ls_longopts - 47 +47 G_isatty - 36 +36 print_name 102 134 +32 display_files 358 374 +16 .rodata 105829 105833 +4 vgetopt32 1330 1317 -13 static.ls_longopts 47 - -47 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 4/1 up/down: 197/-60) Total: 137 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: use safe_waitpid() or wait_any_nohang() where approppriateDenys Vlasenko2025-07-303-7/+9
| | | | | | | | | | | | | | | | | | | | | | function old new delta crond_main 1227 1237 +10 init_main 804 794 -10 wait_one 263 252 -11 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 10/-21) Total: -11 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * crond: reap orphaned grandchildren to prevent zombie buildupValentin Lab2025-07-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a cron job launches a background task, e.g. `sh -c "sleep 5 &"`, the shell exits immediately and the `sleep` process is re-parented to PID 1. When BusyBox `crond` itself happens to be PID 1 (common in a minimal container), those orphans become direct children of `crond`. Because `crond` only calls waitpid() for the PIDs it explicitly tracks, these processes remain forever in Z state and the container slowly fills with zombies. Add a small `while (waitpid(-1, NULL, WNOHANG) > 0)` sweep at the end of check_completions() so any stray children are reaped. When `crond` is not PID 1 the loop returns -ECHILD immediately, so behaviour and overhead on a normal system are unchanged. Size impact: +12 bytes on x86-64 (gcc 13.3.0 -Os, static) Signed-off-by: Valentin Lab <valentin.lab@kalysto.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * date: return failure exit code on clock_settime errorLadislav Michl2025-07-301-1/+1
| | | | | | | | | | Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sha3sum: add -aBITS testsDenys Vlasenko2025-07-302-4/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sha384sum: new appletAndy Knowles2025-07-306-31/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta sha512384_end - 198 +198 packed_usage 35021 35134 +113 init384 - 80 +80 sha384_begin - 19 +19 sha384_end - 10 +10 applet_names 2823 2833 +10 md5_sha1_sum_main 501 507 +6 sha3_end 54 59 +5 applet_main 1628 1632 +4 show_usage_if_dash_dash_help 79 72 -7 hash_file 358 344 -14 sha512_end 197 10 -187 ------------------------------------------------------------------------------ (add/remove: 4/0 grow/shrink: 5/3 up/down: 445/-208) Total: 237 bytes Signed-off-by: Andy Knowles <aknowles@galleonec.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Use Windows API for checksums on ARM64Ron Yorston2025-08-121-1/+1
| | | | | | | | | | | | The ARM64 build had native Windows support for TLS by default, but not checksums. Add this, so the ARM 64 build matches the Unicode build.
* | Post-merge fixesRon Yorston2025-08-123-7/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream has moved some functions from networking/tls.c to a new file, libbb/hash_hmac.c. The merge didn't adjust this code to allow it to work with the native Windows checksum API. This only matters if FEATURE_USE_CNG_API is enabled and CONFIG_FEATURE_TLS_SCHANNEL isn't. In that case the wget applet fails to handle https. None of the default configurations has this combination, but it should work. Make it so. The Windows code doesn't implement hmac_block(), as that's only used for password encryption which isn't currently supported. The variadic function hmac_peek_hash() isn't declared FAST_FUNC, as that causes clang to issue many warnings.
* | Merge branch 'busybox' into mergeRon Yorston2025-08-1241-627/+3129
|\|
| * telnetd: improve --helpDenys Vlasenko2025-07-271-2/+2
| | | | | | | | | | | | | | function old new delta packed_usage 34996 35021 +25 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: SHA-NI - document that unpckhpd also works, no code changesDenys Vlasenko2025-07-222-0/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: SHA-NI code shrinkDenys Vlasenko2025-07-222-34/+66
| | | | | | | | | | | | | | function old new delta sha256_process_block64_shaNI 673 657 -16 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: change define names in SHA-NI code to match kernel source more closelyDenys Vlasenko2025-07-212-166/+166
| | | | | | | | | | | | No code changes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: de-unroll salsa20()Denys Vlasenko2025-07-202-23/+76
| | | | | | | | | | | | | | function old new delta salsa20 760 296 -464 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: crypt_make_pw_salt(): fix yescrypt's random salt last charDenys Vlasenko2025-07-192-4/+12
| | | | | | | | | | | | | | function old new delta crypt_make_pw_salt 128 146 +18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cryptpw: fix detection of crypt algo from salt (was broken if default isn't DES)Denys Vlasenko2025-07-192-11/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | The symptom is: "cryptpw ... implicit" testsuite tests were failing if CONFIG_FEATURE_DEFAULT_PASSWD_ALGO is not "des". function old new delta cryptpw_main 223 283 +60 pw_encrypt 974 975 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 61/0) Total: 61 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: code shrinkDenys Vlasenko2025-07-191-28/+25
| | | | | | | | | | | | | | function old new delta blockmix_xor_save 1169 708 -461 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * bootchartd: check the result of opendir("/proc")Denys Vlasenko2025-07-191-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tftp: use bb_error_msg instead of info_msg for a debug messageDenys Vlasenko2025-07-181-1/+1
| | | | | | | | | | | | This is the only use of bb_info_msg in tftp. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ntpd: replace two bb_info_msg's with bb_error_msgDenys Vlasenko2025-07-181-2/+2
| | | | | | | | | | | | All other messages are printed via bb_error_msg in this applet. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sulogin: set ^C to SIG_DFL before execing the shellDenys Vlasenko2025-07-181-3/+6
| | | | | | | | | | | | | | function old new delta sulogin_main 331 340 +9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * password applets: update help textDenys Vlasenko2025-07-182-4/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb.h: increase MAX_PW_SALT_LENDenys Vlasenko2025-07-172-8/+7
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: actually, largest allowed salt is 86 chars, support thatDenys Vlasenko2025-07-173-15/+23
| | | | | | | | | | | | | | function old new delta yescrypt_r 767 756 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: code shrinkDenys Vlasenko2025-07-151-15/+8
| | | | | | | | | | | | | | function old new delta blockmix_xor 1177 702 -475 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: code shrinkDenys Vlasenko2025-07-112-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta salsa20 684 650 -34 blockmix_salsa8 198 144 -54 blockmix 762 565 -197 blockmix_xor 1322 1028 -294 blockmix_xor_save 1499 1103 -396 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/5 up/down: 0/-975) Total: -975 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: code shrinkDenys Vlasenko2025-07-092-15/+28
| | | | | | | | | | | | | | | | | | | | function old new delta static.yescrypt_kdf32_body 847 823 -24 yescrypt_r 805 767 -38 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-62) Total: -62 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/bitops.c: add inlining commentDenys Vlasenko2025-07-091-0/+20
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: introduce and use block-XOR functionsDenys Vlasenko2025-07-097-38/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On x86_64, they can be done in 16-byte blocks 64-bit: function old new delta xorbuf_3 - 84 +84 xorbuf64_3_aligned64 - 58 +58 smix1 687 712 +25 xwrite_encrypted 520 534 +14 xorbuf16_aligned_long - 13 +13 tls_xread_record 733 742 +9 xorbuf 21 13 -8 xorbuf_aligned_AES_BLOCK_SIZE 15 - -15 blockmix 814 762 -52 blockmix_salsa8 317 198 -119 blockmix_xor_save 1620 1499 -121 blockmix_xor 1543 1322 -221 ------------------------------------------------------------------------------ (add/remove: 4/1 grow/shrink: 3/5 up/down: 203/-536) Total: -333 bytes 32-bit: function old new delta xorbuf_3 - 76 +76 xorbuf64_3_aligned64 - 36 +36 xorbuf16_aligned_long - 23 +23 xwrite_encrypted 499 507 +8 tls_xread_record 646 650 +4 xorbuf 22 11 -11 xorbuf_aligned_AES_BLOCK_SIZE 23 - -23 blockmix 1083 938 -145 blockmix_salsa8 415 210 -205 blockmix_salsa8_xor 601 163 -438 blockmix_xor 2103 1533 -570 blockmix_xor_save 2614 1859 -755 ------------------------------------------------------------------------------ (add/remove: 4/1 grow/shrink: 2/6 up/down: 147/-2147) Total: -2000 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: fix SEGV on "echo << >" and suchDenys Vlasenko2025-07-085-0/+11
| | | | | | | | | | | | | | | | | | | | function old new delta .rodata 105787 105823 +36 fetch_heredocs 461 477 +16 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 52/0) Total: 52 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: code shrink in sha_crypt()Denys Vlasenko2025-07-081-2/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: disable NROM codeDenys Vlasenko2025-07-082-27/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta smix1 - 595 +595 smix2 - 414 +414 static.yescrypt_kdf32_body 899 847 -52 static.smix2 420 - -420 static.smix1 604 - -604 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 0/1 up/down: 1009/-1076) Total: -67 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: disable code which accepts unusual yescrypt parametersDenys Vlasenko2025-07-082-53/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Almost any reasonable yescrypt hashes in /etc/shadow should only ever use "jXY" parameters which set N and r. Fancy multi-byte-encoded wide integers are not needed for that. function old new delta static.yescrypt_kdf32_body - 899 +899 static.PBKDF2_SHA256 213 219 +6 decode64_uint32 141 - -141 yescrypt_r 990 805 -185 yescrypt_kdf32_body 1423 - -1423 ------------------------------------------------------------------------------ (add/remove: 1/2 grow/shrink: 1/1 up/down: 905/-1749) Total: -844 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: explain and shrink decode64_uint32()Denys Vlasenko2025-07-082-10/+79
| | | | | | | | | | | | | | function old new delta decode64_uint32 177 141 -36 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: code shrinkDenys Vlasenko2025-07-082-19/+49
| | | | | | | | | | | | | | | | | | | | | | | | Setting EINVAL in errno is not necessary, just error return works. function old new delta yescrypt_kdf32_body 1434 1423 -11 yescrypt_r 1029 990 -39 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-50) Total: -50 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: madvise(MADV_HUGEPAGE) our usually very large allocationDenys Vlasenko2025-07-071-2/+13
| | | | | | | | | | | | | | | | | | Nearly ~2 faster run when buffer is gigabytes in size function old new delta yescrypt_kdf32_body 1386 1406 +20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: disable unrolling in two placesDenys Vlasenko2025-07-071-96/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | Also, make many define macros safer function old new delta blockmix 2300 814 -1486 blockmix_xor 4606 1543 -3063 blockmix_xor_save 4737 1620 -3117 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-7666) Total: -7666 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: 64-bit build fixesDenys Vlasenko2025-07-071-8/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * add libbb/yescrypt/PARAMETERSDenys Vlasenko2025-07-073-6/+202
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>