On 11/26/14 15:10, enh wrote: > On Tue, Nov 25, 2014 at 7:42 PM, Rob Landley <[email protected]> wrote: >>> + if (size < 0) size = 16384; >> >> Hmmm, klogctl type 10 added in the 2.6.6 kernel... I think I'm ok with >> forcing earlier kernels to specify -s for now, and waiting for somebody >> to complain. (I want to perror_exit() when it gives an error, because it >> shouldn't do that...) > > yeah, sorry, i meant to mention that. (it slipped my mind because for > the Android platform the minimum supported kernel version is always > pretty high. i think it's 3.4 right now, for example.)
People still use older kernels in stuff like: http://www.bigmessowires.com/2014/11/17/68-katy-68000-linux-on-a-solderless-breadboard/ Which is cool... but doesn't support even half the modern architectures, and one of the design assumptions I made was a posix-2008 build enviornment. (2.6.0 was 2003.) I'm using all sorts of openat() variants that just weren't there in kernels much older than 2008. So yeah, yay klogctl type 10. >> The giant comment at the start of lib/args.c explains the syntax, and >> there's a somewhat more verbose introduction at: >> >> http://landley.net/toybox/code.html#lib_args >> >> The FLAG_x macros are generated automatically, you mask them against >> toys.optargs to see if the relevant bit is set. (Each option letter gets >> a bit, in the same order as binary digits. So for "abcd", d=1, c=2, b=4, >> a=8. Sometimes we use the value of a flag to simpify the code, but I try >> to comment that when it happens.) > > i think the one piece i'm missing to start working on the SELinux > flags is how to probe for the library. i've seen the recent examples > of probing for header files, but i'm guessing that for the -lselinux > side of things i need to edit scripts/make.sh? > > -for i in util crypt m resolv > +for i in util crypt m resolv selinux Should work. If the --as-needed doesn't fully drop out selinux.so when it's configed out (hopefully it doesn't pull the same sort of weak symbol shenanigans -lpthread does) I can always add a config check here so it's only in the list when it's enabled in kconfig. I normally try to avoid external library dependencies (to the point I'm implementing my own inflate/deflate code rather than sucking in zlib) for similar reasons busybox does, as described at the end of the features part of http://landley.net/toybox/design.html . (Basically I want a minimal self-bootstrapping system to require as few packages as possible to get up and running on a new target, so you don't have to cross compile anything more than absolutely necessary before you can start natively building under the new target. It should also statically link to a completely self-contained binary you can drop on a system when doing rescue sort of things. And I want everything it does to be auditable, which is harder if it includes code from other packages; the interactions between different implementations of that package may not be something we ever tested.) That said, as long as selinux is an optional thing you can completely switch off, I don't have to personally be a fan of it, or a domain expert. A bigger concern is you might want to ping the tizen guys who've already implemented -Z based on libattr and libsmack. Their repository with their additions is at: https://git.tizen.org/cgit/platform/upstream/toybox.git No idea what their upstreaming plans are. I should ping Xavier and see if he's caught up from his broken leg yet... Rob _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
