aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * libbb/yescrypt: remove extra sha256 implementationDenys Vlasenko2025-07-062-521/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta libcperciva_HMAC_SHA256_Init - 159 +159 libcperciva_HMAC_SHA256_Final - 56 +56 SHA256_Buf - 40 +40 static.smix 753 759 +6 yescrypt_kdf32_body 1059 1060 +1 .rodata 105803 105799 -4 initial_state 32 - -32 libcperciva_SHA256_Init 37 - -37 static.cpu_to_be32_vect 51 - -51 _HMAC_SHA256_Final 55 - -55 PAD 64 - -64 libcperciva_HMAC_SHA256_Buf 132 58 -74 libcperciva_SHA256_Buf 86 - -86 SHA256_Pad_Almost 131 - -131 _SHA256_Final 195 - -195 _SHA256_Update 198 - -198 _HMAC_SHA256_Init 213 - -213 Krnd 256 - -256 PBKDF2_SHA256 1003 386 -617 SHA256_Transform 3083 - -3083 ------------------------------------------------------------------------------ (add/remove: 3/12 grow/shrink: 2/3 up/down: 262/-5096) Total: -4834 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: comment tweaksDenys Vlasenko2025-07-062-6/+9
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: use mmap for allocation, it's large - 16MbytesDenys Vlasenko2025-07-064-38/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | This automatically gives it alignment sufficient for any future SIMD optimizations. function old new delta yescrypt_r 1217 1221 +4 yescrypt_kdf32_body 1077 1059 -18 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 4/-18) Total: -14 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: reduce the number of function parametersDenys Vlasenko2025-07-064-166/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta yescrypt_kdf32_body - 1077 +1077 static.smix 739 753 +14 yescrypt_init_local 34 - -34 yes_crypt 87 50 -37 yescrypt_free_local 49 - -49 yescrypt_r 1288 1217 -71 static.yescrypt_kdf_body 1166 - -1166 ------------------------------------------------------------------------------ (add/remove: 1/3 grow/shrink: 1/2 up/down: 1091/-1357) Total: -266 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: code shrink in salt decodingDenys Vlasenko2025-07-061-15/+11
| | | | | | | | | | | | | | function old new delta yescrypt_r 1311 1288 -23 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: code shrink in parameter decodingDenys Vlasenko2025-07-061-31/+17
| | | | | | | | | | | | | | | | | | | | function old new delta decode64_uint32 166 167 +1 yescrypt_r 1342 1311 -31 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 1/-31) Total: -30 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: remove unused variableDenys Vlasenko2025-07-061-8/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: remove unused yescrypt_region_t tmpDenys Vlasenko2025-07-061-7/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: make some functions staticDenys Vlasenko2025-07-063-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta static.yescrypt_kdf_body - 1166 +1166 yescrypt_r 692 1342 +650 atoi64 - 25 +25 decode64_uint32 201 166 -35 encode64 153 - -153 decode64 174 - -174 yescrypt_kdf 442 - -442 yescrypt_kdf_body 1239 - -1239 ------------------------------------------------------------------------------ (add/remove: 2/4 grow/shrink: 1/1 up/down: 1841/-2043) Total: -202 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: remove unused yescrypt_binary_tDenys Vlasenko2025-07-061-10/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: remove YESCRYPT_INIT_SHARED flag and code using itDenys Vlasenko2025-07-062-36/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's only used by libxcrypt-4.4.38/lib/alg-yescrypt-opt.c code (optimized code version?) which wasn't ported to busybox function old new delta yescrypt_kdf 449 442 -7 static.smix 755 739 -16 alloc_region 72 - -72 yescrypt_kdf_body 1467 1239 -228 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 0/3 up/down: 0/-323) Total: -323 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: remove unreachable support for scrypt hash ("$7$...")Denys Vlasenko2025-07-061-95/+49
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta decode64 136 174 +38 decode64_uint32 166 201 +35 atoi64 25 - -25 yescrypt_r 879 692 -187 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 2/1 up/down: 73/-212) Total: -139 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: remove unused yescrypt_shared_tDenys Vlasenko2025-07-063-77/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta static.smix - 755 +755 static.smix1 - 631 +631 static.smix2 - 452 +452 yescrypt_free_local 9 49 +40 yes_crypt 90 87 -3 yescrypt_r 890 879 -11 yescrypt_kdf 479 449 -30 free_region 47 - -47 yescrypt_kdf_body 1724 1467 -257 smix2 659 - -659 smix 790 - -790 smix1 960 - -960 ------------------------------------------------------------------------------ (add/remove: 3/4 grow/shrink: 1/4 up/down: 1878/-2757) Total: -879 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: remove obviously unused, commented-out partsDenys Vlasenko2025-07-062-445/+0
| | | | | | | | | | | | No code changes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: add yescrypt password hashing supportDenys Vlasenko2025-07-0615-26/+3206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems to work, but not at all optimized for size. The extra copy of sha256 code need to be removed. The yescrypt code in libbb/yescrypt/* is adapted from libxcrypt-4.4.38 with minimal edits, hopefully making it easier to track backports by resetting the tree to this commit, then comparing changes in upstream libxcrypt to the tree. function old new delta blockmix_xor_save - 7050 +7050 static.blockmix_xor - 6475 +6475 blockmix - 3390 +3390 SHA256_Transform - 3083 +3083 yescrypt_kdf_body - 1724 +1724 PBKDF2_SHA256 - 1003 +1003 smix1 - 960 +960 yescrypt_r - 890 +890 salsa20 - 804 +804 smix - 790 +790 smix2 - 659 +659 blockmix_salsa8_xor - 601 +601 yescrypt_kdf - 479 +479 blockmix_salsa8 - 415 +415 Krnd - 256 +256 _HMAC_SHA256_Init - 213 +213 _SHA256_Update - 198 +198 _SHA256_Final - 195 +195 decode64_uint32 - 166 +166 encode64 - 153 +153 decode64 - 136 +136 libcperciva_HMAC_SHA256_Buf - 132 +132 SHA256_Pad_Almost - 131 +131 salsa20_simd_unshuffle - 101 +101 salsa20_simd_shuffle - 101 +101 yes_crypt - 90 +90 libcperciva_SHA256_Buf - 86 +86 crypt_make_rand64encoded - 85 +85 static.atoi64_partial - 77 +77 alloc_region - 72 +72 ascii64 - 65 +65 PAD - 64 +64 _HMAC_SHA256_Final - 55 +55 static.cpu_to_be32_vect - 51 +51 free_region - 47 +47 libcperciva_SHA256_Init - 37 +37 yescrypt_init_local - 34 +34 crypt_make_pw_salt 92 125 +33 initial_state - 32 +32 .rodata 105771 105803 +32 atoi64 - 25 +25 explicit_bzero - 22 +22 pw_encrypt 920 941 +21 yescrypt_free_local - 9 +9 crypt_make_salt 85 - -85 ------------------------------------------------------------------------------ (add/remove: 43/1 grow/shrink: 3/0 up/down: 31042/-85) Total: 30957 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | tls: only show schannel config option on mingwrfl89013 days1-1/+1
| |
* | Merge branch 'busybox' into mergeRon Yorston13 days28-195/+390
|\|
| * whitespace fixDenys Vlasenko2025-07-051-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * diff: code shrinkDenys Vlasenko2025-07-041-1/+1
| | | | | | | | | | | | | | function old new delta diffreg 1317 1307 -10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shell: empty HISTFILE disables history saving, just as unset one didDenys Vlasenko2025-07-043-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The rationale here is that unsetting HISTFILE in /etc/profile does not "stick": if it's unset, the default one is set later (after /etc/profile is executed) by the shell. But setting (and exporting, so it is inherited by all (grand)child shells) an empty one works. function old new delta save_history 296 316 +20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shell: update HISTFILESIZE code to be actually usefulDenys Vlasenko2025-07-036-58/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "HISTFILESIZE=0" in profile wasn't working as intended, "unset HISTFILE" wasn't preventing creation of history files Now: HISTSIZE=n allows to reduce in-memory history buffer HISTFILESIZE=n allows to reduce history file size (0: truncate it) unset HISTFILE allows to not save history file at all function old new delta exitshell 138 194 +56 hush_exit 97 143 +46 save_history 266 296 +30 hush_main 1170 1186 +16 .rodata 105762 105771 +9 load_history 246 254 +8 size_from_HISTFILESIZE 44 41 -3 read_line_input 2746 2712 -34 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 6/2 up/down: 165/-37) Total: 128 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shell: fix race between signal handlers setting bb_got_signal and poll()Denys Vlasenko2025-07-028-13/+66
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta __ppoll_time64 - 211 +211 check_got_signal_and_poll - 164 +164 read_key 607 601 -6 shell_builtin_read 1328 1318 -10 ------------------------------------------------------------------------------ (add/remove: 4/0 grow/shrink: 0/2 up/down: 375/-16) Total: 359 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * use pollfd[1] array for poll() argumentDenys Vlasenko2025-07-022-7/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cpio: map -F to --file long optionSertonix2025-07-021-0/+1
| | | | | | | | | | | | | | | | | | function old new delta .rodata 100437 100444 +7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 7/0) Total: 7 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: Prevent clang from reading the G pointer before it is assignedBin Meng2025-07-012-20/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was observed that getty crashes on RISC-V 64-bit target, with the busybox binary compiled by clang/LLVM 17 with -O2. Not only getty, but also some other applets like syslogd/vi are broken too. Commit 5156b245 ("Make const ptr assign as function call in clang") introduced XZALLOC_CONST_PTR() to defeat the compiler optimization, however it only fixed a small number of broken places when compiling busybox with clang/LLVM. A large number of places remain broken. This commit treats ASSIGN_CONST_PTR() the same way as XZALLOC_CONST_PTR(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shell: improve bash compatibility of read built-inRon Yorston2025-07-0111-33/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the read built-in more compatible with bash: - Return an exit code of 142 on timeout. - When the timeout expires before a newline is detected in the input bash captures the partial input. This behaviour is new since bash version 4.4. BusyBox shells had the pre-4.4 behaviour where the input was lost. Update the tests to suit and fix a couple of compiler errors in the testsuite. function old new delta builtin_read 154 174 +20 readcmd 213 228 +15 shell_builtin_read 1364 1370 +6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 41/0) Total: 41 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * df: -k overrides block size to 1k even if $POSIXLY_CORRECTDenys Vlasenko2025-07-011-2/+5
| | | | | | | | | | | | | | function old new delta df_main 1060 1070 +10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hexdump: add tests for %x, handle little/big endian properlyRadoslav Kolev2025-07-011-22/+69
| | | | | | | | | | Signed-off-by: Radoslav Kolev <radoslav.kolev@suse.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * od: make -B test little endian only, add variant for big endianRadoslav Kolev2025-07-011-1/+12
| | | | | | | | | | Signed-off-by: Radoslav Kolev <radoslav.kolev@suse.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hexdump: fix regression for uint16 on big endian systemsRadoslav Kolev2025-07-011-2/+8
| | | | | | | | | | | | | | | | | | Commit 34751d8bf introduced a bug in the handling of uint16 values on big endian systems not considered safe for unaligned access when falling back to memcpy. Signed-off-by: Radoslav Kolev <radoslav.kolev@suse.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ntpd: Raise MAXDIST to 3s for better tolerance and consistency with chronyMichael Glembotzki2025-07-011-1/+1
| | | | | | | | | | | | | | | | function old new delta select_and_cluster 1088 1093 +5 Signed-off-by: Michael Glembotzki <m.glembo@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ip route: make cache printing a bit more similar to upstreamDenys Vlasenko2025-07-011-9/+7
| | | | | | | | | | | | | | function old new delta print_route 1573 1565 -8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lineedit: fix left-over print to stdoutAhmad Fatoum2025-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | There's code printing to stderr both before and after the single call to puts inside put_cur_glyph_and_inc_cursor(). This is likely an oversight as we want everything to go through the same file descriptor, so switch it over to fputs. Fixes: fd47f056765a ("lineedit: print prompt and editing operations to stderr") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lineedit: fix printing lines during tab completionAhmad Fatoum2025-07-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Indentation and escape characters are all output to stderr now, but the matches themself remained on stdout leading to garbled output on Tab completion. Print the results to stderr as well to fix this. Fixes: fd47f056765a ("lineedit: print prompt and editing operations to stderr") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | tls: change build defaultsRon Yorston2025-08-084-4/+16
| | | | | | | | | | Update the default build configurations to enable the native TLS library in the 64-bit Unicode and ARM64 builds.
* | tls: whitespace fixesRon Yorston2025-08-085-8/+8
| | | | | | | | No functional changes.
* | tls: fix schannel handshake on older WindowsRFL8902025-08-081-1/+1
| |
* | stty: fix build for Windows XPRon Yorston2025-08-071-0/+10
| | | | | | | | | | | | | | | | The ioctl() to get the size of the terminal windows used functions which weren't available on Windows XP. Load these dynamically to avoid failure. Adds 160 bytes.
* | tls: add Schannel implementationrfl8902025-08-076-14/+635
| | | | | | | | | | | | | | Not enabled by default. When enabled without TLS 1.3 support, saves 16784-18776 bytes. (GitHub PR #510)
* | sed: ensure temporary file is deleted on errorRon Yorston2025-07-301-1/+6
| | | | | | | | | | | | | | | | | | | | | | It wasn't possible to delete the temporary output file in case of error on Windows because it was open. Close the file before trying to unlink it. Adds 16 bytes. (GitHub issue #509)
* | Call BCryptDestroyHash before freeing memory handleRFL8902025-07-302-0/+2
| |
* | stty: enable a minimal Windows implementationRon Yorston2025-07-2511-31/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a minimal stty applet for Windows. - Display and set terminal rows and columns - Enable/disable raw/cooked mode - Enable/disable echo mode - Implement 'stty sane' to reset raw/cooked/echo Adds 2120-2304 bytes. (GitHub issue #58)
* | testsuite: check that wget handles httpsRon Yorston2025-07-111-0/+4
| | | | | | | | | | | | We failed to notice a problem with the native Windows crypto support for TLS because there was no test. Add a test case, using wget to fetch an https URL.
* | win32: deduplicate die_if_error()Ron Yorston2025-07-114-28/+20
| | | | | | | | | | | | | | There were two copies of the static function die_if_error(). Replace these with a single external function. Saves 16 bytes.
* | remove comments from old implementationRFL8902025-07-111-4/+0
| |
* | patch tls.c to work with CNG implementationRFL8902025-07-112-4/+90
| |
* | Revert "win32: disable use of Windows crypto library"RFL8902025-07-111-1/+1
| | | | | | | | This reverts commit 7e164c132659f536e7ceae1d22cd1428e91adc51.
* | shell: avoid miscounting backslashes in read built-inRon Yorston2025-07-071-2/+5
| | | | | | | | | | | | | | | | | | | | When the '-n' option was used to limit the number of characters read, any backslashes in the input weren't correctly accounted for. Adds 16 bytes. (GitHub issue #504)
* | df: enable -a and -B optionsRon Yorston2025-07-025-10/+24
| | | | | | | | | | | | | | | | | | | | | | The -a, -i and -B options are controlled by FEATURE_DF_FANCY in the build-time configuration. Enable this by default in the Windows builds, but with -i disabled as it provides no useful information. Adds 144-168 bytes. (GitHub issue #503)
* | ash: don't mistake errors for timeouts in read built-inRon Yorston2025-07-011-6/+9
| | | | | | | | | | | | | | | | | | | | | | Commit e07a73a15 (ash: bring 'read' built-in closer to bash) added code to treat a timeout differently from an error returned by poll(2). This falsely assumed that only an EINTR error was relevant. We must allow for other errors. Adds 16 bytes. (GitHub issue #502)