Re: llvm / clang / scan-build of the Hurd

2014-02-04 Thread Justus Winter
Hi :) Quoting Thomas Schwinge (2013-10-25 15:48:06) > When I recently read about it somewhere, I've also had the idea about > feeding the Hurd code into the Coverity scanner, which I think offers > such a service for Free Software projects. I also thought about dping > the same for GNU Mach and g

Re: llvm / clang / scan-build of the Hurd

2014-02-04 Thread Samuel Thibault
Justus Winter, le Tue 04 Feb 2014 10:46:01 +0100, a écrit : > Quoting Thomas Schwinge (2013-10-25 15:48:06) > > When I recently read about it somewhere, I've also had the idea about > > feeding the Hurd code into the Coverity scanner, which I think offers > > such a service for Free Software projec

[PATCH 1/3] kern: implement task_set_name

2014-02-04 Thread Justus Winter
task_set_name sets the name of a task. This is a debugging aid. The name will be used in error messages printed by the kernel. * kern/task.c (task_set_name): New function. * kern/task.h (task_set_name): New declaration. --- kern/task.c | 17 + kern/task.h | 4 2 files chan

[PATCH 1/4] kern: use kmem_warn instead of kmem_error in kmem_cache_error

2014-02-04 Thread Justus Winter
* kern/slab.c (kmem_cache_error): Use kmem_warn instead of kmem_error to print the cache name and its address. --- kern/slab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kern/slab.c b/kern/slab.c index d1e3632..adf07e7 100644 --- a/kern/slab.c +++ b/kern/slab.c @@ -662,7 +

[PATCH 3/4] ddb: safely copy symbol names into the symtab structure

2014-02-04 Thread Justus Winter
Use strncpy instead of strcpy to copy the name of a symbol into the symtab structure. Make sure that the string is properly terminated. Found using Coverity. * ddb/db_sym.c (db_add_symbol_table): Use strncpy instead of strcpy, ensure string termination. --- ddb/db_sym.c | 3 ++- 1 file changed,

[PATCH 2/4] kern: make kmem_error panic

2014-02-04 Thread Justus Winter
The slab allocator relies on the fact that kmem_cache_error does not return. Previously, kmem_error was using printf. Use panic instead. Found using the Clang Static Analyzer. * kern/slab.c (kmem_error): Use panic instead of printf. --- kern/slab.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 4/4] xen: fix buffer size

2014-02-04 Thread Justus Winter
Previously, only strlen(device_name) bytes were allocated, missing one byte for the terminating zero. * xen/block.c (hyp_block_init): Fix buffer size. --- xen/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/block.c b/xen/block.c index 3e4ce7c..bd3758f 100644 --- a/

Re: [PATCH 4/4] xen: fix buffer size

2014-02-04 Thread Samuel Thibault
Justus Winter, le Tue 04 Feb 2014 11:50:04 +0100, a écrit : > Previously, only strlen(device_name) bytes were allocated, missing one > byte for the terminating zero. > > * xen/block.c (hyp_block_init): Fix buffer size. Ack! > --- > xen/block.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletio

Re: [PATCH 1/3] kern: implement task_set_name

2014-02-04 Thread Pino Toscano
On Tuesday 04 February 2014 11:01:52 Justus Winter wrote: > /* > + * task_set_name > + * > + * Set the name of task TASK to NAME. This is a debugging aid. > + * NAME will be used in error messages printed by the kernel. > + */ > +kern_return_t > +task_set_name( > + task_t

Re: [PATCH 1/3] kern: implement task_set_name

2014-02-04 Thread Samuel Thibault
Pino Toscano, le Tue 04 Feb 2014 12:57:15 +0100, a écrit : > On Tuesday 04 February 2014 11:01:52 Justus Winter wrote: > > /* > > + * task_set_name > > + * > > + * Set the name of task TASK to NAME. This is a debugging aid. > > + * NAME will be used in error messages printed by the kernel. > > +

Re: [PATCH 1/4] kern: use kmem_warn instead of kmem_error in kmem_cache_error

2014-02-04 Thread Samuel Thibault
Justus Winter, le Tue 04 Feb 2014 11:50:01 +0100, a écrit : > * kern/slab.c (kmem_cache_error): Use kmem_warn instead of kmem_error > to print the cache name and its address. Ack. > --- > kern/slab.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kern/slab.c b/kern/sla

Re: [PATCH 2/4] kern: make kmem_error panic

2014-02-04 Thread Samuel Thibault
Justus Winter, le Tue 04 Feb 2014 11:50:02 +0100, a écrit : > The slab allocator relies on the fact that kmem_cache_error does not > return. Previously, kmem_error was using printf. Use panic instead. > > Found using the Clang Static Analyzer. > > * kern/slab.c (kmem_error): Use panic instead o

Re: [PATCH 3/4] ddb: safely copy symbol names into the symtab structure

2014-02-04 Thread Samuel Thibault
Justus Winter, le Tue 04 Feb 2014 11:50:03 +0100, a écrit : > Use strncpy instead of strcpy to copy the name of a symbol into the > symtab structure. Make sure that the string is properly terminated. > > Found using Coverity. > > * ddb/db_sym.c (db_add_symbol_table): Use strncpy instead of strcp

Re: llvm / clang / scan-build of the Hurd

2014-02-04 Thread Samuel Thibault
Justus Winter, le Tue 04 Feb 2014 10:46:01 +0100, a écrit : > Quoting Thomas Schwinge (2013-10-25 15:48:06) > > When I recently read about it somewhere, I've also had the idea about > > feeding the Hurd code into the Coverity scanner, which I think offers > > such a service for Free Software projec

[PATCH 1/2] exec: connect std{in,out,err} to the mach console

2014-02-04 Thread Justus Winter
* exec/main.c (S_exec_init): Get the device master port and connect std{in,out,err} to the mach console. --- exec/main.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/exec/main.c b/exec/main.c index c1f347c..27f33b1 100644 --- a/exec/main.c +++ b/exec/main.

[PATCH 2/2] daemons/getty: always print a newline before the banner

2014-02-04 Thread Justus Winter
* daemons/getty.c (load_banner): Drop first newline from default banner. (print_banner): Print a newline. --- daemons/getty.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemons/getty.c b/daemons/getty.c index 7112660..40ad4d7 100644 --- a/daemons/getty.c +++ b/daemons/ge

Re: [PATCH 2/2] daemons/getty: always print a newline before the banner

2014-02-04 Thread Samuel Thibault
Justus Winter, le Wed 05 Feb 2014 01:07:47 +0100, a écrit : > * daemons/getty.c (load_banner): Drop first newline from default banner. > (print_banner): Print a newline. Ack. > --- > daemons/getty.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/daemons/getty.c b/dae

Re: [PATCH 1/2] exec: connect std{in,out,err} to the mach console

2014-02-04 Thread Samuel Thibault
Justus Winter, le Wed 05 Feb 2014 01:07:46 +0100, a écrit : > * exec/main.c (S_exec_init): Get the device master port and connect > std{in,out,err} to the mach console. Mmm, stdin too, really? Samuel

Re: [PATCH 1/2] exec: connect std{in,out,err} to the mach console

2014-02-04 Thread Justus Winter
Quoting Samuel Thibault (2014-02-05 01:25:40) > Justus Winter, le Wed 05 Feb 2014 01:07:46 +0100, a écrit : > > * exec/main.c (S_exec_init): Get the device master port and connect > > std{in,out,err} to the mach console. > > Mmm, stdin too, really? I haven't thought about that to be honest. I ju

Re: [PATCH 1/2] exec: connect std{in,out,err} to the mach console

2014-02-04 Thread Samuel Thibault
Justus Winter, le Wed 05 Feb 2014 01:53:58 +0100, a écrit : > Quoting Samuel Thibault (2014-02-05 01:25:40) > > Justus Winter, le Wed 05 Feb 2014 01:07:46 +0100, a écrit : > > > * exec/main.c (S_exec_init): Get the device master port and connect > > > std{in,out,err} to the mach console. > > > > M