[Toybox] make menuconfig

Isaac Dunham ibid.ag at gmail.com
Sat May 2 21:47:29 PDT 2015


On Sat, May 02, 2015 at 10:30:36PM -0500, Rob Landley wrote:
> On 05/02/2015 02:54 PM, enh wrote:
> > anyone else having trouble with "make menuconfig"? getprop and setprop
> > aren't showing up for me, and i don't see where to set
> > CONFIG_TOYBOX_ON_ANDROID and generated/mkflags segfaults if i have ls
> > configured and...
> 
> Sorry, my recent ls checkin screwed it up. I've been digging into the
> mkflags.c code to figure out _why_ it's doing that, but had family
> obligations most of today.
> 
> (I fully expect I screwed up ls's option string, but it should give a
> diagnostic message, not a segfault.)

This is...odd.
On Alpine Linux, ls enabled/ls --color disabled, I only get this:
(after "git pull; make menuconfig; make" and saving the "new" config):
toys/posix/ls.c: In function 'zmack':
toys/posix/ls.c:154:5: warning: implicit declaration of function 'fgetxattr' [-Wimplicit-function-declaration]
     len = fgetxattr(fd, XATTR_NAME_SMACK, pad?buf:0, pad?SMACK_LABEL_LEN:0);
          ^
...toys/posix/ls.c: At top level:
cc1: warning: unrecognized command line option "-Wno-string-plus-int"

./toybox ls does segfault, however, as does any invocation of toybox:
$ strace ./toybox
execve("./toybox", ["./toybox"], [/* 20 vars */]) = 0
mprotect(0xb77ec000, 4096, PROT_READ)   = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0xb5a42c} ---
+++ killed by SIGSEGV +++


Incidentally, I will note this from open(2):
    O_PATH (since Linux 2.6.39)
	 Obtain a file descriptor that can be used for two  purposes:  to
	 indicate a location in the filesystem tree and to perform opera-
	 tions that act purely at the file descriptor  level.   The  file
	 itself  is not opened, and other file operations (e.g., read(2),
         write(2), fchmod(2), fchown(2), fgetxattr(2), mmap(2)) fail with
         the error EBADF.

Curiously, fstat() has *recently* (Linux 3.6) been added to the list of
allowed syscalls accepting such an FD.

(Yes, the xattr stuff seems to be utterly nuts.)


Thanks,
Isaac Dunham

 1430628449.0


More information about the Toybox mailing list