Re: CVS commit: src/sys/kern [change in kern_lwp.c]

2019-12-03 Thread Maxime Villard

Le 01/12/2019 à 16:27, Andrew Doran a écrit :

Module Name:src
Committed By:   ad
Date:   Sun Dec  1 15:27:58 UTC 2019

Modified Files:
src/sys/kern: kern_lwp.c

Log Message:
Fix a longstanding problem with LWP limits.  When changing the user's
LWP count, we must use the process credentials because that's what
the accounting entity is tied to.

Reported-by: syzbot+d193266676f635661...@syzkaller.appspotmail.com


Is there a mistake in the Reported-by? It corresponds to a report that was
closed as a malformed duplicate of this original report:


https://syzkaller.appspot.com/bug?id=8878f056a0a9cf0cc405f1926a4f236fdc721642

Also, the bug is still there apparently, if you want to give a look...


Re: CVS commit: src/sys/arch/x86/x86

2019-12-03 Thread Andrew Doran
On Tue, Dec 03, 2019 at 01:14:14PM +0100, Kamil Rytarowski wrote:

> On 03.12.2019 12:50, Juergen Hannken-Illjes wrote:
> > Module Name:src
> > Committed By:   hannken
> > Date:   Tue Dec  3 11:50:45 UTC 2019
> > 
> > Modified Files:
> > src/sys/arch/x86/x86: x86_machdep.c
> > 
> > Log Message:
> > Make sure the assignment to "idepth" is done inside the loop to prevent
> > preemption between loop end and dereference of "l_cpu->ci_depth".
> > 
> > 
> > To generate a diff of this commit:
> > cvs rdiff -u -r1.131 -r1.132 src/sys/arch/x86/x86/x86_machdep.c
> > 
> > Please note that diffs are not public domain; they are subject to the
> > copyright notices on the relevant files.
> > 
> > 
> > Modified files:
> > 
> > Index: src/sys/arch/x86/x86/x86_machdep.c
> > diff -u src/sys/arch/x86/x86/x86_machdep.c:1.131 
> > src/sys/arch/x86/x86/x86_machdep.c:1.132
> > --- src/sys/arch/x86/x86/x86_machdep.c:1.131Tue Dec  3 11:50:16 2019
> > +++ src/sys/arch/x86/x86/x86_machdep.c  Tue Dec  3 11:50:45 2019
> > @@ -1,4 +1,4 @@
> > -/* $NetBSD: x86_machdep.c,v 1.131 2019/12/03 11:50:16 hannken Exp $
> > */
> > +/* $NetBSD: x86_machdep.c,v 1.132 2019/12/03 11:50:45 hannken Exp $
> > */
> >  
> >  /*-
> >   * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi,
> > @@ -31,7 +31,7 @@
> >   */
> >  
> >  #include 
> > -__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.131 2019/12/03 11:50:16 
> > hannken Exp $");
> > +__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.132 2019/12/03 11:50:45 
> > hannken Exp $");
> >  
> >  #include "opt_modular.h"
> >  #include "opt_physmem.h"
> > @@ -350,7 +350,7 @@ bool
> >  cpu_intr_p(void)
> >  {
> > uint64_t ncsw;
> > -   int idepth;
> > +   volatile int idepth;
> > lwp_t *l;
> >  
> > l = curlwp;
> > 
> 
> Thanks!
> 
> This looks like to be in need to be propagated to:
> src/sys/arch/arm/arm/arm_machdep.c, src/sys/arch/mips/mips/cpu_subr.c,
> src/sys/arch/sparc/sparc/intr.c, src/sys/arch/sparc64/sparc64/machdep.c,
> src/sys/arch/usermode/dev/cpu.c,

I will take care of that later today.

Andrew




Re: CVS commit: src/sys/arch/x86/x86

2019-12-03 Thread Kamil Rytarowski
On 03.12.2019 12:50, Juergen Hannken-Illjes wrote:
> Module Name:  src
> Committed By: hannken
> Date: Tue Dec  3 11:50:45 UTC 2019
> 
> Modified Files:
>   src/sys/arch/x86/x86: x86_machdep.c
> 
> Log Message:
> Make sure the assignment to "idepth" is done inside the loop to prevent
> preemption between loop end and dereference of "l_cpu->ci_depth".
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.131 -r1.132 src/sys/arch/x86/x86/x86_machdep.c
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 
> 
> Modified files:
> 
> Index: src/sys/arch/x86/x86/x86_machdep.c
> diff -u src/sys/arch/x86/x86/x86_machdep.c:1.131 
> src/sys/arch/x86/x86/x86_machdep.c:1.132
> --- src/sys/arch/x86/x86/x86_machdep.c:1.131  Tue Dec  3 11:50:16 2019
> +++ src/sys/arch/x86/x86/x86_machdep.cTue Dec  3 11:50:45 2019
> @@ -1,4 +1,4 @@
> -/*   $NetBSD: x86_machdep.c,v 1.131 2019/12/03 11:50:16 hannken Exp $
> */
> +/*   $NetBSD: x86_machdep.c,v 1.132 2019/12/03 11:50:45 hannken Exp $
> */
>  
>  /*-
>   * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi,
> @@ -31,7 +31,7 @@
>   */
>  
>  #include 
> -__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.131 2019/12/03 11:50:16 
> hannken Exp $");
> +__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.132 2019/12/03 11:50:45 
> hannken Exp $");
>  
>  #include "opt_modular.h"
>  #include "opt_physmem.h"
> @@ -350,7 +350,7 @@ bool
>  cpu_intr_p(void)
>  {
>   uint64_t ncsw;
> - int idepth;
> + volatile int idepth;
>   lwp_t *l;
>  
>   l = curlwp;
> 

Thanks!

This looks like to be in need to be propagated to:
src/sys/arch/arm/arm/arm_machdep.c, src/sys/arch/mips/mips/cpu_subr.c,
src/sys/arch/sparc/sparc/intr.c, src/sys/arch/sparc64/sparc64/machdep.c,
src/sys/arch/usermode/dev/cpu.c,



signature.asc
Description: OpenPGP digital signature