[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [BusyBox] ANNOUNCEMENT: large busybox update... with a dedication
From: mjn3 () codepoet ! org (Manuel Novoa III)
Date: 2003-03-19 12:55:04
[Download RAW message or body]
Hello all,
This is a summary of roughly two months of unfunded work, primarily
focusing on coreutils. 70% (42 of 60) of the coreutils functions and
a number of libbb routines have been audited, with numerous bug fixes,
improved error checking, feature enhancements, and significant size
reduction as a result. Several other functions, while not audited,
have also seen considerable size reductions.
I started this audit while the woman I love was in the final stages of
cancer. It was something that I could do while sitting beside her as
she slept. She passed away 5 weeks ago.
I would ask that anyone benefiting from this work, especially those
using busybox in commercial products, consider making a donation in
her memory to the local non-profit hospice organization that did so
much for us in the last few months.
In memory of Toni W. Hagan
Hospice of Acadiana, Inc.
2600 Johnston St., Suite 200
Lafayette, LA 70503-3240
Phone (337) 232-1234 or 1-800-738-2226
Fax (337) 232-1297
http://www.hospiceacadiana.com/
Thanks,
Manuel
LIBBB
-----
Started cleaning up the namespace on the road to a standalone libbb.
Global symbols prefixed with "bb_" have been reviewed.
ask_confirmation.c
BUG: Rewrite broken function from scratch.
bb_asprintf.c
DEFECT: Make sure va_end is always invoked.
DEFECT: *printf can return -1 for reasons other than out-of-memory.
Change name to bb_xasprintf to comply with naming convention.
copyfd.c
2 minor bug fixes.
dirname.c
BUG: Remove extra trailing '_' from __GNU_LIBRARY__.
BUG: Replace with uClibc implementation to fix a corner case.
Change to disable if using uClibc, as it now has dirname.
dump.c
Size reduction and name space pollution.
full_read.c
full_write.c
Adjust return and arg types to match read() and write() respectively.
Minor (1 byte on i386) savings tweak each, returning the error return
from read()/write() instead of a literal -1.
get_line_from_file.c
Added get_chomped_line_from_file.
print_file.c
Name change: print_file -> bb_xprint_and_close_file.
Name change: print_file_by_name -> bb_xprint_file_by_name.
Change return vals of bb_xprint_file_by_name to std 0 or -1.
Removed unnecessery is_directory check in bb_xprint_file_by_name.
process_escape_sequence.c
Further size reduction
parse_number.c
Name change: parse_number -> bb_xparse_number.
BUG: No longer accepts multiple suffixes.
BUG: Now checks for overflow and trailing chars after suffix.
xfuncs.c
BUG: Rewrote xread_all() to loop on short reads unless EOF reached.
Added xferror* and xfflush_stdout
LIBBB file additions
--------------------
default_error_retval.c
Some applets (cmp for example) need to return an error exit val > 1 on error.
fclose_nonstdin.c
Close a file unless it is stdin. Used in a number of coreutils applets.
fflush_stdout_and_exit.c
getopt_ulflags.c
A getopt() wrapper for applets accepting only non-interferring options.
perror_nomsg.c
perror_nomsg_and_die.c
Avoid having to pass "" or NULL if we don't have a message.
printf.c
*printf wrappers which set the stream error indicator if the underlying
printf function fails. The printf functoins can fail for reasons which
don't result in the stream error indicator being set. These are used
for deferred error checking.
skip_whitespace.c
speed_table.c
Compact data storge of speed_t <-> speed value mappings, with functions
for each conversion. Shared by stty and getty.
warn_ignoring_args.c
Output a warning if remaining args will be ignored.
wfopen_input.c
Wrap wfopen to avoid reopening stdin when passed "-" or bb_msg_standard_input.
Avoids the need for special casing default stdin or stdin via "-" args.
xgetularg.c
A collection of routines to convert numeric args with support for optional
base (other than 10), upper and lower bounds, and suffixes. An invalid
arg results in a call to bb_show_usage().
COREUTILS
---------
basename.c
Remove '-' check when processing options.
cal.c ( The original contributor should be ashamed! )
Major rework for size optimization.
cat.c
REWRITE: Fixed bugs and make SUSv3 compliant.
BUG: Multiple "-" (stdin) args resulted in segfaults because stdin was closed.
DEFECT: SUSv3 "-u" option was not accepted.
chgrp.c
DEFECT: Direct perror call, so applet name omitted.
chmod.c
DEFECT: Direct perror call, so applet name omitted.
chown.c
DEFECT: Direct perror call, so applet name omitted.
chroot.c
DEFECT: If no command specified, add "-i" arg for an interactive shell.
Remove '-' check when processing options.
Slight size decrease and dead code removal.
cmp.c
REWRITE: (Mostly)
BUG: No error checking was done on i/o.
BUG: Incorrect exit code for errors.
BUG: Broken handling of "-" args.
DEFECT: SUSv3 "-l" option was not accepted
cp.c
Size reduction only.
cut.c NOT YET DONE
date.c NOT YET DONE
dd.c NOT YET DONE
df.c
DEFECT: Removed dependency on floating point.
BUG: No error checking of output.
BUG: Now output stats on 0-size filesystems given as commandline args.
DEFECT: Now properlay round all quantities.
dirname.c
Remove '-' check when processing options.
dos2unix.c NOT YET DONE (moved CT_* defines here and out of libbb.h)
du.c
REWRITE: (Mostly) for SUSv3 compliance and to fix bugs/defects.
Added support for SUSv3 -a, -H, -L, gnu -c, and (busybox) -d options.
The -d option allows setting of max depth (similar to gnu --max-depth).
BUG: Fixed incorrect size calculations for links and directories, especially
when errors occurred. Calculates sizes should now match gnu du output.
BUG: Added error checking of output.
BUG: Fixed busybox bug #1284 involving long overflow with human_readable
echo.c
BUG: when processing escapes, '\c' did not ignore _all_ further output.
BUG: octal escapes of the form \0### were translated as '\0##' + '#'
env.c
BUG: Exit return codes for failed execvp were incorrect.
expr.c NOT YET DONE
false.c NO CHANGES
head.c
FEATURE: Added fancy head version supporting gnu head -c, -q, and -v options.
hostid.c
defect (minor): Did not check arg count as gnu version does.
id.c _NOT_ SUSv3 compliant! -- option -G is not currently supported!
length.c NO CHANGES
ln.c
BUG: -n option was always in effect.
logname.c
BUG: getpwuid(buffer, geteuid()) was used, which does not necessarily
return the same thing as getlogin(), which is specified by SUSv3.
ls.c NOT YET AUDITTED
Size reduction only.
md5sum.c NOT YET DONE
mkdir.c
BUG: mkdir -p was broken wrt file permissions; especially when -m was used.
mkfifo.c
REWRITE
mknod.c
REWROTE
defect: Add bounds checking on numeric args.
mv.c
Size reduction and improved error checking.
od.c NOT YET AUDITTED
Size reduction only.
printf.c NOT YET DONE
pwd.c
BUG: No error checking on output.
realpath.c
BUG: Did not return a failure code if a patch couldn't be resolved.
BUG: No error checking on output.
rm.c
Size reduction only.
rmdir.c
REWRITE: Don't duplicate dirname functionality.
sha1sum.c NOT YET DONE
sleep.c
REWRITE: Now does proper arg and error checking.
Added fancy version to accept multiple (int) args with optional suffixes.
sort.c
BUG: No error checking on i/o.
stty.c NOT AUDITTED
Size reduction only.
sync.c
Added warning about ignoring args, as per gnu version.
tail.c
Pretty much rewritten to fix numerous bugs, reduce realloc() calls, and
decrease size (2053t+12b ->1668t+4b on i386 for fancy).
BUG: at least 7 fixed (I may have forgotten one or two... it was pretty bad)
1) mixing printf/write without fflush()ing stdout
2) no check that any open files are present
3) optstring had -q taking an arg
4) no error checking on write in some cases, and a warning even then
5) q and s interaction bug
6) no check for lseek error
7) lseek attempted when count==0 even if arg was +0 (from top)
tee.c
REWRITE: Added proper error checking, and the -i option for SUSv3.
FEATURE: Added a block io configuration option.
test.c NOT YET DONE
touch.c
BUG: Was exiting on a failure, rather than processing all args.
tr.c NOT YET DONE
true.c NO CHANGES
tty.c
REWRITE: SUSv3 compliance.
BUG: The same exit code was used for errors and 'not a tty' returns.
Added warning about ignoring args, as per gnu version.
uname.c
BUG: No error checking on output.
uniq.c
REWRITE: SUSv3 compliance.
BUG: No error checking on i/o.
DEFECT: SUSv3 options -f and -s were not supported.
DEFECT: newlines were not ignored in comparisons.
usleep.c
REWRITE: Now does proper arg and error checking.
uudecode.c NOT YET DONE
uuencode.c NOT FINISHED
BUG: Some hurried fixes to address complete lack of error checking.
watch.c
DEFECT: Directly called date_main().
wc.c
REWRITE: Bug fixes and size reduction.
BUG: The optimization in for the 'wc -c' case was broken. See comment in code.
BUG: '-' args were handled incorrectly.
BUG: No error checking on i/o.
BUG: isprint() wasn't considered when word counting.
who.c NOT YET DONE
whoami.c No significant changes.
yes.c
Removed redundant applet name prefix from error messages.
OTHERS
-------
editors/sed.c NOT YET AUDITTED
BUG: fix potential out-of-bounds access when reading commands from a file
util-linux/hexdump.c NOT YET AUDITTED
Size reduction only.
loginutils/getty.c NOT YET AUDITTED
Extracted speedtable. Now in libbb and shared with stty.
miscutils/dutmp.c NOT YET AUDITTED
BUG: Deal with non-nul-terminated char array members of struct utmp.
Improved error checking.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic