Re: [PATCHv2] Use sendfile to copy data between file descriptors

2014-10-21 Thread Ron Yorston
Well, this is fortuitous.  From the kernel mailing list:

From: Pieter Smith pie...@boesman.nl
Subject: [PATCH 2/2] fs: Support compiling out sendfile
Date: Mon, 20 Oct 2014 23:48:37 +0200

Many embedded systems will not need this syscall, and omitting it
saves space.  Add a new EXPERT config option CONFIG_SENDFILE_SYSCALL
(default y) to support compiling it out.

There's a pleasing symmetry that while BusyBox gains the ability to
configure in sendfile the kernel gains the ability to configure it out.

Ron
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: [PATCHv2] Use sendfile to copy data between file descriptors

2014-10-21 Thread Lauri Kasanen
On Tue, Oct 21, 2014, at 08:46, Mike Frysinger wrote:
 On 20 Oct 2014 21:00, Lauri Kasanen wrote:
   +config FEATURE_USE_SENDFILE
   +bool Use sendfile system call
   +default y
   +help
   +  When enabled, busybox will use the kernel sendfile() function
   +  instead of read/write loops where applicable.
  
  Please include the kernel version requirement here.
 
 `man 2 sendfile`:
 In Linux kernels before 2.6.33, out_fd must refer to a socket.
 Since Linux 2.6.33 it can be any file.  If it is a regular file,
 then sendfile() changes the file offset appropriately.
 -mike

Yes, I know? The point was to tell the user configuring busybox that.

- Lauri

PS: Sorry, forgot the list the first time.

-- 
http://www.fastmail.fm - Or how I learned to stop worrying and
  love email again

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: [PATCHv2] Use sendfile to copy data between file descriptors

2014-10-21 Thread Mike Frysinger
On 21 Oct 2014 11:01, Lauri Kasanen wrote:
 On Tue, Oct 21, 2014, at 08:46, Mike Frysinger wrote:
  On 20 Oct 2014 21:00, Lauri Kasanen wrote:
+config FEATURE_USE_SENDFILE
+bool Use sendfile system call
+default y
+help
+  When enabled, busybox will use the kernel sendfile() function
+  instead of read/write loops where applicable.
   
   Please include the kernel version requirement here.
  
  `man 2 sendfile`:
  In Linux kernels before 2.6.33, out_fd must refer to a socket.
  Since Linux 2.6.33 it can be any file.  If it is a regular file,
  then sendfile() changes the file offset appropriately.
 
 Yes, I know? The point was to tell the user configuring busybox that.

chill dog.  the fact you knew it doesn't mean the submitter did.
nowhere did i say you were ignorant.
-mike


signature.asc
Description: Digital signature
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Re: Need known defect list for BusyBox

2014-10-21 Thread Mike Frysinger
On 13 Oct 2014 10:13, Priyadarshini, Chethana (GE Healthcare) wrote:
 We are performing a SOUP(Software of Unknown Pedigree) anomaly for the
 purpose of audit. With regard to this we need to check if the 3rd party
 software which we are using in our product has any known defects and
 its impact on our product. Hence can you please send me the known defect
 list such that we can analyze it and see if it has any impact on our
 medical device.

sorry, but busybox maintains no such information.  you'd have to read the
full commit history yourself to see what's what.
http://git.busybox.net/busybox/log/

there almost certainly are bugs in that version, but whether it impacts
your product, you'd have to decide.
-mike


signature.asc
Description: Digital signature
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Re: 1.22.1: been hit by the zcat bug

2014-10-21 Thread Mike Frysinger
On 20 Oct 2014 20:54, Cristian Ionescu-Idbohrn wrote:
 That deserves a patch in http://busybox.net/downloads/fixes-1.22.1/,
 IMO.  At least, commits:
 
   7c47b560a8fc97956dd8132bd7f1863d83c19866
   b664f740d90880560ce46b11f766625341342e80
   640ce3de07807133796bccd0bdfa146bbfc788c7
 
 may be relevantat.

what exactly are you calling the zcat bug ?  seems to me only the first one
should be backported.  `busybox zcat foo` failing when foo is not compressed
matches standard `zcat` behavior.
-mike


signature.asc
Description: Digital signature
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Re: 1.22.1: been hit by the zcat bug

2014-10-21 Thread Cristian Ionescu-Idbohrn
On Tue, 21 Oct 2014, Mike Frysinger wrote:
 On 20 Oct 2014 20:54, Cristian Ionescu-Idbohrn wrote:
  That deserves a patch in http://busybox.net/downloads/fixes-1.22.1/,
  IMO.  At least, commits:
 
  7c47b560a8fc97956dd8132bd7f1863d83c19866
  b664f740d90880560ce46b11f766625341342e80
  640ce3de07807133796bccd0bdfa146bbfc788c7
 
  may be relevantat.

 what exactly are you calling the zcat bug ?  seems to me only the
 first one should be backported.  `busybox zcat foo` failing when foo
 is not compressed matches standard `zcat` behavior. -mike

Well, but it fails (but returns exit status success) even if the file
is compressed (ex. gzipped) but the fipped file extension isn't .gz.
It will procuce an exact copy of the original.

This is a .tar.gz file:

-rw-r--r--1 root root  2736 Oct 21 16:32 foo.tar.bar

# zcat foo.tar.bar foo.tar;echo $?
0

-rw-r--r--1 root root  2736 Oct 21 16:37 foo.tar
-rw-r--r--1 root root  2736 Oct 21 16:32 foo.tar.bar

Attemting to extract the archive will fail instead, with appropriate
exit status.


Cheers,

-- 
Cristian
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: 1.22.1: been hit by the zcat bug

2014-10-21 Thread Cristian Ionescu-Idbohrn
On Tue, 21 Oct 2014, Cristian Ionescu-Idbohrn wrote:
 On Tue, 21 Oct 2014, Mike Frysinger wrote:
  On 20 Oct 2014 20:54, Cristian Ionescu-Idbohrn wrote:
   That deserves a patch in http://busybox.net/downloads/fixes-1.22.1/,
   IMO.  At least, commits:
  
 7c47b560a8fc97956dd8132bd7f1863d83c19866
 b664f740d90880560ce46b11f766625341342e80
 640ce3de07807133796bccd0bdfa146bbfc788c7
  
   may be relevantat.
 
  what exactly are you calling the zcat bug ?  seems to me only the
  first one should be backported.  `busybox zcat foo` failing when foo
  is not compressed matches standard `zcat` behavior. -mike

 Well, but it fails (but returns exit status success) even if the file
 is compressed (ex. gzipped) but the fipped file extension isn't .gz.
 It will procuce an exact copy of the original.

 This is a .tar.gz file:

 -rw-r--r--1 root root  2736 Oct 21 16:32 foo.tar.bar

 # zcat foo.tar.bar foo.tar;echo $?
 0

 -rw-r--r--1 root root  2736 Oct 21 16:37 foo.tar
 -rw-r--r--1 root root  2736 Oct 21 16:32 foo.tar.bar

 Attemting to extract the archive will fail instead, with appropriate
 exit status.

If I do:

# ln -s foo.tar.bar foo.tar.gz
# zcat foo.tar.gz foo.tar;echo $?
0

-rw-r--r--1 root root 40960 Oct 21 17:37 foo.tar
-rw-r--r--1 root root  2736 Oct 21 17:36 foo.tar.bar
lrwxrwxrwx1 root root11 Oct 21 17:37 foo.tar.gz - 
foo.tar.bar

I get what I expect.


Cheers,

-- 
Cristian
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: 1.22.1: been hit by the zcat bug

2014-10-21 Thread Mike Frysinger
On 21 Oct 2014 18:41, Cristian Ionescu-Idbohrn wrote:
 On Tue, 21 Oct 2014, Mike Frysinger wrote:
  On 20 Oct 2014 20:54, Cristian Ionescu-Idbohrn wrote:
   That deserves a patch in http://busybox.net/downloads/fixes-1.22.1/,
   IMO.  At least, commits:
  
 7c47b560a8fc97956dd8132bd7f1863d83c19866
 b664f740d90880560ce46b11f766625341342e80
 640ce3de07807133796bccd0bdfa146bbfc788c7
  
   may be relevantat.
 
  what exactly are you calling the zcat bug ?  seems to me only the
  first one should be backported.  `busybox zcat foo` failing when foo
  is not compressed matches standard `zcat` behavior. -mike
 
 Well, but it fails (but returns exit status success) even if the file
 is compressed (ex. gzipped) but the fipped file extension isn't .gz.
 It will procuce an exact copy of the original.

yes, but that bug is only fixed by the first commit in your list:
7c47b560a8fc97956dd8132bd7f1863d83c19866

the others have no impact on that, hence my question as to what exactly
are you looking to get fixed ?
-mike


signature.asc
Description: Digital signature
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Re: 1.22.1: been hit by the zcat bug

2014-10-21 Thread Cristian Ionescu-Idbohrn
On Tue, 21 Oct 2014, Mike Frysinger wrote:
 On 21 Oct 2014 18:41, Cristian Ionescu-Idbohrn wrote:
  On Tue, 21 Oct 2014, Mike Frysinger wrote:
   On 20 Oct 2014 20:54, Cristian Ionescu-Idbohrn wrote:
That deserves a patch in http://busybox.net/downloads/fixes-1.22.1/,
IMO.  At least, commits:
   
7c47b560a8fc97956dd8132bd7f1863d83c19866
b664f740d90880560ce46b11f766625341342e80
640ce3de07807133796bccd0bdfa146bbfc788c7
   
may be relevantat.
  
   what exactly are you calling the zcat bug ?  seems to me only the
   first one should be backported.  `busybox zcat foo` failing when foo
   is not compressed matches standard `zcat` behavior. -mike
 
  Well, but it fails (but returns exit status success) even if the file
  is compressed (ex. gzipped) but the fipped file extension isn't .gz.
  It will procuce an exact copy of the original.

 yes, but that bug is only fixed by the first commit in your list:
   7c47b560a8fc97956dd8132bd7f1863d83c19866

Ok, if you say so.  But if I look at:

$ git log --unified --reverse 1_22_1..master -- archival

I get the impression commit 7c47b560a8fc97956dd8132bd7f1863d83c19866,
by itself, isn't enough.  At least
b664f740d90880560ce46b11f766625341342e80 [libbb: open_zipped() should
not fail on non-compressed files] and
640ce3de07807133796bccd0bdfa146bbfc788c7 [zcat: complain if input is
not compressed] are also related.

 the others have no impact on that, hence my question as to what
 exactly are you looking to get fixed ?

Nothing needs to be fixed.  What I'm merryly suggesting is adding the
appropriate _existing_ patch(es) to
http://busybox.net/downloads/fixes-1.22.1/.  There may be a general
intrest in that.


Cheers,

-- 
Cristian
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: 1.22.1: been hit by the zcat bug

2014-10-21 Thread Mike Frysinger
On 21 Oct 2014 20:02, Cristian Ionescu-Idbohrn wrote:
 On Tue, 21 Oct 2014, Mike Frysinger wrote:
  On 21 Oct 2014 18:41, Cristian Ionescu-Idbohrn wrote:
   On Tue, 21 Oct 2014, Mike Frysinger wrote:
On 20 Oct 2014 20:54, Cristian Ionescu-Idbohrn wrote:
 That deserves a patch in http://busybox.net/downloads/fixes-1.22.1/,
 IMO.  At least, commits:

   7c47b560a8fc97956dd8132bd7f1863d83c19866
   b664f740d90880560ce46b11f766625341342e80
   640ce3de07807133796bccd0bdfa146bbfc788c7

 may be relevantat.
   
what exactly are you calling the zcat bug ?  seems to me only the
first one should be backported.  `busybox zcat foo` failing when foo
is not compressed matches standard `zcat` behavior. -mike
  
   Well, but it fails (but returns exit status success) even if the file
   is compressed (ex. gzipped) but the fipped file extension isn't .gz.
   It will procuce an exact copy of the original.
 
  yes, but that bug is only fixed by the first commit in your list:
  7c47b560a8fc97956dd8132bd7f1863d83c19866
 
 Ok, if you say so.  But if I look at:

if you take 1.22.1, this fails:
$ echo hi | gzip  f
$ busybox zcat f
binary data

if you cherry pick that one commit, zcat now operates as you expect:
$ busybox zcat f
hi

reading the logs/code of those other commits does not look to me like they're
relevant to this issue.

  the others have no impact on that, hence my question as to what
  exactly are you looking to get fixed ?
 
 Nothing needs to be fixed.  What I'm merryly suggesting is adding the
 appropriate _existing_ patch(es) to
 http://busybox.net/downloads/fixes-1.22.1/.  There may be a general
 intrest in that.

yes, but the branches aren't just let's cherry pick everything.  they tend to
be for specific bugs that users have noticed.  hence i'm asking, what bugs are
you seeing in the current release that you want fixed *in the branch* ?  so far,
you've shown one case, and only (small) commit is needed for that.  if you have
no other use cases that are impacted, we'll just ignore the rest and move on.
-mike


signature.asc
Description: Digital signature
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Re: 1.22.1: been hit by the zcat bug

2014-10-21 Thread Cristian Ionescu-Idbohrn
On Tue, 21 Oct 2014, Mike Frysinger wrote:
 On 21 Oct 2014 20:02, Cristian Ionescu-Idbohrn wrote:
 
  Nothing needs to be fixed.  What I'm merryly suggesting is adding
  the appropriate _existing_ patch(es) to
  http://busybox.net/downloads/fixes-1.22.1/.  There may be a
  general intrest in that.

 yes, but the branches aren't just let's cherry pick everything.

I didn't suggest that.  I recall saying appropriate.

 they tend to be for specific bugs that users have noticed.  hence
 i'm asking, what bugs are you seeing in the current release that you
 want fixed *in the branch* ?  so far, you've shown one case, and
 only (small) commit is needed for that.  if you have no other use
 cases that are impacted, we'll just ignore the rest and move on.

Whatever.  You decide.  I can do my own patching.


Cheers,

-- 
Cristian
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: 1.22.1: been hit by the zcat bug

2014-10-21 Thread Mike Frysinger
On 21 Oct 2014 20:26, Cristian Ionescu-Idbohrn wrote:
 On Tue, 21 Oct 2014, Mike Frysinger wrote:
  On 21 Oct 2014 20:02, Cristian Ionescu-Idbohrn wrote:
  
   Nothing needs to be fixed.  What I'm merryly suggesting is adding
   the appropriate _existing_ patch(es) to
   http://busybox.net/downloads/fixes-1.22.1/.  There may be a
   general intrest in that.
 
  yes, but the branches aren't just let's cherry pick everything.
 
 I didn't suggest that.  I recall saying appropriate.
 
  they tend to be for specific bugs that users have noticed.  hence
  i'm asking, what bugs are you seeing in the current release that you
  want fixed *in the branch* ?  so far, you've shown one case, and
  only (small) commit is needed for that.  if you have no other use
  cases that are impacted, we'll just ignore the rest and move on.
 
 Whatever.  You decide.  I can do my own patching.

ffs, i don't know why all this pointless dancing.  i guess the answer is you 
only have the one use case, so only that one patch needs to be cherry picked.  
you aren't hitting any other issues, so there's no need to waste time 
backporting other commits.
-mike


signature.asc
Description: Digital signature
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

small documentation update for telnetd

2014-10-21 Thread Martin Kaiser
Hi,

the attached trivial patch corrects the list of linux kernel options
that are required for busybox telnetd. DEVPTS_FS has been obsolete for
some time.

Best regards,
Martin
From ef997073934b2e5053d324168e8eb546b9269a6c Mon Sep 17 00:00:00 2001
From: Martin Kaiser mar...@kaiser.cx
Date: Tue, 21 Oct 2014 21:23:28 +0200
Subject: [PATCH] telnetd: we only need CONFIG_UNIX98_PTYS from the Linux
 kernel

Signed-off-by: Martin Kaiser mar...@kaiser.cx
---
 networking/Config.src |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/networking/Config.src b/networking/Config.src
index e566469..d15e432 100644
--- a/networking/Config.src
+++ b/networking/Config.src
@@ -758,8 +758,7 @@ config TELNETD
 
 	  Note that for busybox telnetd to work you need several things:
 	  First of all, your kernel needs:
-		  UNIX98_PTYS=y
-		  DEVPTS_FS=y
+		  CONFIG_UNIX98_PTYS=y
 
 	  Next, you need a /dev/pts directory on your root filesystem:
 
-- 
1.7.10.4

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Re: 1.22.1: been hit by the zcat bug

2014-10-21 Thread Cristian Ionescu-Idbohrn
On Tue, 21 Oct 2014, Mike Frysinger wrote:
 On 21 Oct 2014 20:26, Cristian Ionescu-Idbohrn wrote:
  On Tue, 21 Oct 2014, Mike Frysinger wrote:
   On 21 Oct 2014 20:02, Cristian Ionescu-Idbohrn wrote:
   
Nothing needs to be fixed.  What I'm merryly suggesting is adding
the appropriate _existing_ patch(es) to
http://busybox.net/downloads/fixes-1.22.1/.  There may be a
general intrest in that.
  
   yes, but the branches aren't just let's cherry pick everything.
 
  I didn't suggest that.  I recall saying appropriate.
 
   they tend to be for specific bugs that users have noticed.  hence
   i'm asking, what bugs are you seeing in the current release that you
   want fixed *in the branch* ?  so far, you've shown one case, and
   only (small) commit is needed for that.  if you have no other use
   cases that are impacted, we'll just ignore the rest and move on.
 
  Whatever.  You decide.  I can do my own patching.

 ffs, i don't know why all this pointless dancing.  i guess the
 answer is you only have the one use case, so only that one patch
 needs to be cherry picked.  you aren't hitting any other issues, so
 there's no need to waste time backporting other commits. -mike

Please go ahead with whatever you think fit.


Cheers,

-- 
Cristian
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox