[PATCH/RFC v2] decode extend getsockopt/setsockopt options

2015-08-19 Thread Mike Frysinger
Currently the code assumes the set of valid options between getsockopt and setsockopt are exactly the same and thus maintains one list. The kernel unfortunately does not do this -- it allows for different opts between the get and set functions. See the {g,s}et_opt{min,max} fields in the various

Re: compile error for MIPS

2015-08-19 Thread Dmitry V. Levin
On Tue, Aug 18, 2015 at 01:55:09PM +0200, Thomas Schmiedl wrote: Hello Dmitry, could you explain, how to do this (I'm not a developer). I only imported a preconfigured VM in VirtualBox (http://sourceforge.net/projects/freetz-linux/) and build using this tutorial

Re: [PATCH/RFC] decode extend getsockopt/setsockopt options

2015-08-19 Thread Dmitry V. Levin
On Tue, Aug 18, 2015 at 05:03:20PM -0400, Mike Frysinger wrote: [...] * util.c (printxval): Rename to ... (printxvals): ... this. Rewrite to be varargs based. * xlat/getsockipoptions.in: New xlat list. * xlat/getsockipv6options.in, xlat/setsockipoptions.in, xlat/setsockipv6options.in:

Re: [PATCH/RFC] decode extend getsockopt/setsockopt options

2015-08-19 Thread Dmitry V. Levin
On Wed, Aug 19, 2015 at 01:26:56PM -0400, Mike Frysinger wrote: On 19 Aug 2015 18:56, Dmitry V. Levin wrote: On Tue, Aug 18, 2015 at 05:03:20PM -0400, Mike Frysinger wrote: [...] * util.c (printxval): Rename to ... (printxvals): ... this. Rewrite to be varargs based. *

[PATCH v3] decode extend getsockopt/setsockopt options

2015-08-19 Thread Mike Frysinger
Currently the code assumes the set of valid options between getsockopt and setsockopt are exactly the same and thus maintains one list. The kernel unfortunately does not do this -- it allows for different opts between the get and set functions. See the {g,s}et_opt{min,max} fields in the various

Re: [PATCH/RFC] decode extend getsockopt/setsockopt options

2015-08-19 Thread Mike Frysinger
On 19 Aug 2015 18:56, Dmitry V. Levin wrote: On Tue, Aug 18, 2015 at 05:03:20PM -0400, Mike Frysinger wrote: [...] * util.c (printxval): Rename to ... (printxvals): ... this. Rewrite to be varargs based. * xlat/getsockipoptions.in: New xlat list. * xlat/getsockipv6options.in,

decoding of input/output args ?

2015-08-19 Thread Mike Frysinger
some syscalls have arguments that are read/write. for example, getsockopt passes in a pointer to a length that has to be set correctly first, and then the kernel will adjust it when returning. being able to see both values is important when getting an error so you can see what the user sent up

Re: decoding of input/output args ?

2015-08-19 Thread Dmitry V. Levin
On Wed, Aug 19, 2015 at 04:59:38PM -0400, Mike Frysinger wrote: On 19 Aug 2015 22:36, Dmitry V. Levin wrote: On Wed, Aug 19, 2015 at 03:17:39PM -0400, Mike Frysinger wrote: some syscalls have arguments that are read/write. for example, getsockopt passes in a pointer to a length that

Re: decoding of input/output args ?

2015-08-19 Thread Mike Frysinger
On 19 Aug 2015 22:36, Dmitry V. Levin wrote: On Wed, Aug 19, 2015 at 03:17:39PM -0400, Mike Frysinger wrote: some syscalls have arguments that are read/write. for example, getsockopt passes in a pointer to a length that has to be set correctly first, and then the kernel will adjust it