From rep.dot.nop at gmail.com Sat Oct 1 19:48:39 2022 From: rep.dot.nop at gmail.com (Bernhard Reutner-Fischer) Date: Sat, 1 Oct 2022 21:48:39 +0200 Subject: [PATCH] memset 0 in obscure is optimized away by compiler In-Reply-To: <20140417002539.GJ26358@brightrain.aerifal.cx> References: <201404161921.14608.farmatito@tiscali.it> <20140416195142.13a8991c@ralda.gmx.de> <20140417002539.GJ26358@brightrain.aerifal.cx> Message-ID: <20221001214839.1af3aaac@nbbrfq> On Wed, 16 Apr 2014 20:25:39 -0400 > That's exactly the situation here. The lifetime of the object being > cleared by memset ends sufficiently close to the memset that the > compiler is able to achieve the same observable effects that would be > seen in the abstract machine without actually performing any memory > fill. There are several possibilities out there in the wild that currently work around the (unimplemented, everywhere) microsoft _s "extension". 1) memset(ptr, 0, length-of-ptr-to-data); #define barrier_data(ptr) __asm__ __volatile__("": :"r"(ptr) :"memory") barrier_data(ptr); 2) through volatile function pointer for C99 (that's what we have ATM) typedef void *(*memset_fn_t)(void *,int,size_t); static volatile memset_fn_t memset_fun = &memset; void my_c99_memset(void *ptr, size_t len) { memset_fun(ptr, 0, len); } Several, e.g. https://klevchen.ece.illinois.edu/pubs/yjoll-usesec17.pdf 3) ... Hence 1) is what's currently used in the kernel (include/linux/compiler.h, barrier_data). I'd do that, too, for now, IMO. and there's -fno-inline-memset for compiling nuke, but i haven't looked in detail if that confuses DSE enough to give up on the memset in our nuke. HTH, From rep.dot.nop at gmail.com Sat Oct 1 21:16:05 2022 From: rep.dot.nop at gmail.com (Bernhard Reutner-Fischer) Date: Sat, 1 Oct 2022 23:16:05 +0200 Subject: [PATCH] memset 0 in obscure is optimized away by compiler In-Reply-To: <20221001214839.1af3aaac@nbbrfq> References: <201404161921.14608.farmatito@tiscali.it> <20140416195142.13a8991c@ralda.gmx.de> <20140417002539.GJ26358@brightrain.aerifal.cx> <20221001214839.1af3aaac@nbbrfq> Message-ID: <20221001231605.1f97a597@nbbrfq> On Sat, 1 Oct 2022 21:48:39 +0200 Bernhard Reutner-Fischer wrote: > On Wed, 16 Apr 2014 20:25:39 -0400 > > > That's exactly the situation here. The lifetime of the object being > > cleared by memset ends sufficiently close to the memset that the > > compiler is able to achieve the same observable effects that would be > > seen in the abstract machine without actually performing any memory > > fill. > > There are several possibilities out there in the wild that currently > work around the (unimplemented, everywhere) microsoft _s "extension". > > 1) > memset(ptr, 0, length-of-ptr-to-data); > > #define barrier_data(ptr) __asm__ __volatile__("": :"r"(ptr) :"memory") > barrier_data(ptr); > > 2) > through volatile function pointer for C99 (that's what we have ATM) > typedef void *(*memset_fn_t)(void *,int,size_t); > static volatile memset_fn_t memset_fun = &memset; > void my_c99_memset(void *ptr, size_t len) { > memset_fun(ptr, 0, len); > } > Several, e.g. https://klevchen.ece.illinois.edu/pubs/yjoll-usesec17.pdf > > 3) ... > > Hence > 1) is what's currently used in the kernel (include/linux/compiler.h, > barrier_data). I'd do that, too, for now, IMO. > > and there's -fno-inline-memset for compiling nuke, but i haven't looked > in detail if that confuses DSE enough to give up on the memset in our > nuke. 2) and/or in addition to 1) compile nuke with -fno-dse and hope for RTL DSE to not see through. Didn't look closely if that's sufficient for now. HTH, From kaszak at gmail.com Sun Oct 2 09:14:30 2022 From: kaszak at gmail.com (=?UTF-8?Q?K=C3=A1roly_Kasza?=) Date: Sun, 2 Oct 2022 11:14:30 +0200 Subject: httpd use an interpreted script as index_page - with patch proposal Message-ID: Hi list, I am using busybox stable 1.34.1. I'm not sure if I am mixing up something or if this is a missing feature. If I want to run a .php as an index_page, it won't load - couldn't find the interpreter. If I explicitly call /index.php it works. My httpd.conf looks like this: *.php:/usr/bin/php-cgi I:index.php php.ini contains cgi.force_redirect = 0 I looked into httpd.c and I think I found the problem in 2 sections: - first: execv(argv[0], argv); - This argv[0] should contain the interpreter (php-cgi), while argv[1] should contain the script name (index.php) - this won't work, because "script" variable is empty, because it was calculated from static char *url, which only contains the ending "/", and index_page variable was not added to it. The interpreter should have been looked up by the script variable's extension (.php), which obviously couldn't have been done. - second: PHP in CGI mode needs a properly filled SCRIPT_FILENAME environment variable, as noted in a valuable comment in the code. This should contain the name of the file to execute, and again, because of the *url variable without the concatenated index_page, it isn't filled correctly. Without this, calling php-cgi simply fails, even if it has the correct filename for execv in argv (argv[1]); I have created a simple patch as a proposal, which works for me. There is probably a more elegant way, I didn't read all the code, just looked for the cause of this exact problem. Regards, Karoly -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: busybox-1.34.1-httpdindex.patch Type: application/x-patch Size: 1205 bytes Desc: not available URL: From eb at emlix.com Wed Oct 5 11:19:51 2022 From: eb at emlix.com (Rolf Eike Beer) Date: Wed, 05 Oct 2022 13:19:51 +0200 Subject: [PATCH] memset 0 in obscure is optimized away by compiler In-Reply-To: <20221001214839.1af3aaac@nbbrfq> References: <201404161921.14608.farmatito@tiscali.it> <20140417002539.GJ26358@brightrain.aerifal.cx> <20221001214839.1af3aaac@nbbrfq> Message-ID: <5622639.DvuYhMxLoT@devpool047> Am Samstag, 1. Oktober 2022, 21:48:39 CEST schrieb Bernhard Reutner-Fischer: > On Wed, 16 Apr 2014 20:25:39 -0400 > > > That's exactly the situation here. The lifetime of the object being > > cleared by memset ends sufficiently close to the memset that the > > compiler is able to achieve the same observable effects that would be > > seen in the abstract machine without actually performing any memory > > fill. > > There are several possibilities out there in the wild that currently > work around the (unimplemented, everywhere) microsoft _s "extension". > > 3) ... Use explicit_bzero() when available, or create such a function for configurations where it is not. Eike -- Rolf Eike Beer, emlix GmbH, http://www.emlix.com Fon +49 551 30664-0, Fax +49 551 30664-11 Gothaer Platz 3, 37083 G?ttingen, Germany Sitz der Gesellschaft: G?ttingen, Amtsgericht G?ttingen HR B 3160 Gesch?ftsf?hrung: Heike Jordan, Dr. Uwe Kracke ? Ust-IdNr.: DE 205 198 055 emlix - smart embedded open source -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 313 bytes Desc: This is a digitally signed message part. URL: From ben at bvnf.space Fri Oct 7 10:26:55 2022 From: ben at bvnf.space (Ben Fuller) Date: Fri, 7 Oct 2022 11:26:55 +0100 Subject: tar -p doesn't account for umask when extracting Message-ID: <20221007102655.qpxgpmwe4663jd2i@t480> Hi, In archival/libarchive/data_extract_all.c, there is a note that "only root's tar preserves perms (see bug 3844)", and it forces the ARCHIVE_DONT_RESTORE_PERM flag unless run by root. I can't find bug 3844 - it is invalid on https://bugs.busybox.net/. Could anyone help me find the bug report (or explain why this shouldn't be fixed?) When run by a non-root user, the chmod at the end of data_extract_all is not run, so the mode is not corrected from what mkdir made it. To see the problem: $ umask 0022 $ id -u 1000 $ mkdir -m 777 x $ ls -ld x drwxrwxrwx 2 ben ben 40 Oct 7 10:54 x $ tar c x | tar -C tmp -x $ ls -ld tmp/x drwxr-xr-x 2 ben ben 40 Oct 7 10:54 tmp/x $ rmdir tmp/x $ tar c x | tar -C tmp -xp $ ls -ld tmp/x drwxr-xr-x 2 ben ben 40 Oct 7 10:54 tmp/x For comparison, the behaviour of GNU tar (as non-root): $ tar c x | gtar -C tmp -x drwxr-xr-x 2 ben ben 40 Oct 7 10:54 tmp/x $ tar c x | gtar -C tmp -xp drwxrwxrwx 2 ben ben 40 Oct 7 10:54 tmp/x Ben From mingli.yu at windriver.com Sat Oct 8 09:08:36 2022 From: mingli.yu at windriver.com (Yu, Mingli) Date: Sat, 8 Oct 2022 17:08:36 +0800 Subject: The system hang when execute "devmem 0xfed10000 128" Message-ID: <003cc2bf-6627-9761-48bf-d25b18c7e874@windriver.com> Hi, The system hang when execute "devmem 0xfed10000 128", any hints? root at intel-x86-64:~# devmem 0xfed10000 Memory mapped at address 0x7f9e530e4000. 0x01C03AFE root at intel-x86-64:~# devmem 0xfd0c0000 128 Memory mapped at address 0x7f9b9f176000. 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF root at intel-x86-64:~# devmem 0xfed10000 128 Memory mapped at address 0x7f5e5e1d5000. The system hang Thanks, From uwe at kleine-koenig.org Sat Oct 8 17:22:52 2022 From: uwe at kleine-koenig.org (=?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?=) Date: Sat, 8 Oct 2022 19:22:52 +0200 Subject: [PATCH] nslookup: ensure unique transaction IDs for the DNS queries Message-ID: <20221008172252.3970941-1-uwe@kleine-koenig.org> The transaction IDs generated by res_mkquery() for both glibc and musl only depends on the state of the monotonic clock. For some machines (here: a TP-Link RE200 powered by a MediaTek MT7620A) the monotonic clock has a coarse resolution (here: 20 ?s) and it can happen that the requests for A and AAAA share the same transaction ID. In that case the mapping from received responses to the sent queries doesn't work and name resolution fails as follows: # /bin/busybox nslookup heise.de Server: 127.0.0.1 Address: 127.0.0.1:53 Non-authoritative answer: Name: heise.de Address: 193.99.144.80 *** Can't find heise.de: No answer because the AAAA reply is dropped as a duplicate reply to the A query. To prevent this make sure the transaction IDs are unique. --- networking/nslookup.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/networking/nslookup.c b/networking/nslookup.c index 6da97baf4216..61e3eb6052ab 100644 --- a/networking/nslookup.c +++ b/networking/nslookup.c @@ -978,6 +978,10 @@ int nslookup_main(int argc UNUSED_PARAM, char **argv) } } + /* Ensure the Transaction IDs are unique */ + for (rc = 1; rc < G.query_count; rc++) + G.query[rc].query[1] = G.query[rc - 1].query[1] + 1; + for (rc = 0; rc < G.serv_count;) { int c; -- 2.37.2 From mingli.yu at windriver.com Sun Oct 9 02:53:19 2022 From: mingli.yu at windriver.com (Yu, Mingli) Date: Sun, 9 Oct 2022 10:53:19 +0800 Subject: The system hang when execute "devmem 0xfed10000 128" In-Reply-To: <003cc2bf-6627-9761-48bf-d25b18c7e874@windriver.com> References: <003cc2bf-6627-9761-48bf-d25b18c7e874@windriver.com> Message-ID: It also hangs after execute "devmem 0xfed10000 64". root at intel-x86-64:~# devmem 0xfed10000 64 0x0000000001C03AFE On 10/8/22 17:08, Yu, Mingli wrote: > Hi, > > The system hang when execute "devmem? 0xfed10000 128", any hints? > root at intel-x86-64:~# devmem 0xfed10000 > Memory mapped at address 0x7f9e530e4000. > 0x01C03AFE > > root at intel-x86-64:~# devmem 0xfd0c0000 128 > Memory mapped at address 0x7f9b9f176000. > 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF > > root at intel-x86-64:~# devmem 0xfed10000 128 > Memory mapped at address 0x7f5e5e1d5000. > The system hang > > > Thanks, From rmy at pobox.com Thu Oct 13 14:22:03 2022 From: rmy at pobox.com (Ron Yorston) Date: Thu, 13 Oct 2022 15:22:03 +0100 Subject: [PATCH] ash: make 'sleep' a builtin In-Reply-To: References: <698eac53516b4f28907e33eb6bb6b8c8@AcuMS.aculab.com> Message-ID: <63481f0b.cYq+cUOOz7rlsssY%rmy@pobox.com> shawnlandden wrote: >The builtin is exiting ash in two cases: > >1.If no argument is given (also does not print usage of sleep, but ash---look at how printf handles his) >2.If xatou() interpretation of the number fails. This is a bit more involved to fix, which is why I didn't send my patch for #1. 3. 'sleep' can be configured as both an applet and a shell builtin. In that case FEATURE_FANCY_SLEEP can be enabled. This offers further opportunities for the builtin to call xfunc_die() and is even more involved to fix. Ron From samuel.thibault at ens-lyon.org Sun Oct 16 00:04:59 2022 From: samuel.thibault at ens-lyon.org (Samuel Thibault) Date: Sun, 16 Oct 2022 02:04:59 +0200 Subject: [PATCH] Fix non-Linux builds Message-ID: <20221016000459.5itbhtqlkkozgdnp@begin> Various tools are Linuxish and should thus only attempted to build on Linux only. Some features are also Linux-only. Also, libresolv is used on all GNU platforms, notably GNU/Hurd and GNU/kfreeBSD. diff --git a/Makefile.flags b/Makefile.flags index 84cb00a75..50137a78e 100644 --- a/Makefile.flags +++ b/Makefile.flags @@ -184,7 +184,7 @@ LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=% endif ifeq ($(CONFIG_FEATURE_NSLOOKUP_BIG),y) -ifneq (,$(findstring linux,$(shell $(CC) $(CFLAGS) -dumpmachine))) +ifneq (,$(findstring gnu,$(shell $(CC) $(CFLAGS) -dumpmachine))) LDLIBS += resolv endif endif diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c index 81a0e6aa8..3f36cabe0 100644 --- a/console-tools/loadfont.c +++ b/console-tools/loadfont.c @@ -12,6 +12,7 @@ //config:config LOADFONT //config: bool "loadfont (5.2 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: This program loads a console font from standard input. //config: diff --git a/console-tools/openvt.c b/console-tools/openvt.c index db2f073b2..9e6cffecc 100644 --- a/console-tools/openvt.c +++ b/console-tools/openvt.c @@ -10,6 +10,7 @@ //config:config OPENVT //config: bool "openvt (7.2 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: This program is used to start a command on an unused //config: virtual terminal. diff --git a/coreutils/dd.c b/coreutils/dd.c index 06c1b7b9c..3e034eb1e 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c @@ -200,6 +200,7 @@ static void dd_output_status(int UNUSED_PARAM cur_signal) } #if ENABLE_FEATURE_DD_IBS_OBS +# ifdef O_DIRECT static int clear_O_DIRECT(int fd) { if (errno == EINVAL) { @@ -211,6 +212,7 @@ static int clear_O_DIRECT(int fd) } return 0; } +# endif #endif static ssize_t dd_read(void *ibuf, size_t ibs) @@ -225,8 +227,10 @@ static ssize_t dd_read(void *ibuf, size_t ibs) #endif n = safe_read(ifd, ibuf, ibs); #if ENABLE_FEATURE_DD_IBS_OBS +# ifdef O_DIRECT if (n < 0 && (G.flags & FLAG_IDIRECT) && clear_O_DIRECT(ifd)) goto read_again; +# endif #endif return n; } @@ -239,8 +243,10 @@ static bool write_and_stats(const void *buf, size_t len, size_t obs, IF_FEATURE_DD_IBS_OBS(write_again:) n = full_write(ofd, buf, len); #if ENABLE_FEATURE_DD_IBS_OBS +# ifdef O_DIRECT if (n < 0 && (G.flags & FLAG_ODIRECT) && clear_O_DIRECT(ofd)) goto write_again; +# endif #endif #if ENABLE_FEATURE_DD_THIRD_STATUS_LINE @@ -501,8 +507,13 @@ int dd_main(int argc UNUSED_PARAM, char **argv) if (infile) { int iflag = O_RDONLY; #if ENABLE_FEATURE_DD_IBS_OBS - if (G.flags & FLAG_IDIRECT) + if (G.flags & FLAG_IDIRECT) { +# ifdef O_DIRECT iflag |= O_DIRECT; +# else + bb_error_msg_and_die("O_DIRECT not supported on this platform"); +# endif + } #endif xmove_fd(xopen(infile, iflag), ifd); } else { @@ -516,8 +527,13 @@ int dd_main(int argc UNUSED_PARAM, char **argv) if (G.flags & FLAG_APPEND) oflag |= O_APPEND; #if ENABLE_FEATURE_DD_IBS_OBS - if (G.flags & FLAG_ODIRECT) + if (G.flags & FLAG_ODIRECT) { +# ifdef O_DIRECT oflag |= O_DIRECT; +# else + bb_error_msg_and_die("O_DIRECT not supported on this platform"); +# endif + } #endif xmove_fd(xopen(outfile, oflag), ofd); diff --git a/klibc-utils/run-init.c b/klibc-utils/run-init.c index 73c677bab..77fc0e60c 100644 --- a/klibc-utils/run-init.c +++ b/klibc-utils/run-init.c @@ -8,6 +8,7 @@ //config:config RUN_INIT //config: bool "run-init (7.7 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: The run-init utility is used from initramfs to select a new //config: root device. Under initramfs, you have to use this instead of diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c index 209d1d560..c289245c0 100644 --- a/miscutils/adjtimex.c +++ b/miscutils/adjtimex.c @@ -13,6 +13,7 @@ //config:config ADJTIMEX //config: bool "adjtimex (4.7 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Adjtimex reads and optionally sets adjustment parameters for //config: the Linux clock adjustment algorithm. diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c index da26f5e19..46749fb9c 100644 --- a/miscutils/i2c_tools.c +++ b/miscutils/i2c_tools.c @@ -11,30 +11,35 @@ //config:config I2CGET //config: bool "i2cget (5.5 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Read from I2C/SMBus chip registers. //config: //config:config I2CSET //config: bool "i2cset (6.7 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Set I2C registers. //config: //config:config I2CDUMP //config: bool "i2cdump (7.1 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Examine I2C registers. //config: //config:config I2CDETECT //config: bool "i2cdetect (7.1 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Detect I2C chips. //config: //config:config I2CTRANSFER //config: bool "i2ctransfer (4.0 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Send user-defined I2C messages in one transfer. //config: diff --git a/miscutils/partprobe.c b/miscutils/partprobe.c index 0fb1927b7..0abed6ff1 100644 --- a/miscutils/partprobe.c +++ b/miscutils/partprobe.c @@ -7,6 +7,7 @@ //config:config PARTPROBE //config: bool "partprobe (3.5 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Ask kernel to rescan partition table. diff --git a/miscutils/ubirename.c b/miscutils/ubirename.c index 06a0adacf..e7c56640c 100644 --- a/miscutils/ubirename.c +++ b/miscutils/ubirename.c @@ -9,6 +9,7 @@ //config:config UBIRENAME //config: bool "ubirename (2.4 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Utility to rename UBI volumes diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index 9f5a4b849..91a20239d 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c @@ -11,6 +11,7 @@ //config:config WATCHDOG //config: bool "watchdog (5.3 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: The watchdog utility is used with hardware or software watchdog //config: device drivers. It opens the specified watchdog device special file diff --git a/modutils/Config.src b/modutils/Config.src index 188296814..b8ba3b7b6 100644 --- a/modutils/Config.src +++ b/modutils/Config.src @@ -8,6 +8,7 @@ menu "Linux Module Utilities" config MODPROBE_SMALL bool "Simplified modutils" default y + select PLATFORM_LINUX help Build smaller (~1.5 kbytes), simplified module tools. diff --git a/modutils/depmod.c b/modutils/depmod.c index bb42bbefe..9e39481c5 100644 --- a/modutils/depmod.c +++ b/modutils/depmod.c @@ -10,6 +10,7 @@ //config:config DEPMOD //config: bool "depmod (27 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: depmod generates modules.dep (and potentially modules.alias //config: and modules.symbols) that contain dependency information diff --git a/modutils/insmod.c b/modutils/insmod.c index 8f7163e25..85b46cdd6 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c @@ -9,6 +9,7 @@ //config:config INSMOD //config: bool "insmod (22 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: insmod is used to load specified modules in the running kernel. diff --git a/modutils/lsmod.c b/modutils/lsmod.c index 2beb12362..39dc8e6b7 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c @@ -10,6 +10,7 @@ //config:config LSMOD //config: bool "lsmod (1.9 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: lsmod is used to display a list of loaded modules. //config: diff --git a/modutils/modinfo.c b/modutils/modinfo.c index 0a86c3296..5d01179a0 100644 --- a/modutils/modinfo.c +++ b/modutils/modinfo.c @@ -8,6 +8,7 @@ //config:config MODINFO //config: bool "modinfo (24 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Show information about a Linux Kernel module diff --git a/modutils/modprobe.c b/modutils/modprobe.c index 235706fd5..77c4bb74d 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c @@ -10,6 +10,7 @@ //config:config MODPROBE //config: bool "modprobe (28 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Handle the loading of modules, and their dependencies on a high //config: level. diff --git a/modutils/rmmod.c b/modutils/rmmod.c index 2b3c39153..8d4639f50 100644 --- a/modutils/rmmod.c +++ b/modutils/rmmod.c @@ -10,6 +10,7 @@ //config:config RMMOD //config: bool "rmmod (3.3 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: rmmod is used to unload specified modules from the kernel. diff --git a/networking/arp.c b/networking/arp.c index 16783ab95..6519f8156 100644 --- a/networking/arp.c +++ b/networking/arp.c @@ -15,6 +15,7 @@ //config:config ARP //config: bool "arp (10 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Manipulate the system ARP cache. diff --git a/networking/arping.c b/networking/arping.c index 86f0221ed..fd0e1b276 100644 --- a/networking/arping.c +++ b/networking/arping.c @@ -8,6 +8,7 @@ //config:config ARPING //config: bool "arping (9 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Ping hosts by ARP packets. diff --git a/networking/brctl.c b/networking/brctl.c index 956bd91f3..b353210d7 100644 --- a/networking/brctl.c +++ b/networking/brctl.c @@ -12,6 +12,7 @@ //config:config BRCTL //config: bool "brctl (4.7 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Manage ethernet bridges. //config: Supports addbr/delbr and addif/delif. diff --git a/networking/ifconfig.c b/networking/ifconfig.c index 9ee232a66..4090959b8 100644 --- a/networking/ifconfig.c +++ b/networking/ifconfig.c @@ -27,6 +27,7 @@ //config:config IFCONFIG //config: bool "ifconfig (12 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Ifconfig is used to configure the kernel-resident network interfaces. //config: diff --git a/networking/ifplugd.c b/networking/ifplugd.c index 0b55bf4e5..bc4303ef0 100644 --- a/networking/ifplugd.c +++ b/networking/ifplugd.c @@ -9,6 +9,7 @@ //config:config IFPLUGD //config: bool "ifplugd (10 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Network interface plug detection daemon. diff --git a/networking/ip.c b/networking/ip.c index 7c3208699..23ee7d24b 100644 --- a/networking/ip.c +++ b/networking/ip.c @@ -11,6 +11,7 @@ //config:config IP //config: bool "ip (35 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: The "ip" applet is a TCP/IP interface configuration and routing //config: utility. @@ -21,6 +22,7 @@ //config:config IPADDR //config: bool "ipaddr (14 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select FEATURE_IP_ADDRESS //config: help //config: Short form of "ip addr" @@ -28,6 +30,7 @@ //config:config IPLINK //config: bool "iplink (17 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select FEATURE_IP_LINK //config: help //config: Short form of "ip link" @@ -35,6 +38,7 @@ //config:config IPROUTE //config: bool "iproute (15 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select FEATURE_IP_ROUTE //config: help //config: Short form of "ip route" @@ -49,6 +53,7 @@ //config:config IPRULE //config: bool "iprule (10 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select FEATURE_IP_RULE //config: help //config: Short form of "ip rule" @@ -56,6 +61,7 @@ //config:config IPNEIGH //config: bool "ipneigh (8.3 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select FEATURE_IP_NEIGH //config: help //config: Short form of "ip neigh" diff --git a/networking/nameif.c b/networking/nameif.c index 66e042688..3ccd935b8 100644 --- a/networking/nameif.c +++ b/networking/nameif.c @@ -12,6 +12,7 @@ //config:config NAMEIF //config: bool "nameif (6.6 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select FEATURE_SYSLOG //config: help //config: nameif is used to rename network interface by its MAC address. diff --git a/networking/route.c b/networking/route.c index 26146f8e9..616572814 100644 --- a/networking/route.c +++ b/networking/route.c @@ -27,6 +27,7 @@ //config:config ROUTE //config: bool "route (8.7 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Route displays or manipulates the kernel's IP routing tables. diff --git a/networking/tc.c b/networking/tc.c index 43187f7ee..1f4bcce2b 100644 --- a/networking/tc.c +++ b/networking/tc.c @@ -9,6 +9,7 @@ //config:config TC //config: bool "tc (8.3 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Show / manipulate traffic control settings //config: diff --git a/networking/traceroute.c b/networking/traceroute.c index 4bbe1ab8e..2ba990fd0 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c @@ -963,8 +963,10 @@ traceroute_init(int op, char **argv) if (af == AF_INET) { xmove_fd(xsocket(AF_INET, SOCK_RAW, IPPROTO_ICMP), rcvsock); #if ENABLE_FEATURE_TRACEROUTE_VERBOSE +# ifdef IP_PKTINFO /* want recvmsg to report target local address (for -v) */ setsockopt_1(rcvsock, IPPROTO_IP, IP_PKTINFO); +# endif #endif } #if ENABLE_TRACEROUTE6 diff --git a/networking/tunctl.c b/networking/tunctl.c index 97e6917aa..59cae331c 100644 --- a/networking/tunctl.c +++ b/networking/tunctl.c @@ -12,6 +12,7 @@ //config:config TUNCTL //config: bool "tunctl (6.2 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: tunctl creates or deletes tun devices. //config: diff --git a/networking/udhcp/Config.src b/networking/udhcp/Config.src index 8c8c11c26..23e2b40d8 100644 --- a/networking/udhcp/Config.src +++ b/networking/udhcp/Config.src @@ -6,6 +6,7 @@ config UDHCPD bool "udhcpd (21 kb)" default y + select PLATFORM_LINUX help udhcpd is a DHCP server geared primarily toward embedded systems, while striving to be fully functional and RFC compliant. @@ -53,6 +54,7 @@ config DUMPLEASES config DHCPRELAY bool "dhcprelay (5.2 kb)" default y + select PLATFORM_LINUX help dhcprelay listens for DHCP requests on one or more interfaces and forwards these requests to a different interface or DHCP @@ -61,6 +63,7 @@ config DHCPRELAY config UDHCPC bool "udhcpc (24 kb)" default y + select PLATFORM_LINUX help udhcpc is a DHCP client geared primarily toward embedded systems, while striving to be fully functional and RFC compliant. diff --git a/procps/free.c b/procps/free.c index 0b68e1b88..c734f757d 100644 --- a/procps/free.c +++ b/procps/free.c @@ -9,6 +9,7 @@ //config:config FREE //config: bool "free (3.1 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: free displays the total amount of free and used physical and swap //config: memory in the system, as well as the buffers used by the kernel. diff --git a/procps/uptime.c b/procps/uptime.c index 4fd0c9d2d..4992c263e 100644 --- a/procps/uptime.c +++ b/procps/uptime.c @@ -14,6 +14,7 @@ //config:config UPTIME //config: bool "uptime (3.7 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: uptime gives a one line display of the current time, how long //config: the system has been running, how many users are currently logged diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index df0edee0a..ddf50071d 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c @@ -19,6 +19,7 @@ //config:config KLOGD //config: bool "klogd (5.7 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: klogd is a utility which intercepts and logs all //config: messages from the Linux kernel and sends the messages diff --git a/util-linux/acpid.c b/util-linux/acpid.c index 00613f8e3..7bce8abea 100644 --- a/util-linux/acpid.c +++ b/util-linux/acpid.c @@ -9,6 +9,7 @@ //config:config ACPID //config: bool "acpid (9 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: acpid listens to ACPI events coming either in textual form from //config: /proc/acpi/event (though it is marked deprecated it is still widely diff --git a/util-linux/blkdiscard.c b/util-linux/blkdiscard.c index 7ac8045f9..2291eec21 100644 --- a/util-linux/blkdiscard.c +++ b/util-linux/blkdiscard.c @@ -8,6 +8,7 @@ //config:config BLKDISCARD //config: bool "blkdiscard (4.3 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: blkdiscard discards sectors on a given device. diff --git a/util-linux/blkid.c b/util-linux/blkid.c index 4a820771f..008ae5d9e 100644 --- a/util-linux/blkid.c +++ b/util-linux/blkid.c @@ -9,6 +9,7 @@ //config:config BLKID //config: bool "blkid (12 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select VOLUMEID //config: help //config: Lists labels and UUIDs of all filesystems. diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c index 6670b84de..5da887f0e 100644 --- a/util-linux/dmesg.c +++ b/util-linux/dmesg.c @@ -11,6 +11,7 @@ //config:config DMESG //config: bool "dmesg (3.7 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: dmesg is used to examine or control the kernel ring buffer. When the //config: Linux kernel prints messages to the system log, they are stored in diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index 20e7d56fa..e9ebbd5d4 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c @@ -10,6 +10,7 @@ //config:config FDISK //config: bool "fdisk (37 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: The fdisk utility is used to divide hard disks into one or more //config: logical disks, which are generally called partitions. This utility diff --git a/util-linux/findfs.c b/util-linux/findfs.c index f5621a1fa..7ca9dc96b 100644 --- a/util-linux/findfs.c +++ b/util-linux/findfs.c @@ -10,6 +10,7 @@ //config:config FINDFS //config: bool "findfs (12 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select VOLUMEID //config: help //config: Prints the name of a filesystem with given label or UUID. diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c index 309169d25..d27113d97 100644 --- a/util-linux/freeramdisk.c +++ b/util-linux/freeramdisk.c @@ -11,6 +11,7 @@ //config:config FDFLUSH //config: bool "fdflush (1.3 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: fdflush is only needed when changing media on slightly-broken //config: removable media drives. It is used to make Linux believe that a @@ -23,6 +24,7 @@ //config:config FREERAMDISK //config: bool "freeramdisk (1.3 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Linux allows you to create ramdisks. This utility allows you to //config: delete them and completely free all memory that was used for the diff --git a/util-linux/fsfreeze.c b/util-linux/fsfreeze.c index 6e2ff0a54..fb0b3c4bd 100644 --- a/util-linux/fsfreeze.c +++ b/util-linux/fsfreeze.c @@ -7,6 +7,7 @@ //config:config FSFREEZE //config: bool "fsfreeze (3.5 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select LONG_OPTS //config: help //config: Halt new accesses and flush writes on a mounted filesystem. diff --git a/util-linux/fstrim.c b/util-linux/fstrim.c index 6d673002f..12bab40d1 100644 --- a/util-linux/fstrim.c +++ b/util-linux/fstrim.c @@ -10,6 +10,7 @@ //config:config FSTRIM //config: bool "fstrim (4.4 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Discard unused blocks on a mounted filesystem. diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c index 723b09589..2edadfa4d 100644 --- a/util-linux/hwclock.c +++ b/util-linux/hwclock.c @@ -9,6 +9,7 @@ //config:config HWCLOCK //config: bool "hwclock (5.8 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: The hwclock utility is used to read and set the hardware clock //config: on a system. This is primarily used to set the current time on diff --git a/util-linux/ionice.c b/util-linux/ionice.c index 82bd309d1..b30d5f78d 100644 --- a/util-linux/ionice.c +++ b/util-linux/ionice.c @@ -9,6 +9,7 @@ //config:config IONICE //config: bool "ionice (3.8 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Set/set program io scheduling class and priority //config: Requires kernel >= 2.6.13 diff --git a/util-linux/losetup.c b/util-linux/losetup.c index 24f7a2349..ec0cf04e4 100644 --- a/util-linux/losetup.c +++ b/util-linux/losetup.c @@ -9,6 +9,7 @@ //config:config LOSETUP //config: bool "losetup (5.5 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: losetup is used to associate or detach a loop device with a regular //config: file or block device, and to query the status of a loop device. This diff --git a/util-linux/mdev.c b/util-linux/mdev.c index ebdc0c254..f6de7ad2a 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c @@ -10,6 +10,7 @@ //config:config MDEV //config: bool "mdev (17 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: mdev is a mini-udev implementation for dynamically creating device //config: nodes in the /dev directory. diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c index fcf374b2d..892b0867a 100644 --- a/util-linux/mkfs_ext2.c +++ b/util-linux/mkfs_ext2.c @@ -10,6 +10,7 @@ //config:config MKE2FS //config: bool "mke2fs (10 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Utility to create EXT2 filesystems. //config: diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c index 821371953..5136446eb 100644 --- a/util-linux/mkfs_vfat.c +++ b/util-linux/mkfs_vfat.c @@ -10,6 +10,7 @@ //config:config MKDOSFS //config: bool "mkdosfs (7.2 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Utility to create FAT32 filesystems. //config: diff --git a/util-linux/mount.c b/util-linux/mount.c index 4e65b6b46..e3aeda666 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -20,6 +20,7 @@ //config:config MOUNT //config: bool "mount (23 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: All files and filesystems in Unix are arranged into one big directory //config: tree. The 'mount' utility is used to graft a filesystem onto a diff --git a/util-linux/nsenter.c b/util-linux/nsenter.c index 1aa045b35..8652e803a 100644 --- a/util-linux/nsenter.c +++ b/util-linux/nsenter.c @@ -9,6 +9,7 @@ //config:config NSENTER //config: bool "nsenter (6.5 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Run program with namespaces of other processes. diff --git a/util-linux/pivot_root.c b/util-linux/pivot_root.c index ecc891100..41f29da32 100644 --- a/util-linux/pivot_root.c +++ b/util-linux/pivot_root.c @@ -11,6 +11,7 @@ //config:config PIVOT_ROOT //config: bool "pivot_root (1.1 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: The pivot_root utility swaps the mount points for the root filesystem //config: with some other mounted filesystem. This allows you to do all sorts diff --git a/util-linux/setarch.c b/util-linux/setarch.c index cf8ef0064..57051a683 100644 --- a/util-linux/setarch.c +++ b/util-linux/setarch.c @@ -9,6 +9,7 @@ //config:config SETARCH //config: bool "setarch (3.6 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: The linux32 utility is used to create a 32bit environment for the //config: specified program (usually a shell). It only makes sense to have @@ -18,12 +19,14 @@ //config:config LINUX32 //config: bool "linux32 (3.3 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Alias to "setarch linux32". //config: //config:config LINUX64 //config: bool "linux64 (3.3 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Alias to "setarch linux64". diff --git a/util-linux/setpriv.c b/util-linux/setpriv.c index 6904cf019..bfe2c7a7a 100644 --- a/util-linux/setpriv.c +++ b/util-linux/setpriv.c @@ -9,6 +9,7 @@ //config:config SETPRIV //config: bool "setpriv (6.6 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select LONG_OPTS //config: help //config: Run a program with different Linux privilege settings. diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index e2ff4b5cc..567869cc7 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c @@ -9,6 +9,7 @@ //config:config SWAPON //config: bool "swapon (15 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Once you have created some swap space using 'mkswap', you also need //config: to enable your swap space with the 'swapon' utility. The 'swapoff' @@ -35,6 +36,7 @@ //config:config SWAPOFF //config: bool "swapoff (14 kb)" //config: default y +//config: select PLATFORM_LINUX //config: //config:config FEATURE_SWAPONOFF_LABEL //config: bool "Support specifying devices by label or UUID" diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c index 901c0b8db..f61002236 100644 --- a/util-linux/switch_root.c +++ b/util-linux/switch_root.c @@ -9,6 +9,7 @@ //config:config SWITCH_ROOT //config: bool "switch_root (5.5 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: The switch_root utility is used from initramfs to select a new //config: root device. Under initramfs, you have to use this instead of diff --git a/util-linux/uevent.c b/util-linux/uevent.c index db11746d0..bd39c3acd 100644 --- a/util-linux/uevent.c +++ b/util-linux/uevent.c @@ -6,6 +6,7 @@ //config:config UEVENT //config: bool "uevent (3.1 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: uevent is a netlink listener for kernel uevent notifications //config: sent via netlink. It is usually used for dynamic device creation. diff --git a/util-linux/unshare.c b/util-linux/unshare.c index 06b938074..156a96d94 100644 --- a/util-linux/unshare.c +++ b/util-linux/unshare.c @@ -9,6 +9,7 @@ //config:config UNSHARE //config: bool "unshare (7.2 kb)" //config: default y +//config: select PLATFORM_LINUX //config: depends on !NOMMU //config: select LONG_OPTS //config: help From farmatito at tiscali.it Sun Oct 16 07:26:27 2022 From: farmatito at tiscali.it (tito) Date: Sun, 16 Oct 2022 09:26:27 +0200 Subject: [PATCH] Fix non-Linux builds In-Reply-To: <20221016000459.5itbhtqlkkozgdnp@begin> References: <20221016000459.5itbhtqlkkozgdnp@begin> Message-ID: <20221016092627.1197e813@devuan> On Sun, 16 Oct 2022 02:04:59 +0200 Samuel Thibault wrote: > Various tools are Linuxish and should thus only attempted to build on > Linux only. Some features are also Linux-only. Hi, just out of curiosity why can this not be fixed by simply creating a config file that disables the applets that are not relevant for your platform? I think this would reduce the size of the patch to the #ifdef O_DIRECT part which could be moved for example to include/platform.h. Busybox " is also extremely modular so you can easily include or exclude commands (or features) at compile time. " Ciao, Tito > Also, libresolv is used on all GNU platforms, notably GNU/Hurd and > GNU/kfreeBSD. > > diff --git a/Makefile.flags b/Makefile.flags > index 84cb00a75..50137a78e 100644 > --- a/Makefile.flags > +++ b/Makefile.flags > @@ -184,7 +184,7 @@ LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=% > endif > > ifeq ($(CONFIG_FEATURE_NSLOOKUP_BIG),y) > -ifneq (,$(findstring linux,$(shell $(CC) $(CFLAGS) -dumpmachine))) > +ifneq (,$(findstring gnu,$(shell $(CC) $(CFLAGS) -dumpmachine))) > LDLIBS += resolv > endif > endif > diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c > index 81a0e6aa8..3f36cabe0 100644 > --- a/console-tools/loadfont.c > +++ b/console-tools/loadfont.c > @@ -12,6 +12,7 @@ > //config:config LOADFONT > //config: bool "loadfont (5.2 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: This program loads a console font from standard input. > //config: > diff --git a/console-tools/openvt.c b/console-tools/openvt.c > index db2f073b2..9e6cffecc 100644 > --- a/console-tools/openvt.c > +++ b/console-tools/openvt.c > @@ -10,6 +10,7 @@ > //config:config OPENVT > //config: bool "openvt (7.2 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: This program is used to start a command on an unused > //config: virtual terminal. > diff --git a/coreutils/dd.c b/coreutils/dd.c > index 06c1b7b9c..3e034eb1e 100644 > --- a/coreutils/dd.c > +++ b/coreutils/dd.c > @@ -200,6 +200,7 @@ static void dd_output_status(int UNUSED_PARAM cur_signal) > } > > #if ENABLE_FEATURE_DD_IBS_OBS > +# ifdef O_DIRECT > static int clear_O_DIRECT(int fd) > { > if (errno == EINVAL) { > @@ -211,6 +212,7 @@ static int clear_O_DIRECT(int fd) > } > return 0; > } > +# endif > #endif > > static ssize_t dd_read(void *ibuf, size_t ibs) > @@ -225,8 +227,10 @@ static ssize_t dd_read(void *ibuf, size_t ibs) > #endif > n = safe_read(ifd, ibuf, ibs); > #if ENABLE_FEATURE_DD_IBS_OBS > +# ifdef O_DIRECT > if (n < 0 && (G.flags & FLAG_IDIRECT) && clear_O_DIRECT(ifd)) > goto read_again; > +# endif > #endif > return n; > } > @@ -239,8 +243,10 @@ static bool write_and_stats(const void *buf, size_t len, size_t obs, > IF_FEATURE_DD_IBS_OBS(write_again:) > n = full_write(ofd, buf, len); > #if ENABLE_FEATURE_DD_IBS_OBS > +# ifdef O_DIRECT > if (n < 0 && (G.flags & FLAG_ODIRECT) && clear_O_DIRECT(ofd)) > goto write_again; > +# endif > #endif > > #if ENABLE_FEATURE_DD_THIRD_STATUS_LINE > @@ -501,8 +507,13 @@ int dd_main(int argc UNUSED_PARAM, char **argv) > if (infile) { > int iflag = O_RDONLY; > #if ENABLE_FEATURE_DD_IBS_OBS > - if (G.flags & FLAG_IDIRECT) > + if (G.flags & FLAG_IDIRECT) { > +# ifdef O_DIRECT > iflag |= O_DIRECT; > +# else > + bb_error_msg_and_die("O_DIRECT not supported on this platform"); > +# endif > + } > #endif > xmove_fd(xopen(infile, iflag), ifd); > } else { > @@ -516,8 +527,13 @@ int dd_main(int argc UNUSED_PARAM, char **argv) > if (G.flags & FLAG_APPEND) > oflag |= O_APPEND; > #if ENABLE_FEATURE_DD_IBS_OBS > - if (G.flags & FLAG_ODIRECT) > + if (G.flags & FLAG_ODIRECT) { > +# ifdef O_DIRECT > oflag |= O_DIRECT; > +# else > + bb_error_msg_and_die("O_DIRECT not supported on this platform"); > +# endif > + } > #endif > xmove_fd(xopen(outfile, oflag), ofd); > > diff --git a/klibc-utils/run-init.c b/klibc-utils/run-init.c > index 73c677bab..77fc0e60c 100644 > --- a/klibc-utils/run-init.c > +++ b/klibc-utils/run-init.c > @@ -8,6 +8,7 @@ > //config:config RUN_INIT > //config: bool "run-init (7.7 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: The run-init utility is used from initramfs to select a new > //config: root device. Under initramfs, you have to use this instead of > diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c > index 209d1d560..c289245c0 100644 > --- a/miscutils/adjtimex.c > +++ b/miscutils/adjtimex.c > @@ -13,6 +13,7 @@ > //config:config ADJTIMEX > //config: bool "adjtimex (4.7 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Adjtimex reads and optionally sets adjustment parameters for > //config: the Linux clock adjustment algorithm. > diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c > index da26f5e19..46749fb9c 100644 > --- a/miscutils/i2c_tools.c > +++ b/miscutils/i2c_tools.c > @@ -11,30 +11,35 @@ > //config:config I2CGET > //config: bool "i2cget (5.5 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Read from I2C/SMBus chip registers. > //config: > //config:config I2CSET > //config: bool "i2cset (6.7 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Set I2C registers. > //config: > //config:config I2CDUMP > //config: bool "i2cdump (7.1 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Examine I2C registers. > //config: > //config:config I2CDETECT > //config: bool "i2cdetect (7.1 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Detect I2C chips. > //config: > //config:config I2CTRANSFER > //config: bool "i2ctransfer (4.0 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Send user-defined I2C messages in one transfer. > //config: > diff --git a/miscutils/partprobe.c b/miscutils/partprobe.c > index 0fb1927b7..0abed6ff1 100644 > --- a/miscutils/partprobe.c > +++ b/miscutils/partprobe.c > @@ -7,6 +7,7 @@ > //config:config PARTPROBE > //config: bool "partprobe (3.5 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Ask kernel to rescan partition table. > > diff --git a/miscutils/ubirename.c b/miscutils/ubirename.c > index 06a0adacf..e7c56640c 100644 > --- a/miscutils/ubirename.c > +++ b/miscutils/ubirename.c > @@ -9,6 +9,7 @@ > //config:config UBIRENAME > //config: bool "ubirename (2.4 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Utility to rename UBI volumes > > diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c > index 9f5a4b849..91a20239d 100644 > --- a/miscutils/watchdog.c > +++ b/miscutils/watchdog.c > @@ -11,6 +11,7 @@ > //config:config WATCHDOG > //config: bool "watchdog (5.3 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: The watchdog utility is used with hardware or software watchdog > //config: device drivers. It opens the specified watchdog device special file > diff --git a/modutils/Config.src b/modutils/Config.src > index 188296814..b8ba3b7b6 100644 > --- a/modutils/Config.src > +++ b/modutils/Config.src > @@ -8,6 +8,7 @@ menu "Linux Module Utilities" > config MODPROBE_SMALL > bool "Simplified modutils" > default y > + select PLATFORM_LINUX > help > Build smaller (~1.5 kbytes), simplified module tools. > > diff --git a/modutils/depmod.c b/modutils/depmod.c > index bb42bbefe..9e39481c5 100644 > --- a/modutils/depmod.c > +++ b/modutils/depmod.c > @@ -10,6 +10,7 @@ > //config:config DEPMOD > //config: bool "depmod (27 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: depmod generates modules.dep (and potentially modules.alias > //config: and modules.symbols) that contain dependency information > diff --git a/modutils/insmod.c b/modutils/insmod.c > index 8f7163e25..85b46cdd6 100644 > --- a/modutils/insmod.c > +++ b/modutils/insmod.c > @@ -9,6 +9,7 @@ > //config:config INSMOD > //config: bool "insmod (22 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: insmod is used to load specified modules in the running kernel. > > diff --git a/modutils/lsmod.c b/modutils/lsmod.c > index 2beb12362..39dc8e6b7 100644 > --- a/modutils/lsmod.c > +++ b/modutils/lsmod.c > @@ -10,6 +10,7 @@ > //config:config LSMOD > //config: bool "lsmod (1.9 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: lsmod is used to display a list of loaded modules. > //config: > diff --git a/modutils/modinfo.c b/modutils/modinfo.c > index 0a86c3296..5d01179a0 100644 > --- a/modutils/modinfo.c > +++ b/modutils/modinfo.c > @@ -8,6 +8,7 @@ > //config:config MODINFO > //config: bool "modinfo (24 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Show information about a Linux Kernel module > > diff --git a/modutils/modprobe.c b/modutils/modprobe.c > index 235706fd5..77c4bb74d 100644 > --- a/modutils/modprobe.c > +++ b/modutils/modprobe.c > @@ -10,6 +10,7 @@ > //config:config MODPROBE > //config: bool "modprobe (28 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Handle the loading of modules, and their dependencies on a high > //config: level. > diff --git a/modutils/rmmod.c b/modutils/rmmod.c > index 2b3c39153..8d4639f50 100644 > --- a/modutils/rmmod.c > +++ b/modutils/rmmod.c > @@ -10,6 +10,7 @@ > //config:config RMMOD > //config: bool "rmmod (3.3 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: rmmod is used to unload specified modules from the kernel. > > diff --git a/networking/arp.c b/networking/arp.c > index 16783ab95..6519f8156 100644 > --- a/networking/arp.c > +++ b/networking/arp.c > @@ -15,6 +15,7 @@ > //config:config ARP > //config: bool "arp (10 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Manipulate the system ARP cache. > > diff --git a/networking/arping.c b/networking/arping.c > index 86f0221ed..fd0e1b276 100644 > --- a/networking/arping.c > +++ b/networking/arping.c > @@ -8,6 +8,7 @@ > //config:config ARPING > //config: bool "arping (9 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Ping hosts by ARP packets. > > diff --git a/networking/brctl.c b/networking/brctl.c > index 956bd91f3..b353210d7 100644 > --- a/networking/brctl.c > +++ b/networking/brctl.c > @@ -12,6 +12,7 @@ > //config:config BRCTL > //config: bool "brctl (4.7 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Manage ethernet bridges. > //config: Supports addbr/delbr and addif/delif. > diff --git a/networking/ifconfig.c b/networking/ifconfig.c > index 9ee232a66..4090959b8 100644 > --- a/networking/ifconfig.c > +++ b/networking/ifconfig.c > @@ -27,6 +27,7 @@ > //config:config IFCONFIG > //config: bool "ifconfig (12 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Ifconfig is used to configure the kernel-resident network interfaces. > //config: > diff --git a/networking/ifplugd.c b/networking/ifplugd.c > index 0b55bf4e5..bc4303ef0 100644 > --- a/networking/ifplugd.c > +++ b/networking/ifplugd.c > @@ -9,6 +9,7 @@ > //config:config IFPLUGD > //config: bool "ifplugd (10 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Network interface plug detection daemon. > > diff --git a/networking/ip.c b/networking/ip.c > index 7c3208699..23ee7d24b 100644 > --- a/networking/ip.c > +++ b/networking/ip.c > @@ -11,6 +11,7 @@ > //config:config IP > //config: bool "ip (35 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: The "ip" applet is a TCP/IP interface configuration and routing > //config: utility. > @@ -21,6 +22,7 @@ > //config:config IPADDR > //config: bool "ipaddr (14 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: select FEATURE_IP_ADDRESS > //config: help > //config: Short form of "ip addr" > @@ -28,6 +30,7 @@ > //config:config IPLINK > //config: bool "iplink (17 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: select FEATURE_IP_LINK > //config: help > //config: Short form of "ip link" > @@ -35,6 +38,7 @@ > //config:config IPROUTE > //config: bool "iproute (15 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: select FEATURE_IP_ROUTE > //config: help > //config: Short form of "ip route" > @@ -49,6 +53,7 @@ > //config:config IPRULE > //config: bool "iprule (10 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: select FEATURE_IP_RULE > //config: help > //config: Short form of "ip rule" > @@ -56,6 +61,7 @@ > //config:config IPNEIGH > //config: bool "ipneigh (8.3 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: select FEATURE_IP_NEIGH > //config: help > //config: Short form of "ip neigh" > diff --git a/networking/nameif.c b/networking/nameif.c > index 66e042688..3ccd935b8 100644 > --- a/networking/nameif.c > +++ b/networking/nameif.c > @@ -12,6 +12,7 @@ > //config:config NAMEIF > //config: bool "nameif (6.6 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: select FEATURE_SYSLOG > //config: help > //config: nameif is used to rename network interface by its MAC address. > diff --git a/networking/route.c b/networking/route.c > index 26146f8e9..616572814 100644 > --- a/networking/route.c > +++ b/networking/route.c > @@ -27,6 +27,7 @@ > //config:config ROUTE > //config: bool "route (8.7 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Route displays or manipulates the kernel's IP routing tables. > > diff --git a/networking/tc.c b/networking/tc.c > index 43187f7ee..1f4bcce2b 100644 > --- a/networking/tc.c > +++ b/networking/tc.c > @@ -9,6 +9,7 @@ > //config:config TC > //config: bool "tc (8.3 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Show / manipulate traffic control settings > //config: > diff --git a/networking/traceroute.c b/networking/traceroute.c > index 4bbe1ab8e..2ba990fd0 100644 > --- a/networking/traceroute.c > +++ b/networking/traceroute.c > @@ -963,8 +963,10 @@ traceroute_init(int op, char **argv) > if (af == AF_INET) { > xmove_fd(xsocket(AF_INET, SOCK_RAW, IPPROTO_ICMP), rcvsock); > #if ENABLE_FEATURE_TRACEROUTE_VERBOSE > +# ifdef IP_PKTINFO > /* want recvmsg to report target local address (for -v) */ > setsockopt_1(rcvsock, IPPROTO_IP, IP_PKTINFO); > +# endif > #endif > } > #if ENABLE_TRACEROUTE6 > diff --git a/networking/tunctl.c b/networking/tunctl.c > index 97e6917aa..59cae331c 100644 > --- a/networking/tunctl.c > +++ b/networking/tunctl.c > @@ -12,6 +12,7 @@ > //config:config TUNCTL > //config: bool "tunctl (6.2 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: tunctl creates or deletes tun devices. > //config: > diff --git a/networking/udhcp/Config.src b/networking/udhcp/Config.src > index 8c8c11c26..23e2b40d8 100644 > --- a/networking/udhcp/Config.src > +++ b/networking/udhcp/Config.src > @@ -6,6 +6,7 @@ > config UDHCPD > bool "udhcpd (21 kb)" > default y > + select PLATFORM_LINUX > help > udhcpd is a DHCP server geared primarily toward embedded systems, > while striving to be fully functional and RFC compliant. > @@ -53,6 +54,7 @@ config DUMPLEASES > config DHCPRELAY > bool "dhcprelay (5.2 kb)" > default y > + select PLATFORM_LINUX > help > dhcprelay listens for DHCP requests on one or more interfaces > and forwards these requests to a different interface or DHCP > @@ -61,6 +63,7 @@ config DHCPRELAY > config UDHCPC > bool "udhcpc (24 kb)" > default y > + select PLATFORM_LINUX > help > udhcpc is a DHCP client geared primarily toward embedded systems, > while striving to be fully functional and RFC compliant. > diff --git a/procps/free.c b/procps/free.c > index 0b68e1b88..c734f757d 100644 > --- a/procps/free.c > +++ b/procps/free.c > @@ -9,6 +9,7 @@ > //config:config FREE > //config: bool "free (3.1 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: free displays the total amount of free and used physical and swap > //config: memory in the system, as well as the buffers used by the kernel. > diff --git a/procps/uptime.c b/procps/uptime.c > index 4fd0c9d2d..4992c263e 100644 > --- a/procps/uptime.c > +++ b/procps/uptime.c > @@ -14,6 +14,7 @@ > //config:config UPTIME > //config: bool "uptime (3.7 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: uptime gives a one line display of the current time, how long > //config: the system has been running, how many users are currently logged > diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c > index df0edee0a..ddf50071d 100644 > --- a/sysklogd/klogd.c > +++ b/sysklogd/klogd.c > @@ -19,6 +19,7 @@ > //config:config KLOGD > //config: bool "klogd (5.7 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: klogd is a utility which intercepts and logs all > //config: messages from the Linux kernel and sends the messages > diff --git a/util-linux/acpid.c b/util-linux/acpid.c > index 00613f8e3..7bce8abea 100644 > --- a/util-linux/acpid.c > +++ b/util-linux/acpid.c > @@ -9,6 +9,7 @@ > //config:config ACPID > //config: bool "acpid (9 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: acpid listens to ACPI events coming either in textual form from > //config: /proc/acpi/event (though it is marked deprecated it is still widely > diff --git a/util-linux/blkdiscard.c b/util-linux/blkdiscard.c > index 7ac8045f9..2291eec21 100644 > --- a/util-linux/blkdiscard.c > +++ b/util-linux/blkdiscard.c > @@ -8,6 +8,7 @@ > //config:config BLKDISCARD > //config: bool "blkdiscard (4.3 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: blkdiscard discards sectors on a given device. > > diff --git a/util-linux/blkid.c b/util-linux/blkid.c > index 4a820771f..008ae5d9e 100644 > --- a/util-linux/blkid.c > +++ b/util-linux/blkid.c > @@ -9,6 +9,7 @@ > //config:config BLKID > //config: bool "blkid (12 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: select VOLUMEID > //config: help > //config: Lists labels and UUIDs of all filesystems. > diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c > index 6670b84de..5da887f0e 100644 > --- a/util-linux/dmesg.c > +++ b/util-linux/dmesg.c > @@ -11,6 +11,7 @@ > //config:config DMESG > //config: bool "dmesg (3.7 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: dmesg is used to examine or control the kernel ring buffer. When the > //config: Linux kernel prints messages to the system log, they are stored in > diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c > index 20e7d56fa..e9ebbd5d4 100644 > --- a/util-linux/fdisk.c > +++ b/util-linux/fdisk.c > @@ -10,6 +10,7 @@ > //config:config FDISK > //config: bool "fdisk (37 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: The fdisk utility is used to divide hard disks into one or more > //config: logical disks, which are generally called partitions. This utility > diff --git a/util-linux/findfs.c b/util-linux/findfs.c > index f5621a1fa..7ca9dc96b 100644 > --- a/util-linux/findfs.c > +++ b/util-linux/findfs.c > @@ -10,6 +10,7 @@ > //config:config FINDFS > //config: bool "findfs (12 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: select VOLUMEID > //config: help > //config: Prints the name of a filesystem with given label or UUID. > diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c > index 309169d25..d27113d97 100644 > --- a/util-linux/freeramdisk.c > +++ b/util-linux/freeramdisk.c > @@ -11,6 +11,7 @@ > //config:config FDFLUSH > //config: bool "fdflush (1.3 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: fdflush is only needed when changing media on slightly-broken > //config: removable media drives. It is used to make Linux believe that a > @@ -23,6 +24,7 @@ > //config:config FREERAMDISK > //config: bool "freeramdisk (1.3 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Linux allows you to create ramdisks. This utility allows you to > //config: delete them and completely free all memory that was used for the > diff --git a/util-linux/fsfreeze.c b/util-linux/fsfreeze.c > index 6e2ff0a54..fb0b3c4bd 100644 > --- a/util-linux/fsfreeze.c > +++ b/util-linux/fsfreeze.c > @@ -7,6 +7,7 @@ > //config:config FSFREEZE > //config: bool "fsfreeze (3.5 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: select LONG_OPTS > //config: help > //config: Halt new accesses and flush writes on a mounted filesystem. > diff --git a/util-linux/fstrim.c b/util-linux/fstrim.c > index 6d673002f..12bab40d1 100644 > --- a/util-linux/fstrim.c > +++ b/util-linux/fstrim.c > @@ -10,6 +10,7 @@ > //config:config FSTRIM > //config: bool "fstrim (4.4 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Discard unused blocks on a mounted filesystem. > > diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c > index 723b09589..2edadfa4d 100644 > --- a/util-linux/hwclock.c > +++ b/util-linux/hwclock.c > @@ -9,6 +9,7 @@ > //config:config HWCLOCK > //config: bool "hwclock (5.8 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: The hwclock utility is used to read and set the hardware clock > //config: on a system. This is primarily used to set the current time on > diff --git a/util-linux/ionice.c b/util-linux/ionice.c > index 82bd309d1..b30d5f78d 100644 > --- a/util-linux/ionice.c > +++ b/util-linux/ionice.c > @@ -9,6 +9,7 @@ > //config:config IONICE > //config: bool "ionice (3.8 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Set/set program io scheduling class and priority > //config: Requires kernel >= 2.6.13 > diff --git a/util-linux/losetup.c b/util-linux/losetup.c > index 24f7a2349..ec0cf04e4 100644 > --- a/util-linux/losetup.c > +++ b/util-linux/losetup.c > @@ -9,6 +9,7 @@ > //config:config LOSETUP > //config: bool "losetup (5.5 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: losetup is used to associate or detach a loop device with a regular > //config: file or block device, and to query the status of a loop device. This > diff --git a/util-linux/mdev.c b/util-linux/mdev.c > index ebdc0c254..f6de7ad2a 100644 > --- a/util-linux/mdev.c > +++ b/util-linux/mdev.c > @@ -10,6 +10,7 @@ > //config:config MDEV > //config: bool "mdev (17 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: mdev is a mini-udev implementation for dynamically creating device > //config: nodes in the /dev directory. > diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c > index fcf374b2d..892b0867a 100644 > --- a/util-linux/mkfs_ext2.c > +++ b/util-linux/mkfs_ext2.c > @@ -10,6 +10,7 @@ > //config:config MKE2FS > //config: bool "mke2fs (10 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Utility to create EXT2 filesystems. > //config: > diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c > index 821371953..5136446eb 100644 > --- a/util-linux/mkfs_vfat.c > +++ b/util-linux/mkfs_vfat.c > @@ -10,6 +10,7 @@ > //config:config MKDOSFS > //config: bool "mkdosfs (7.2 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Utility to create FAT32 filesystems. > //config: > diff --git a/util-linux/mount.c b/util-linux/mount.c > index 4e65b6b46..e3aeda666 100644 > --- a/util-linux/mount.c > +++ b/util-linux/mount.c > @@ -20,6 +20,7 @@ > //config:config MOUNT > //config: bool "mount (23 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: All files and filesystems in Unix are arranged into one big directory > //config: tree. The 'mount' utility is used to graft a filesystem onto a > diff --git a/util-linux/nsenter.c b/util-linux/nsenter.c > index 1aa045b35..8652e803a 100644 > --- a/util-linux/nsenter.c > +++ b/util-linux/nsenter.c > @@ -9,6 +9,7 @@ > //config:config NSENTER > //config: bool "nsenter (6.5 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Run program with namespaces of other processes. > > diff --git a/util-linux/pivot_root.c b/util-linux/pivot_root.c > index ecc891100..41f29da32 100644 > --- a/util-linux/pivot_root.c > +++ b/util-linux/pivot_root.c > @@ -11,6 +11,7 @@ > //config:config PIVOT_ROOT > //config: bool "pivot_root (1.1 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: The pivot_root utility swaps the mount points for the root filesystem > //config: with some other mounted filesystem. This allows you to do all sorts > diff --git a/util-linux/setarch.c b/util-linux/setarch.c > index cf8ef0064..57051a683 100644 > --- a/util-linux/setarch.c > +++ b/util-linux/setarch.c > @@ -9,6 +9,7 @@ > //config:config SETARCH > //config: bool "setarch (3.6 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: The linux32 utility is used to create a 32bit environment for the > //config: specified program (usually a shell). It only makes sense to have > @@ -18,12 +19,14 @@ > //config:config LINUX32 > //config: bool "linux32 (3.3 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Alias to "setarch linux32". > //config: > //config:config LINUX64 > //config: bool "linux64 (3.3 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Alias to "setarch linux64". > > diff --git a/util-linux/setpriv.c b/util-linux/setpriv.c > index 6904cf019..bfe2c7a7a 100644 > --- a/util-linux/setpriv.c > +++ b/util-linux/setpriv.c > @@ -9,6 +9,7 @@ > //config:config SETPRIV > //config: bool "setpriv (6.6 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: select LONG_OPTS > //config: help > //config: Run a program with different Linux privilege settings. > diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c > index e2ff4b5cc..567869cc7 100644 > --- a/util-linux/swaponoff.c > +++ b/util-linux/swaponoff.c > @@ -9,6 +9,7 @@ > //config:config SWAPON > //config: bool "swapon (15 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: Once you have created some swap space using 'mkswap', you also need > //config: to enable your swap space with the 'swapon' utility. The 'swapoff' > @@ -35,6 +36,7 @@ > //config:config SWAPOFF > //config: bool "swapoff (14 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: > //config:config FEATURE_SWAPONOFF_LABEL > //config: bool "Support specifying devices by label or UUID" > diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c > index 901c0b8db..f61002236 100644 > --- a/util-linux/switch_root.c > +++ b/util-linux/switch_root.c > @@ -9,6 +9,7 @@ > //config:config SWITCH_ROOT > //config: bool "switch_root (5.5 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: The switch_root utility is used from initramfs to select a new > //config: root device. Under initramfs, you have to use this instead of > diff --git a/util-linux/uevent.c b/util-linux/uevent.c > index db11746d0..bd39c3acd 100644 > --- a/util-linux/uevent.c > +++ b/util-linux/uevent.c > @@ -6,6 +6,7 @@ > //config:config UEVENT > //config: bool "uevent (3.1 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: help > //config: uevent is a netlink listener for kernel uevent notifications > //config: sent via netlink. It is usually used for dynamic device creation. > diff --git a/util-linux/unshare.c b/util-linux/unshare.c > index 06b938074..156a96d94 100644 > --- a/util-linux/unshare.c > +++ b/util-linux/unshare.c > @@ -9,6 +9,7 @@ > //config:config UNSHARE > //config: bool "unshare (7.2 kb)" > //config: default y > +//config: select PLATFORM_LINUX > //config: depends on !NOMMU > //config: select LONG_OPTS > //config: help > _______________________________________________ > busybox mailing list > busybox at busybox.net > http://lists.busybox.net/mailman/listinfo/busybox From rmy at pobox.com Sun Oct 16 07:36:21 2022 From: rmy at pobox.com (Ron Yorston) Date: Sun, 16 Oct 2022 08:36:21 +0100 Subject: [PATCH] Fix non-Linux builds In-Reply-To: <20221016092627.1197e813@devuan> References: <20221016000459.5itbhtqlkkozgdnp@begin> <20221016092627.1197e813@devuan> Message-ID: <634bb475.h/EXsHSALpsZLVOk%rmy@pobox.com> PLATFORM_LINUX was removed a couple of years ago by commit 5c69ad0ec (build system: drop PLATFORM_LINUX). It had very little effect back then, now it has none. Ron From laalsaas at systemli.org Sun Oct 16 08:33:46 2022 From: laalsaas at systemli.org (laalsaas) Date: Sun, 16 Oct 2022 10:33:46 +0200 Subject: nl applet missing documentation Message-ID: Hey, busybox provides the `nl` applet, for numbering lines. However, the existance of this applet isn't documented at https://www.busybox.net/downloads/BusyBox.html , neither in the manpage. regards, laalsaas From samuel.thibault at ens-lyon.org Sun Oct 16 13:44:23 2022 From: samuel.thibault at ens-lyon.org (Samuel Thibault) Date: Sun, 16 Oct 2022 15:44:23 +0200 Subject: [PATCH] Fix non-Linux builds Message-ID: <20221016134423.jvj3ubhpcgbijkp2@begin> tito, le dim. 16 oct. 2022 09:26:27 +0200, a ecrit: > On Sun, 16 Oct 2022 02:04:59 +0200 > Samuel Thibault wrote: > > > Various tools are Linuxish and should thus only attempted to build on > > Linux only. Some features are also Linux-only. > > Hi, > just out of curiosity why can this not be fixed by simply > creating a config file that disables the applets that are not relevant > for your platform? Because it'd mean making *each and every* downstream (the various BSD distributions, the couple Hurd distributions, BeOS, etc. etc.) have to determine that list, while it could just be shared upstream, as all software usually just do. > I think this would reduce the size of the patch to the > #ifdef O_DIRECT part which could be moved for example > to include/platform.h. Why moving it to platform.h? #ifdef O_DIRECT already means what it means. Ron Yorston, le dim. 16 oct. 2022 08:36:21 +0100, a ecrit: > PLATFORM_LINUX was removed a couple of years ago by commit 5c69ad0ec > (build system: drop PLATFORM_LINUX). > > It had very little effect back then, now it has none. Ah, so how would it have to be done nowadays? Samuel From rmy at pobox.com Sun Oct 16 13:57:41 2022 From: rmy at pobox.com (Ron Yorston) Date: Sun, 16 Oct 2022 14:57:41 +0100 Subject: [PATCH] Fix non-Linux builds In-Reply-To: <20221016132525.hh6xi6eqlqzcrcpj@begin> References: <20221016132525.hh6xi6eqlqzcrcpj@begin> Message-ID: <634c0dd5.1iKo9XxWFTW6+LBV%rmy@pobox.com> Samuel Thibault wrote: >Ron Yorston, le dim. 16 oct. 2022 08:36:21 +0100, a ecrit: >> PLATFORM_LINUX was removed a couple of years ago by commit 5c69ad0ec >> (build system: drop PLATFORM_LINUX). >> >> It had very little effect back then, now it has none. > >Ah, so how would it have to be done nowadays? I suppose it would mean going back to the situation prior to these commits: 4d06b3145 build system: no longer prompt for PLATFORM_LINUX option e3b1a1fd2 Replace "depends on PLATFORM_LINUX" with "select PLATFORM_LINUX" where PLATFORM_LINUX was a user-selectable option and applets that were deemed Linux specific depended on it. Ron From rmy at pobox.com Sun Oct 16 14:17:37 2022 From: rmy at pobox.com (Ron Yorston) Date: Sun, 16 Oct 2022 15:17:37 +0100 Subject: [PATCH] Fix non-Linux builds In-Reply-To: <634c0dd5.1iKo9XxWFTW6+LBV%rmy@pobox.com> References: <20221016132525.hh6xi6eqlqzcrcpj@begin> <634c0dd5.1iKo9XxWFTW6+LBV%rmy@pobox.com> Message-ID: <634c1281.oDqo30jA4tYEoIV/%rmy@pobox.com> Maling list thread prior to commit e3b1a1fd2: http://lists.busybox.net/pipermail/busybox/2011-February/074954.html Ron From farmatito at tiscali.it Sun Oct 16 14:33:17 2022 From: farmatito at tiscali.it (tito) Date: Sun, 16 Oct 2022 16:33:17 +0200 Subject: [PATCH] Fix non-Linux builds In-Reply-To: <20221016134423.jvj3ubhpcgbijkp2@begin> References: <20221016134423.jvj3ubhpcgbijkp2@begin> Message-ID: <20221016163317.4c5af5a3@devuan> On Sun, 16 Oct 2022 15:44:23 +0200 Samuel Thibault wrote: > tito, le dim. 16 oct. 2022 09:26:27 +0200, a ecrit: > > On Sun, 16 Oct 2022 02:04:59 +0200 > > Samuel Thibault wrote: > > > > > Various tools are Linuxish and should thus only attempted to build on > > > Linux only. Some features are also Linux-only. > > > > Hi, > > just out of curiosity why can this not be fixed by simply > > creating a config file that disables the applets that are not relevant > > for your platform? > > Because it'd mean making *each and every* downstream (the various BSD > distributions, the couple Hurd distributions, BeOS, etc. etc.) have to > determine that list, while it could just be shared upstream, as all > software usually just do. Hi, they still need to got through the config file creation at least once to enable what is needed for their specific use so it seems not to make that big difference. > > I think this would reduce the size of the patch to the > > #ifdef O_DIRECT part which could be moved for example > > to include/platform.h. > > Why moving it to platform.h? #ifdef O_DIRECT already means what it > means. Couldn't it be achieved by disabling ENABLE_FEATURE_DD_IBS_OBS in config avoiding an ifdef hell? Ciao, Tito > Ron Yorston, le dim. 16 oct. 2022 08:36:21 +0100, a ecrit: > > PLATFORM_LINUX was removed a couple of years ago by commit 5c69ad0ec > > (build system: drop PLATFORM_LINUX). > > > > It had very little effect back then, now it has none. > > Ah, so how would it have to be done nowadays? > > Samuel > _______________________________________________ > busybox mailing list > busybox at busybox.net > http://lists.busybox.net/mailman/listinfo/busybox From rob at landley.net Tue Oct 18 10:45:02 2022 From: rob at landley.net (Rob Landley) Date: Tue, 18 Oct 2022 05:45:02 -0500 Subject: Why is busybox grep matching ^SOL after NUL? Message-ID: <78c02c2f-7b90-0385-6f2e-dda92a05c3f1@landley.net> $ echo -e 'one\0two' | busybox grep -l ^t (standard input) I note that the gnu/dammit grep in my devuan system (from 2018) also gets this wrong without -a, but gets it right with -a? $ echo -e 'one\0two' | grep -l ^t (standard input) $ echo -e 'one\0two' | grep -al ^t $ Which is just extremely gnu. The gnu/dammit sed gets it right: $ echo -e 'one\0two' | sed 's/^t/x/' | hd 00000000 6f 6e 65 00 74 77 6f 0a |one.two.| 00000008 $ echo -e 'one\0two' | sed 's/t/x/' | hd 00000000 6f 6e 65 00 78 77 6f 0a |one.xwo.| 00000008 Rob From rep.dot.nop at gmail.com Tue Oct 18 12:28:07 2022 From: rep.dot.nop at gmail.com (Bernhard Reutner-Fischer) Date: Tue, 18 Oct 2022 14:28:07 +0200 Subject: Why is busybox grep matching ^SOL after NUL? In-Reply-To: <78c02c2f-7b90-0385-6f2e-dda92a05c3f1@landley.net> References: <78c02c2f-7b90-0385-6f2e-dda92a05c3f1@landley.net> Message-ID: <20221018142807.5fed29d6@nbbrfq> On Tue, 18 Oct 2022 05:45:02 -0500 Rob Landley wrote: > $ echo -e 'one\0two' | busybox grep -l ^t > (standard input) /* BB_AUDIT GNU defects - always acts as -a. */ $ man grep | grep -A5 "^\s*-z," -z, --null-data Treat input and output data as sequences of lines, each terminated by a zero byte (the ASCII NUL character) instead of a newline. Like the -Z or --null option, this option can be used with commands like sort -z to process arbitrary file names. $ echo -e "one\0two" | ./busybox grep -l ^t $ echo -e "one\0two" | ./busybox grep -la ^t $ echo -e "one\0two" | ./busybox grep -laz ^t (standard input) $ grep --version | head -n1 grep (GNU grep) 3.8 $ echo -e "one\0two" | grep -l ^t (standard input) $ echo -e "one\0two" | grep -la ^t $ echo -e "one\0two" | grep -laz ^t (standard input) So... why does grep -l match while busybox grep -l does not? It seems that GNU/the-fabulous grep defaults to --binary-files=binary: $ echo -e "one\0two" | grep -l --binary-files=text ^t $ echo -e "one\0two" | grep -l --binary-files=binary ^t (standard input) which is what we see above, i think. From the GNU/the-very-best grep: --binary-files=TYPE If a file's data or metadata indicate that the file contains binary data, assume that the file is of type TYPE. Non-text bytes indicate binary data; these are either output bytes that are improperly encoded for the current locale, or null input bytes when the -z option is not given. By default, TYPE is binary, and grep suppresses output after null input binary data is discovered, and suppresses output lines that contain improperly encoded data. When some output is suppressed, grep follows any output with a message to standard error saying that a binary file matches. If TYPE is without-match, when grep discovers null input binary data it assumes that the rest of the file does not match; this is equivalent to the -I option. If TYPE is text, grep processes a binary file as if it were text; this is equivalent to the -a option. When type is binary, grep may treat non-text bytes as line terminators even without the -z option. This means choosing binary versus text can affect whether a pattern matches a file. For example, when type is binary the pattern q$ might match q immediately followed by a null byte, even though this is not matched when type is text. Conversely, when type is binary the pattern . (period) might not match a null byte. Warning: The -a option might output binary garbage, which can have nasty side effects if the output is a terminal and if the terminal driver interprets some of it as commands. On the other hand, when reading files whose text encodings are unknown, it can be helpful to use -a or to set LC_ALL='C' in the environment, in order to find more matches even if the matches are unsafe for direct display. thanks, > > I note that the gnu/dammit grep in my devuan system (from 2018) also gets this > wrong without -a, but gets it right with -a? > > $ echo -e 'one\0two' | grep -l ^t > (standard input) > $ echo -e 'one\0two' | grep -al ^t > $ > > Which is just extremely gnu. The gnu/dammit sed gets it right: > > $ echo -e 'one\0two' | sed 's/^t/x/' | hd > 00000000 6f 6e 65 00 74 77 6f 0a |one.two.| > 00000008 > $ echo -e 'one\0two' | sed 's/t/x/' | hd > 00000000 6f 6e 65 00 78 77 6f 0a |one.xwo.| > 00000008 > > Rob > _______________________________________________ > busybox mailing list > busybox at busybox.net > http://lists.busybox.net/mailman/listinfo/busybox From rob at landley.net Wed Oct 19 10:44:37 2022 From: rob at landley.net (Rob Landley) Date: Wed, 19 Oct 2022 05:44:37 -0500 Subject: Why is busybox grep matching ^SOL after NUL? In-Reply-To: <20221018142807.5fed29d6@nbbrfq> References: <78c02c2f-7b90-0385-6f2e-dda92a05c3f1@landley.net> <20221018142807.5fed29d6@nbbrfq> Message-ID: On 10/18/22 07:28, Bernhard Reutner-Fischer wrote: > On Tue, 18 Oct 2022 05:45:02 -0500 > Rob Landley wrote: > >> $ echo -e 'one\0two' | busybox grep -l ^t >> (standard input) > > /* BB_AUDIT GNU defects - always acts as -a. */ > > $ man grep | grep -A5 "^\s*-z," > -z, --null-data > Treat input and output data as sequences of lines, each > terminated by a zero byte (the ASCII NUL character) instead of a > newline. Like the -Z or --null option, this option can be used > with commands like sort -z to process arbitrary file names. > > $ echo -e "one\0two" | ./busybox grep -l ^t > $ echo -e "one\0two" | ./busybox grep -la ^t > $ Huh. I just did a fresh git pull (commit 707a7ef4c72d, git diff is clean) and "make clean defconfig busybox -j 3" with host toolchain (devuan beowatch, ala glibc 2.28-10+deb10u1) and got different results: $ echo -e 'one\0two' | ./busybox grep ^t two $ echo -e 'one\0two' | ./busybox grep -a ^t two $ echo -e 'one\0two' | ./busybox grep -l ^t (standard input) $ echo -e 'one\0two' | ./busybox grep -la ^t (standard input) But if you're saying that's not what it does for you... > So... why does grep -l match while busybox grep -l does not? > It seems that GNU/the-fabulous grep defaults to --binary-files=binary: ... > When type is binary, grep may treat non-text bytes as line > terminators even without the -z option. This means choosing > binary versus text can affect whether a pattern matches a file. > For example, when type is binary the pattern q$ might match q > immediately followed by a null byte, even though this is not > matched when type is text. Conversely, when type is binary the > pattern . (period) might not match a null byte. So gnu special cases "-" and _also_ special cases binary files, and then the man page has "may treat" and "might not" because even they aren't sure. (Library version skew? Locale nonsense? Who knows...) Rob From nixiaoming at huawei.com Fri Oct 21 07:10:40 2022 From: nixiaoming at huawei.com (Xiaoming Ni) Date: Fri, 21 Oct 2022 15:10:40 +0800 Subject: [PATCH] loop: fix a race when a free loop device is snatched Message-ID: <20221021071040.41035-1-nixiaoming@huawei.com> When /dev/loop-control exists and *device is empty, the mounting fails due to concurrent contention. Code Execution Flow: try = xasprintf(LOOP_FORMAT, i); for (i = 0; i <= 0xfffff; i++) { // The value of "try" is not changed. ... lfd = rc = open(try, mode); ... rc = repeat_on_eagain(ioctl(lfd, BB_LOOP_GET_STATUS, &loopinfo)); // Because of race, the value of "rc" is 0. and the value of "try" is not changed ... close(lfd); } add/remove: 0/0 grow/shrink: 1/0 up/down: 5/0 (5) Function old new delta set_loop 773 778 +5 Fixes: 4bc59a4cf ("mount: fix a race when a free loop device is snatched under us by another mount") Fiexe: 3b69ba799 ("mount,losetup: use /dev/loop-control is it exists") Signed-off-by: Xiaoming Ni --- libbb/loop.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libbb/loop.c b/libbb/loop.c index cb8fa2442..845565d7b 100644 --- a/libbb/loop.c +++ b/libbb/loop.c @@ -218,8 +218,13 @@ int FAST_FUNC set_loop(char **device, const char *file, unsigned long long offse } /* failure, undo LOOP_SET_FD */ ioctl(lfd, LOOP_CLR_FD, 0); // actually, 0 param is unnecessary + } else { + if (rc == 0 && *device == NULL && try != dev) { + free(try); + close(lfd); + goto get_free_loopN; + } } - /* else: device is not free (rc == 0) or error other than ENXIO */ close_and_try_next_loopN: close(lfd); try_next_loopN: -- 2.27.0 From samuel.thibault at ens-lyon.org Sun Oct 23 17:38:38 2022 From: samuel.thibault at ens-lyon.org (Samuel Thibault) Date: Sun, 23 Oct 2022 19:38:38 +0200 Subject: [PATCH] Fix non-Linux builds In-Reply-To: <20221016163317.4c5af5a3@devuan> <634c1281.oDqo30jA4tYEoIV/%rmy@pobox.com> <634c0dd5.1iKo9XxWFTW6+LBV%rmy@pobox.com> Message-ID: <20221023173838.ugesrtqtpupzi76l@begin> Hello, Ron Yorston, le dim. 16 oct. 2022 15:17:37 +0100, a ecrit: > Maling list thread prior to commit e3b1a1fd2: > > http://lists.busybox.net/pipermail/busybox/2011-February/074954.html Thanks for pointing it out, that helps understanding the background. Ron Yorston, le dim. 16 oct. 2022 14:57:41 +0100, a ecrit: > Samuel Thibault wrote: > >Ron Yorston, le dim. 16 oct. 2022 08:36:21 +0100, a ecrit: > >> PLATFORM_LINUX was removed a couple of years ago by commit 5c69ad0ec > >> (build system: drop PLATFORM_LINUX). > >> > >> It had very little effect back then, now it has none. > > > >Ah, so how would it have to be done nowadays? > > I suppose it would mean going back to the situation prior to these > commits: > > 4d06b3145 build system: no longer prompt for PLATFORM_LINUX option > e3b1a1fd2 Replace "depends on PLATFORM_LINUX" with "select PLATFORM_LINUX" > > where PLATFORM_LINUX was a user-selectable option and applets that were > deemed Linux specific depended on it. AIUI, we don't want that as it was, because allnoconfig shouldn't prevent from seeing applets which are available on Linux only. Now, can't we make PLATFORM_LINUX something that is automatically enabled, so that it cannot be disabled with allnoconfig? Then we can restore the dependency. tito, le dim. 16 oct. 2022 16:33:17 +0200, a ecrit: > On Sun, 16 Oct 2022 15:44:23 +0200 > Samuel Thibault wrote: > > > tito, le dim. 16 oct. 2022 09:26:27 +0200, a ecrit: > > > On Sun, 16 Oct 2022 02:04:59 +0200 > > > Samuel Thibault wrote: > > > > > > > Various tools are Linuxish and should thus only attempted to build on > > > > Linux only. Some features are also Linux-only. > > > > > > just out of curiosity why can this not be fixed by simply > > > creating a config file that disables the applets that are not relevant > > > for your platform? > > > > Because it'd mean making *each and every* downstream (the various BSD > > distributions, the couple Hurd distributions, BeOS, etc. etc.) have to > > determine that list, while it could just be shared upstream, as all > > software usually just do. > > they still need to got through the config file creation > at least once to enable what is needed for their specific use > so it seems not to make that big difference. It makes the difference that they get a filtered-out list as a start. > > > I think this would reduce the size of the patch to the > > > #ifdef O_DIRECT part which could be moved for example > > > to include/platform.h. > > > > Why moving it to platform.h? #ifdef O_DIRECT already means what it > > means. > > Couldn't it be achieved by disabling ENABLE_FEATURE_DD_IBS_OBS in config > avoiding an ifdef hell? No, ibs, obs etc. options are available and useful in general, only the direct flags are linux-specific. Samuel From samuel.thibault at ens-lyon.org Sun Oct 23 17:41:23 2022 From: samuel.thibault at ens-lyon.org (Samuel Thibault) Date: Sun, 23 Oct 2022 19:41:23 +0200 Subject: [PATCH] Fix non-Linux builds In-Reply-To: <20221023173838.ugesrtqtpupzi76l@begin> References: <20221016163317.4c5af5a3@devuan> <634c1281.oDqo30jA4tYEoIV/%rmy@pobox.com> <634c0dd5.1iKo9XxWFTW6+LBV%rmy@pobox.com> <20221023173838.ugesrtqtpupzi76l@begin> Message-ID: <20221023174123.6nl3k5pw6vv33tdv@begin> Samuel Thibault, le dim. 23 oct. 2022 19:38:38 +0200, a ecrit: > Ron Yorston, le dim. 16 oct. 2022 14:57:41 +0100, a ecrit: > > Samuel Thibault wrote: > > >Ron Yorston, le dim. 16 oct. 2022 08:36:21 +0100, a ecrit: > > >> PLATFORM_LINUX was removed a couple of years ago by commit 5c69ad0ec > > >> (build system: drop PLATFORM_LINUX). > > >> > > >> It had very little effect back then, now it has none. > > > > > >Ah, so how would it have to be done nowadays? > > > > I suppose it would mean going back to the situation prior to these > > commits: > > > > 4d06b3145 build system: no longer prompt for PLATFORM_LINUX option > > e3b1a1fd2 Replace "depends on PLATFORM_LINUX" with "select PLATFORM_LINUX" > > > > where PLATFORM_LINUX was a user-selectable option and applets that were > > deemed Linux specific depended on it. > > AIUI, we don't want that as it was, because allnoconfig shouldn't > prevent from seeing applets which are available on Linux only. > > Now, can't we make PLATFORM_LINUX something that is automatically > enabled, so that it cannot be disabled with allnoconfig? Then we can > restore the dependency. (In Linux Kconfig terms: making it a def_bool set to y on Linux and n on non-Linux) Samuel From peter.kaestle at nokia.com Tue Oct 25 11:56:48 2022 From: peter.kaestle at nokia.com (Peter Kaestle) Date: Tue, 25 Oct 2022 13:56:48 +0200 Subject: [PATCH] unzip -l: add missed big-endian conversions date and time Message-ID: <1666699008-29866-1-git-send-email-peter.kaestle@nokia.com> When calling unzip -l the date and time output was missing big-endian conversions. Signed-off-by: Peter K?stle --- archival/unzip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/archival/unzip.c b/archival/unzip.c index fc92ac661..b27dd2187 100644 --- a/archival/unzip.c +++ b/archival/unzip.c @@ -118,6 +118,8 @@ typedef union { #define FIX_ENDIANNESS_ZIP(zip) \ do { if (BB_BIG_ENDIAN) { \ (zip).fmt.method = SWAP_LE16((zip).fmt.method ); \ + (zip).fmt.modtime = SWAP_LE16((zip).fmt.modtime ); \ + (zip).fmt.moddate = SWAP_LE16((zip).fmt.moddate ); \ (zip).fmt.crc32 = SWAP_LE32((zip).fmt.crc32 ); \ (zip).fmt.cmpsize = SWAP_LE32((zip).fmt.cmpsize ); \ (zip).fmt.ucmpsize = SWAP_LE32((zip).fmt.ucmpsize ); \ -- 2.38.0 From sfammonius at gmail.com Tue Oct 25 20:55:44 2022 From: sfammonius at gmail.com (samuel ammonius) Date: Tue, 25 Oct 2022 18:25:44 -0230 Subject: busybox init returns fails with error code -1 (0x00007f00) Message-ID: Hello, I have a simple ISO filesystem set up with busybox and grub.These are the commands I use in GRUB2 to start the system: grub> set root=(cd) grub> linux /boot/bzImage root=/dev/sda1 grub> initrd /boot/initrd grub> boot I don't know how to get the full kernel error log, but the final error is "kernel panic: attempted to kill init! error code: 0x00007f00". I tried building a static "Hello, world!" program as the FAQ said, and it worked. What could be causing the error? (Also, Google supports filtering the results using "site:busybox.net ". You could just link to Google search instead of paying for cse.google.com in this search bar ) Many thanks, Sam -------------- next part -------------- An HTML attachment was scrubbed... URL: From yetanothergeek at gmail.com Wed Oct 26 01:02:47 2022 From: yetanothergeek at gmail.com (Jeff Pohlmeyer) Date: Tue, 25 Oct 2022 20:02:47 -0500 Subject: busybox init returns fails with error code -1 (0x00007f00) In-Reply-To: References: Message-ID: On Tue, Oct 25, 2022 at 3:57 PM samuel ammonius wrote: > > I have a simple ISO filesystem set up with busybox and grub. > These are the commands I use in GRUB2 to start the system: > > grub> set root=(cd) > grub> linux /boot/bzImage root=/dev/sda1 > grub> initrd /boot/initrd > grub> boot > If you are booting from an ISO filesystem, chances are your root= is probably not /dev/sda1. Also, you don't mention how you generated the initrd. > the final error is "kernel panic: attempted to kill init! error code: 0x00007f00". > I tried building a static "Hello, world!" program as the FAQ said, and it worked. > What could be causing the error? You could try appending init=/bin/sh to the kernel command line and see if you can at least get a shell prompt. From mconrad at intellitree.com Wed Oct 26 02:19:45 2022 From: mconrad at intellitree.com (Michael Conrad) Date: Wed, 26 Oct 2022 02:19:45 +0000 (UTC) Subject: busybox init returns fails with error code -1 (0x00007f00) In-Reply-To: References: Message-ID: <4ec75ffb-22d7-e63c-d3a9-ae0ebeb2f34f@intellitree.com> On 10/25/22 16:55, samuel ammonius wrote: > Hello, > > I have a simple ISO filesystem set up with busybox and grub.These are > the commands I use in GRUB2 to start the system: > > grub> set root=(cd) > grub> linux /boot/bzImage root=/dev/sda1 > grub> initrd /boot/initrd > grub> boot > > > I don't know how to get the full kernel error log, but the final error > is "kernel panic: attempted to kill init! error code: 0x00007f00". I > tried building a static "Hello, world!" program as the FAQ said, and > it worked. What could be causing the error? You didn't provide any details about what is inside the initrd or the filesystem, where they came from, or what process you used to create them, so the problem could be just about anything.? There isn't even enough here to know whether it was busybox's init that died or the script inside the initrd.? Is busybox inside the initrd? or on /dev/sda1? or both? Chances are, you should probably ask on the forum/list related to the instructions you are following, such as buildroot. If you can narrow it down to knowing for sure that busybox's init got called, and that calling other busybox applets (like '/bin/date', assuming that is one of your applets) succeeds, and give us any lines of error message that these generated before the kernel panic, and show us the /etc/inittab, then we can help a lot more accurately. -Mike From vijaypas at gmail.com Wed Oct 26 02:30:07 2022 From: vijaypas at gmail.com (Vijay Pasapuleti) Date: Tue, 25 Oct 2022 21:30:07 -0500 Subject: udhcpc renewal time Message-ID: I have a situation where the lease time is 604800 seconds. Lease renewal seems to occurring 5 seconds after expiration than the usual 50% lease time period. Any help would be appreciated. Using busybox v1.20.2. Thanks! Vpas -------------- next part -------------- An HTML attachment was scrubbed... URL: From rep.dot.nop at gmail.com Wed Oct 26 15:51:47 2022 From: rep.dot.nop at gmail.com (Bernhard Reutner-Fischer) Date: Wed, 26 Oct 2022 17:51:47 +0200 Subject: busybox init returns fails with error code -1 (0x00007f00) In-Reply-To: References: Message-ID: <1069A8CB-04D5-48AF-B1DA-E331560C7214@gmail.com> On 25 October 2022 22:55:44 CEST, samuel ammonius wrote: >(Also, Google supports filtering the results using "site:busybox.net >". You could just link to Google search instead of paying for >cse.google.com in this search bar ) That is using an API key i generated years and years ago for BusyBox (and documented in the infrastructure itself). I never paid a nickel and expect to never have to either. I do think that they still know who the good guys are and who pushed them in the early days. We'd use a different indexer in no time iff this ever would be an "issue" for sure. But thanks for the thoughtful observation never the less! cheers! From rep.dot.nop at gmail.com Wed Oct 26 19:49:53 2022 From: rep.dot.nop at gmail.com (Bernhard Reutner-Fischer) Date: Wed, 26 Oct 2022 21:49:53 +0200 Subject: busybox init returns fails with error code -1 (0x00007f00) In-Reply-To: References: Message-ID: <58767BF9-4998-4E2D-B6D4-E006AEDBF117@gmail.com> On 26 October 2022 03:02:47 CEST, Jeff Pohlmeyer wrote: >On Tue, Oct 25, 2022 at 3:57 PM samuel ammonius wrote: >> >> I have a simple ISO filesystem set up with busybox and grub. >> These are the commands I use in GRUB2 to start the system: >> >> grub> set root=(cd) >> grub> linux /boot/bzImage root=/dev/sda1 >> grub> initrd /boot/initrd >> grub> boot >> > >If you are booting from an ISO filesystem, chances are your root= is >probably not /dev/sda1. Also, you don't mention how you generated the >initrd. > >> the final error is "kernel panic: attempted to kill init! error code: 0x00007f00". >> I tried building a static "Hello, world!" program as the FAQ said, and it worked. >> What could be causing the error? > >You could try appending init=/bin/sh to the kernel command line and >see if you can at least get a shell prompt. And make sure that your image contains all required libs. Check ldd of the BusyBox binary. Or check readelf. You should be able to chroot to the loop mounted initramfs ( or whatever your image is, loop mounted iso) and check that libs are present, i.e. if your dynamically linked BusyBox fully resolves, and that the individual steps of your inittab work as written. Using an emulator like qemu -cdrom ../my.iso -m 512m or the qemu-system-i386 variant that you target is of great use, also to capture output otherwise hard to capture if you don't have a serial line at hand, or some modern equivalent. That should help pinpoint eventual problems. Bonus points if you provide a recording of what you did, what went wrong and how you solved it for folks to learn from, of course |-) HTH and cheers, From rep.dot.nop at gmail.com Wed Oct 26 20:07:55 2022 From: rep.dot.nop at gmail.com (Bernhard Reutner-Fischer) Date: Wed, 26 Oct 2022 22:07:55 +0200 Subject: busybox init returns fails with error code -1 (0x00007f00) In-Reply-To: <58767BF9-4998-4E2D-B6D4-E006AEDBF117@gmail.com> References: <58767BF9-4998-4E2D-B6D4-E006AEDBF117@gmail.com> Message-ID: > written. Using an emulator like qemu > -cdrom ../my.iso -m 512m or the > qemu-system-i386 variant that you target And yes, that's a bit exaggerated. In former times you could have plenty space left on a box with 2MB RAM even when running Linux. But, alas, nowadays the kernel alone occupies some 3 or 6 MB on its own. Add a few 100k for BusyBox, libc, and you're at a minimum of about 4 million or even more bytes of RAM to run on top of Linux. Sucks? Tell the kernel guys! From steffen at sdaoden.eu Wed Oct 26 20:43:40 2022 From: steffen at sdaoden.eu (Steffen Nurpmeso) Date: Wed, 26 Oct 2022 22:43:40 +0200 Subject: busybox init returns fails with error code -1 (0x00007f00) In-Reply-To: References: <58767BF9-4998-4E2D-B6D4-E006AEDBF117@gmail.com> Message-ID: <20221026204340.2KCRK%steffen@sdaoden.eu> Bernhard Reutner-Fischer wrote in : |> written. Using an emulator like qemu |> -cdrom ../my.iso -m 512m or the |> qemu-system-i386 variant that you target | |And yes, that's a bit exaggerated. |In former times you could have plenty space left on a box with 2MB \ |RAM even when running Linux. |But, alas, nowadays the kernel alone occupies some 3 or 6 MB on its own. |Add a few 100k for BusyBox, libc, and you're at a minimum of about \ |4 million or even more bytes of RAM to run on top of Linux. I have scripts which auto-generate an initrd of a static kernel that can boot two distinct Lenovo Notebooks, with an almost fully populated busybox and cryptsetup. echo '. Creating initrd' boot/$BB mount -o remount,exec run ( set -e boot/$BB mkdir run/x cd run/x ( xsetup2 "../../boot/$BB" "../../boot/$CS" ) e=$? [ $e -ne 0 ] && exit $e ./$BB mknod dev/console c 5 1 # redundant echo "#!/$BB sh" > ./init ./$BB cat "$conf" >> ./init echo "PART_ROOT='$PART_ROOT'" >> ./init echo "ROOT_DECRYPT='$ROOT_DECRYPT'" >> ./init echo "ROOT_PASS='$ROOT_PASS'" >> ./init echo '. /linux-init-s2.sh' >> ./init ./$BB chmod 0755 ./init { # Microcode update must be uncompressed and first [ -f ../../boot/early-ucode.cpio ] && ./$BB cat ../../boot/early-ucode.cpio # Followed by (possibly compressed) normal initrd ./$BB find . | ./$BB cpio -H newc -o | ./$BB gzip -9 -n What was a bit hard to realize was that the microcode update .cpio for the processor must be uncompressed and first in the initrd, maybe that. } > ../.initrd ) || x 'Failed to create run/.initrd' Despire early-ucode.cpio there is init linux-init-s1.sh sys run proc mnt dev dev/console bin bin/sh etc etc/mdev.sh etc/mdev.conf linux-init-lib.sh linux-init-s2.sh cryptsetup.static busybox.static boot/$BB mount -o remount,noexec run if [ -n "$INITRD_PATH" ]; then echo '. Saving initrd to '"$INITRD_PATH$PART_SUFFIX" boot/$BB cp run/.initrd "$INITRD_PATH$PART_SUFFIX" boot/$BB chmod 0600 "$INITRD_PATH$PART_SUFFIX" fi 9592411 Oct 24 17:34 .kent.initrd.0 (Static kernel on EFI with EFI_STUB and busybox and cryptsetup on EFI asks for unencryption key, then reaches out via config file for /boot/ kernel and one more config file, then creates the initrd with embedded decryption key, as necessary, then uses kexec to boot the kernel in that /boot/, which then mounts the EFI to byte-compare kernel, busybox, cryptsetup (plus X) against their counterparts in /boot/, and echoes differences to /etc/motd. My kind of secure boot.) |Sucks? Tell the kernel guys! (Well it is a bit strange, and surely very unprofessional. But works without systemd!!!) --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From tdtemccnp at gmail.com Thu Oct 27 13:02:21 2022 From: tdtemccnp at gmail.com (Turritopsis Dohrnii Teo En Ming) Date: Thu, 27 Oct 2022 21:02:21 +0800 Subject: SSH Weak Key Exchange Algorithms Enabled on UniFi Wireless Access Points Message-ID: Subject: SSH Weak Key Exchange Algorithms Enabled on UniFi Wireless Access Points Good day from Singapore, I have discovered that UniFi Wireless Access Points are powered by Busybox. Vulnerability scanning of my client's corporate network shows SSH weak key exchange algorithms enabled on UniFi wireless access points. Article: SSH WEAK KEY EXCHANGE ALGORITHMS ENABLED Link: https://www.virtuesecurity.com/kb/ssh-weak-key-exchange-algorithms-enabled/ According to the above article, we must make changes to /etc/sshd/sshd_config, especially the KexAlgorithms directive. However, when I putty/SSH into Busybox, I cannot find the file /etc/sshd/sshd_config. What SSH server is running inside Busybox? How can I make changes to the SSH server within Busybox so that I can disable the SSH weak key exchange algorithms? Please advise. Thank you. By the way, I also noticed that Hikvision Face Recognition Terminal Door Access Systems are also powered by Busybox. I am doing this for an investment company at Keppel Road, Singapore. Regards, Mr. Turritopsis Dohrnii Teo En Ming Targeted Individual in Singapore Blogs: https://tdtemcerts.blogspot.com https://tdtemcerts.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From tdtemccnp at gmail.com Thu Oct 27 13:17:40 2022 From: tdtemccnp at gmail.com (Turritopsis Dohrnii Teo En Ming) Date: Thu, 27 Oct 2022 21:17:40 +0800 Subject: SSH Weak Key Exchange Algorithms Enabled on UniFi Wireless Access Points In-Reply-To: <5uaa8ecqc4tecqq75j4b8uk4.1666876441348@lysator.liu.se> References: <5uaa8ecqc4tecqq75j4b8uk4.1666876441348@lysator.liu.se> Message-ID: On Thu, 27 Oct 2022 at 21:14, Markus Gothe wrote: > Hi, you are unfortunately reaching out to the wrong people. BusyBox does > NOT provide a ssh server. > > Please contact the manufacturer of the product. > > //Markus > > Sent via BlackBerry Hub+ Inbox for Android > > Noted with thanks. I will contact Ubiquiti. > *From:* tdtemccnp at gmail.com > *Sent:* 27 October 2022 15:02 > *To:* busybox at busybox.net > *Cc:* ceo at teo-en-ming-corp.com > *Subject:* SSH Weak Key Exchange Algorithms Enabled on UniFi Wireless > Access Points > > Subject: SSH Weak Key Exchange Algorithms Enabled on UniFi Wireless Access > Points > > Good day from Singapore, > > I have discovered that UniFi Wireless Access Points are powered by Busybox. > > Vulnerability scanning of my client's corporate network shows SSH weak key > exchange algorithms enabled on UniFi wireless access points. > > Article: SSH WEAK KEY EXCHANGE ALGORITHMS ENABLED > Link: > https://www.virtuesecurity.com/kb/ssh-weak-key-exchange-algorithms-enabled/ > > According to the above article, we must make changes to > /etc/sshd/sshd_config, especially the KexAlgorithms directive. > > However, when I putty/SSH into Busybox, I cannot find the file > /etc/sshd/sshd_config. What SSH server is running inside Busybox? > > How can I make changes to the SSH server within Busybox so that I can > disable the SSH weak key exchange algorithms? > > Please advise. > > Thank you. > > By the way, I also noticed that Hikvision Face Recognition Terminal Door > Access Systems are also powered by Busybox. > > I am doing this for an investment company at Keppel Road, Singapore. > > Regards, > > Mr. Turritopsis Dohrnii Teo En Ming > Targeted Individual in Singapore > Blogs: > https://tdtemcerts.blogspot.com > https://tdtemcerts.wordpress.com > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nietzsche at lysator.liu.se Thu Oct 27 13:14:01 2022 From: nietzsche at lysator.liu.se (Markus Gothe) Date: Thu, 27 Oct 2022 15:14:01 +0200 Subject: SSH Weak Key Exchange Algorithms Enabled on UniFi Wireless Access Points In-Reply-To: Message-ID: <5uaa8ecqc4tecqq75j4b8uk4.1666876441348@lysator.liu.se> An HTML attachment was scrubbed... URL: From bevenson at melinkcorp.com Thu Oct 27 14:52:21 2022 From: bevenson at melinkcorp.com (Bryan Evenson) Date: Thu, 27 Oct 2022 14:52:21 +0000 Subject: Attempting DHCPv6 with external DHCP client Message-ID: All, I'm trying to get IPv6 support on my ARM-based Linux box and I'm running into issues with DHCPv6. I can't get an IPv6 address with DHCPv6. I'm not sure at what point the problem is occurring, so I'm starting out confirming that I have everything configured correctly for Busybox before going to the next step. Setup: ARM-based controller running Linux kernel 5.4.81 Busybox 1.31.1 with the following related networking configuration settings (let me know if there are more settings that you would like to know about): CONFIG_FEATURE_IPV6 CONFIG_IFUP CONFIG_IFDOWN CONFIG_FEATURE_IFUPDOWN_IPV4 CONFIG_FEATURE_IFUPDOWN_IPV6 CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP CONFIG_IP CONFIG_FEATURE_IP_ADDRESS CONFIG_FEATURE_IP_LINK CONFIG_FEATURE_IP_ROUTE CONFIG_PING CONFIG_PING6 I am using ifplugd for link detection and I am using dhcpcd for an external DHCP client. On the other end, I have an Ubuntu 18.04 server setup with isc-dhcp-server. I have one instance setup as a DHCPv4 server and separate instance setup as a DHCPv6 server. I've confirmed with a Windows 10 laptop that the isc-dhcp-server can issue IPv4 addresses and global IPv6 addresses. At the moment I have nothing specified in /etc/network/interfaces for IPv6. I tried adding the line: iface eth0 inet6 dhcp But then I found out that ifup in Busybox does not support the dhcp option. However, I am still seeing that dhcpcd is attempting to get an IPv6 address. Do I need to add anything to /etc/network/interfaces to support DHCPv6? When I restart networking, I see the following line: eth0: soliciting an IPv6 router but I see no other messages about IPv6 and my system does not get a global IPv6 address. I did confirm that log message comes from dhcpcd, so it has started and is attempting to get an IPv6 address. Is there anything else that needs to be modified from ifplugd or ifup so dhcpcd gets called with the correct options? Thanks, Bryan From ada at thorsis.com Fri Oct 28 05:49:50 2022 From: ada at thorsis.com (Alexander Dahl) Date: Fri, 28 Oct 2022 07:49:50 +0200 Subject: SSH Weak Key Exchange Algorithms Enabled on UniFi Wireless Access Points In-Reply-To: References: <5uaa8ecqc4tecqq75j4b8uk4.1666876441348@lysator.liu.se> Message-ID: Hei hei, Am Thu, Oct 27, 2022 at 09:17:40PM +0800 schrieb Turritopsis Dohrnii Teo En Ming: > On Thu, 27 Oct 2022 at 21:14, Markus Gothe wrote: > > > Hi, you are unfortunately reaching out to the wrong people. BusyBox does > > NOT provide a ssh server. > > > > Please contact the manufacturer of the product. > > > > //Markus > > > > Sent via BlackBerry Hub+ Inbox for Android > > > > > > Noted with thanks. I will contact Ubiquiti. You can certainly do that, but it is usually not that hard to find out which ssh software the remote server is running. You could try ssh -v root at host and would get something like this: debug1: Local version string SSH-2.0-OpenSSH_8.4p1 Debian-5+deb11u1 debug1: Remote protocol version 2.0, remote software version dropbear debug1: no match: dropbear Or this: debug1: Local version string SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2 debug1: Remote protocol version 2.0, remote software version OpenSSH_8.4p1 Debian-5+deb11u1 debug1: match: OpenSSH_8.4p1 Debian-5+deb11u1 pat OpenSSH* compat 0x04000000 Another possibility would be to use nmap with the option -sV and you would get something like this: PORT STATE SERVICE VERSION 22/tcp open ssh Dropbear sshd (protocol 2.0) MAC Address: 74:AC:B9:66:04:74 (Ubiquiti Networks) Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel Or this: PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 8.4p1 Debian 5+deb11u1 (protocol 2.0) MAC Address: 00:0C:29:4E:BE:9E (VMware) Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel Note: one of the devices I tried here is a Unifi AP AC-Lite. ;-) Greets Alex > > > > *From:* tdtemccnp at gmail.com > > *Sent:* 27 October 2022 15:02 > > *To:* busybox at busybox.net > > *Cc:* ceo at teo-en-ming-corp.com > > *Subject:* SSH Weak Key Exchange Algorithms Enabled on UniFi Wireless > > Access Points > > > > Subject: SSH Weak Key Exchange Algorithms Enabled on UniFi Wireless Access > > Points > > > > Good day from Singapore, > > > > I have discovered that UniFi Wireless Access Points are powered by Busybox. > > > > Vulnerability scanning of my client's corporate network shows SSH weak key > > exchange algorithms enabled on UniFi wireless access points. > > > > Article: SSH WEAK KEY EXCHANGE ALGORITHMS ENABLED > > Link: > > https://www.virtuesecurity.com/kb/ssh-weak-key-exchange-algorithms-enabled/ > > > > According to the above article, we must make changes to > > /etc/sshd/sshd_config, especially the KexAlgorithms directive. > > > > However, when I putty/SSH into Busybox, I cannot find the file > > /etc/sshd/sshd_config. What SSH server is running inside Busybox? > > > > How can I make changes to the SSH server within Busybox so that I can > > disable the SSH weak key exchange algorithms? > > > > Please advise. > > > > Thank you. > > > > By the way, I also noticed that Hikvision Face Recognition Terminal Door > > Access Systems are also powered by Busybox. > > > > I am doing this for an investment company at Keppel Road, Singapore. > > > > Regards, > > > > Mr. Turritopsis Dohrnii Teo En Ming > > Targeted Individual in Singapore > > Blogs: > > https://tdtemcerts.blogspot.com > > https://tdtemcerts.wordpress.com > > > > > > > > > _______________________________________________ > busybox mailing list > busybox at busybox.net > http://lists.busybox.net/mailman/listinfo/busybox From nixiaoming at huawei.com Sat Oct 29 07:13:15 2022 From: nixiaoming at huawei.com (Xiaoming Ni) Date: Sat, 29 Oct 2022 15:13:15 +0800 Subject: ping //Re: [PATCH] loop: fix a race when a free loop device is snatched In-Reply-To: <20221021071040.41035-1-nixiaoming@huawei.com> References: <20221021071040.41035-1-nixiaoming@huawei.com> Message-ID: <9a6a1e70-62c8-8692-460a-f85e21c29bea@huawei.com> ping On 2022/10/21 15:10, Xiaoming Ni wrote: > When /dev/loop-control exists and *device is empty, the mounting fails > due to concurrent contention. > Code Execution Flow: > try = xasprintf(LOOP_FORMAT, i); > for (i = 0; i <= 0xfffff; i++) { // The value of "try" is not changed. > ... > lfd = rc = open(try, mode); > ... > rc = repeat_on_eagain(ioctl(lfd, BB_LOOP_GET_STATUS, &loopinfo)); > // Because of race, the value of "rc" is 0. and the value of "try" is not changed > ... > close(lfd); > } > > add/remove: 0/0 grow/shrink: 1/0 up/down: 5/0 (5) > Function old new delta > set_loop 773 778 +5 > > Fixes: 4bc59a4cf ("mount: fix a race when a free loop device is snatched > under us by another mount") > Fiexe: 3b69ba799 ("mount,losetup: use /dev/loop-control is it exists") > > Signed-off-by: Xiaoming Ni > --- > libbb/loop.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/libbb/loop.c b/libbb/loop.c > index cb8fa2442..845565d7b 100644 > --- a/libbb/loop.c > +++ b/libbb/loop.c > @@ -218,8 +218,13 @@ int FAST_FUNC set_loop(char **device, const char *file, unsigned long long offse > } > /* failure, undo LOOP_SET_FD */ > ioctl(lfd, LOOP_CLR_FD, 0); // actually, 0 param is unnecessary > + } else { > + if (rc == 0 && *device == NULL && try != dev) { > + free(try); > + close(lfd); > + goto get_free_loopN; > + } > } > - /* else: device is not free (rc == 0) or error other than ENXIO */ > close_and_try_next_loopN: > close(lfd); > try_next_loopN: >