RE: Bug in find -xdev
I am not set up to do so, but I have examined the sources in 1.24 (current?) and the -xdev handling code is unchanged from what I am testing. -- Jim -Original Message- From: Bastian Bittorf [mailto:bitt...@bluebottle.com] Sent: Tuesday, December 01, 2015 11:45 AM To: Cathey, Jim Cc: busybox@busybox.net Subject: Re: Bug in find -xdev * Cathey, Jim[01.12.2015 20:13]: > (in BB V1.19.4 tested on a MIPS), in that it is doing the this version is nearly 4 years old. please test if this still is the case with current git or stable. bye, bastian ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
[psa] various server software upgrades
the busybox.net software has been languishing for quite a long time, so i gave it a strong kick today. just about every piece of software has been upgraded on the box including bugzilla. my various testing looks like it still works, but if you guys notice anything weird, feel free to let me know. -mike signature.asc Description: Digital signature ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Re: Bug in find -xdev
* Cathey, Jim[01.12.2015 20:13]: > (in BB V1.19.4 tested on a MIPS), in that it is doing the this version is nearly 4 years old. please test if this still is the case with current git or stable. bye, bastian ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Re: Seg-fault with busybox
On 12/01/2015 01:30 PM, Bastian Bittorf wrote: * Anshul[01.12.2015 08:50]: I am trying to use busybox with linux kernel. which version of busybox exactly? busybox-1.24.1 Thanks Anshul Maheshwari ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Re: Seg-fault with busybox
* Anshul[01.12.2015 08:50]: > I am trying to use busybox with linux kernel. which version of busybox exactly? bye, bastian ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
[PATCH] 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)--- miscutils/taskset.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/miscutils/taskset.c b/miscutils/taskset.c index 100b1d9..18a4b67 100644 --- a/miscutils/taskset.c +++ b/miscutils/taskset.c @@ -75,27 +75,28 @@ static char *from_cpuset(cpu_set_t *mask) #define TASKSET_PRINTF_MASK "%llx" static unsigned long long from_cpuset(cpu_set_t *mask) { - char *p = (void*)mask; + BUILD_BUG_ON((CPU_SETSIZE/8) < sizeof(int)); - BUILD_BUG_ON(CPU_SETSIZE < sizeof(int)); - - /* Take the least significant bits. Careful! -* Consider both CPU_SETSIZE=4 and CPU_SETSIZE=1024 cases + /* Take the least significant bits. Assume cpu_set_t is +* implemented as an array of unsigned long or unsigned +* int. */ + if ((CPU_SETSIZE/8) < sizeof(long)) + return *(unsigned*)mask; + if ((CPU_SETSIZE/8) < sizeof(long long)) + return *(unsigned long*)mask; #if BB_BIG_ENDIAN - /* For big endian, it means LAST bits */ - if (CPU_SETSIZE < sizeof(long)) - p += CPU_SETSIZE - sizeof(int); - else if (CPU_SETSIZE < sizeof(long long)) - p += CPU_SETSIZE - sizeof(long); - else - p += CPU_SETSIZE - sizeof(long long); + if (sizeof(unsigned long long) > sizeof(unsigned long)) { + /* We can put two long in the long long, but they have to +* be swapped: the least significant word comes first in the +* array */ + unsigned long *p = (void*)mask; + return (unsigned long long)*p + + ((unsigned long long)*(p+1) << (8*sizeof(unsigned long))); + } +#else + return *(unsigned long long*)mask; #endif - if (CPU_SETSIZE < sizeof(long)) - return *(unsigned*)p; - if (CPU_SETSIZE < sizeof(long long)) - return *(unsigned long*)p; - return *(unsigned long long*)p; } #endif -- 2.6.2 ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Re: [PATCH v2] blkdiscard: new applet
Am 01.12.2015 13:41, schrieb Ari Sundholm: > On Mon, 2015-11-30 at 18:32 +, Ari Sundholm wrote: >> On Mon, 2015-11-30 at 15:14 +, walter harms wrote: >>> >>> Am 30.11.2015 15:52, schrieb Ari Sundholm: > ... + range[0] = offset; + range[1] = length; >>> >>> Can you discard offset, length ? >>> >> >> Sure, I'll check if that shrinks the applet down a bit. >> > > It turns out that eliminating those two variables does not shrink the > busybox executable at all, at least with the toolchain used in my Ubuntu > 14.04 system - the bloat-o-meter output is identical, in fact. > Additionally, I find the applet significantly harder to read with this > change. So I'd prefer to leave the two variables as they are if that's > not completely unacceptable. > No problem with me, i was only wondering. I would just add a comment, with "does not shrink code size" and "significantly harder to read". just my 2 cents, wh >> Best regards, >> Ari Sundholm >> a...@tuxera.com >> >>> re, >>> wh >>> >>> + ioctl_or_perror_and_die(fd, + (opts & OPT_SECURE) + ? BLKSECDISCARD + : BLKDISCARD, , + "%s failed", + (opts & OPT_SECURE) + ? "BLKSECDISCARD" + : "BLKDISCARD"); + + xclose(fd); + + return EXIT_SUCCESS; +} >>> ___ >>> busybox mailing list >>> busybox@busybox.net >>> http://lists.busybox.net/mailman/listinfo/busybox >> >> >> ___ >> busybox mailing list >> busybox@busybox.net >> http://lists.busybox.net/mailman/listinfo/busybox > > > ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox