busybox/miscutils
Arnout Vandecappelle (Essensium/Mind) 5fa9fefddc taskset: fix non-fancy cpuset printing on big-endian
The non-fancy version of the from_cpuset uses CPU_SETSIZE as if it
represents the number of bytes in the cpuset, while it is actually
the number of bits. This leads to out-of-bounds accesses on the
cpu_set_t in the big-endian case. Basically all uses of CPU_SETSIZE
have to be divided by 8. This is done correctly in the fancy version
of from_cpuset.

In addition, the big-endian case is completely wrong to begin with.
All standard C libraries that I know of implement cpu_set_t as an
unsigned long array, so both for big and little endian, the least
significant bits are in the beginning of the array. Therefore, the
approach taken for the little endian case is equally valid. We only
need special handling for big endian when CPU_SETSIZE is large and
we use an unsigned long long to get more bits out.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-02-26 14:36:24 +01:00
..
adjtimex.c adjtimex: make its help text and printed data a bit less cryptic 2014-04-17 11:29:34 +02:00
bbconfig.c
beep.c
chat.c
chrt.c
Config.src tweak defconfig 2015-10-25 20:36:03 +01:00
conspy.c
crond.c libbb: introduce and use is_prefixed_with() 2015-03-12 17:48:34 +01:00
crontab.c Removes stray empty line from code 2015-07-13 03:25:46 +02:00
dc.c dc: fix "dc p" prinitng bogus data 2015-05-25 13:31:25 +02:00
devfsd.c use auto_string() where appropriate to kill a few statics 2015-10-09 18:16:40 +02:00
devmem.c
eject.c
fbsplash.c fbsplash: use virtual y size in mmap size calculations 2015-10-27 21:32:00 +01:00
fbsplash.cfg
flash_eraseall.c
flash_lock_unlock.c
flashcp.c flashcp: change BUFSIZE to 4k 2014-12-10 13:44:27 +01:00
hdparm.c *: more BUILD_BUG_ON conversions 2015-10-13 17:17:34 +02:00
i2c_tools.c i2c_tools: suppress "'blen' may be used uninitialized in this function" 2015-11-01 20:58:03 +01:00
inotifyd.c
ionice.c
Kbuild.src taskset: support CPU masks for more than 64 CPUs 2014-08-17 19:36:22 +02:00
last_fancy.c libbb: add a function to make a copy of a region of memory 2015-07-19 23:05:20 +02:00
last.c randconfig fix 2015-10-11 16:58:18 +02:00
less.c less: fix botched attempt to use last column 2015-08-16 18:54:49 +02:00
makedevs.c
man.c libbb: introduce and use is_prefixed_with() 2015-03-12 17:48:34 +01:00
microcom.c
mountpoint.c
mt.c
nandwrite.c nandwrite: implement -n (read/write without ecc) 2016-01-02 01:33:01 +01:00
raidautorun.c
readahead.c
rfkill.c
runlevel.c *: Switch to POSIX utmpx API 2015-04-02 23:03:46 +02:00
rx.c
setserial.c
setsid.c setsid: implement -c 2016-01-17 01:10:53 +01:00
strings.c
taskset.c taskset: fix non-fancy cpuset printing on big-endian 2016-02-26 14:36:24 +01:00
time.c
timeout.c
ttysize.c
ubi_tools.c ubiattach: add option -O 2015-01-30 18:33:24 +01:00
volname.c
wall.c *: Switch to POSIX utmpx API 2015-04-02 23:03:46 +02:00
watchdog.c