Re: svn commit: r268087 - head/sys/kern

2014-07-07 Thread Mateusz Guzik
On Mon, Jul 07, 2014 at 09:23:57AM +0300, Konstantin Belousov wrote: > On Sun, Jul 06, 2014 at 11:39:00PM +0200, Mateusz Guzik wrote: > > > That said, I would prefer to just commit previously proposed fixup. > > > > Ok. > Committed as r268365. > > > > hm, I only now notice that fexecve case do

Re: svn commit: r268087 - head/sys/kern

2014-07-06 Thread Konstantin Belousov
On Sun, Jul 06, 2014 at 11:39:00PM +0200, Mateusz Guzik wrote: > On Sun, Jul 06, 2014 at 11:18:51PM +0200, Mateusz Guzik wrote: > > On Tue, Jul 01, 2014 at 09:09:03PM +0300, Konstantin Belousov wrote: > > > On Tue, Jul 01, 2014 at 02:54:10PM +0200, Mateusz Guzik wrote: > > > > It is passed down to

Re: svn commit: r268087 - head/sys/kern

2014-07-06 Thread Mateusz Guzik
On Sun, Jul 06, 2014 at 11:18:51PM +0200, Mateusz Guzik wrote: > On Tue, Jul 01, 2014 at 09:09:03PM +0300, Konstantin Belousov wrote: > > On Tue, Jul 01, 2014 at 02:54:10PM +0200, Mateusz Guzik wrote: > > > It is passed down to MAC (mac_vnode_execve_will_transition and > > > mac_vnode_execve_transi

Re: svn commit: r268087 - head/sys/kern

2014-07-06 Thread Mateusz Guzik
On Tue, Jul 01, 2014 at 09:09:03PM +0300, Konstantin Belousov wrote: > On Tue, Jul 01, 2014 at 02:54:10PM +0200, Mateusz Guzik wrote: > > It is passed down to MAC (mac_vnode_execve_will_transition and > > mac_vnode_execve_transition) and then vfs_mark_atime. > And we can lock it only there. > I d

Re: svn commit: r268087 - head/sys/kern

2014-07-02 Thread Konstantin Belousov
On Wed, Jul 02, 2014 at 10:43:28AM +0200, Mateusz Guzik wrote: > On Tue, Jul 01, 2014 at 09:07:17PM +0300, Konstantin Belousov wrote: > > On Tue, Jul 01, 2014 at 04:32:38PM +0200, Mateusz Guzik wrote: > > > All other threads have to be blocked, otherwise there are more dangerous > > > races - for i

Re: svn commit: r268087 - head/sys/kern

2014-07-02 Thread Mateusz Guzik
On Tue, Jul 01, 2014 at 09:07:17PM +0300, Konstantin Belousov wrote: > On Tue, Jul 01, 2014 at 04:32:38PM +0200, Mateusz Guzik wrote: > > All other threads have to be blocked, otherwise there are more dangerous > > races - for instance we support sharing file descriptor tables, so > > execve makes

Re: svn commit: r268087 - head/sys/kern

2014-07-01 Thread Konstantin Belousov
On Tue, Jul 01, 2014 at 02:54:10PM +0200, Mateusz Guzik wrote: > On Tue, Jul 01, 2014 at 03:30:58PM +0300, Konstantin Belousov wrote: > > On Tue, Jul 01, 2014 at 01:56:12PM +0200, Mateusz Guzik wrote: > > > That said I propose the following: > > > diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_e

Re: svn commit: r268087 - head/sys/kern

2014-07-01 Thread Konstantin Belousov
On Tue, Jul 01, 2014 at 04:32:38PM +0200, Mateusz Guzik wrote: > On Tue, Jul 01, 2014 at 07:07:28AM -0700, Matthew Fleming wrote: > > On Tue, Jul 1, 2014 at 2:21 AM, Mateusz Guzik wrote: > > > Author: mjg > > > Date: Tue Jul 1 09:21:32 2014 > > > New Revision: 268087 > > > URL: http://svnweb.free

Re: svn commit: r268087 - head/sys/kern

2014-07-01 Thread Mateusz Guzik
On Tue, Jul 01, 2014 at 07:07:28AM -0700, Matthew Fleming wrote: > On Tue, Jul 1, 2014 at 2:21 AM, Mateusz Guzik wrote: > > Author: mjg > > Date: Tue Jul 1 09:21:32 2014 > > New Revision: 268087 > > URL: http://svnweb.freebsd.org/changeset/base/268087 > > > > Log: > > Don't call crcopysafe or u

Re: svn commit: r268087 - head/sys/kern

2014-07-01 Thread Matthew Fleming
On Tue, Jul 1, 2014 at 2:21 AM, Mateusz Guzik wrote: > Author: mjg > Date: Tue Jul 1 09:21:32 2014 > New Revision: 268087 > URL: http://svnweb.freebsd.org/changeset/base/268087 > > Log: > Don't call crcopysafe or uifind unnecessarily in execve. I'm not sure the code works. It gets a copy of t

Re: svn commit: r268087 - head/sys/kern

2014-07-01 Thread Mateusz Guzik
On Tue, Jul 01, 2014 at 03:30:58PM +0300, Konstantin Belousov wrote: > On Tue, Jul 01, 2014 at 01:56:12PM +0200, Mateusz Guzik wrote: > > That said I propose the following: > > diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c > > index cce687b..9b3a99d 100644 > > --- a/sys/kern/kern_exec.c

Re: svn commit: r268087 - head/sys/kern

2014-07-01 Thread Konstantin Belousov
On Tue, Jul 01, 2014 at 01:56:12PM +0200, Mateusz Guzik wrote: > On Tue, Jul 01, 2014 at 02:42:45PM +0300, Konstantin Belousov wrote: > > Old code did the malloc(M_WAITOK) call in crget() before the text vnode > > was locked. After your change, the crdup() is called with the vnode locked. > > Witn

Re: svn commit: r268087 - head/sys/kern

2014-07-01 Thread Mateusz Guzik
On Tue, Jul 01, 2014 at 02:42:45PM +0300, Konstantin Belousov wrote: > Old code did the malloc(M_WAITOK) call in crget() before the text vnode > was locked. After your change, the crdup() is called with the vnode locked. > Witness would not tell you that anything is wrong there, but the new > code

Re: svn commit: r268087 - head/sys/kern

2014-07-01 Thread Konstantin Belousov
On Tue, Jul 01, 2014 at 09:21:33AM +, Mateusz Guzik wrote: > Author: mjg > Date: Tue Jul 1 09:21:32 2014 > New Revision: 268087 > URL: http://svnweb.freebsd.org/changeset/base/268087 > > Log: > Don't call crcopysafe or uifind unnecessarily in execve. > > MFC after: 1 week > > Modifi

svn commit: r268087 - head/sys/kern

2014-07-01 Thread Mateusz Guzik
Author: mjg Date: Tue Jul 1 09:21:32 2014 New Revision: 268087 URL: http://svnweb.freebsd.org/changeset/base/268087 Log: Don't call crcopysafe or uifind unnecessarily in execve. MFC after:1 week Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c ===