Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Feb 2012 17:33:28 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        src-committers@freebsd.org, Pawel Jakub Dawidek <pjd@freebsd.org>, svn-src-all@freebsd.org, Mikolaj Golub <trociny@freebsd.org>, "Robert N. M. Watson" <rwatson@freebsd.org>, svn-src-head@freebsd.org, Julian Elischer <julian@freebsd.org>
Subject:   Re: svn commit: r232181 - in head/sys: kern sys
Message-ID:  <20120229153328.GG55074@deviant.kiev.zoral.com.ua>
In-Reply-To: <201202290936.02309.jhb@freebsd.org>
References:  <201202261425.q1QEPm9g069102@svn.freebsd.org> <86mx81byt6.fsf@in138.ua3> <20120229132507.GB55074@deviant.kiev.zoral.com.ua> <201202290936.02309.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--cl8+tZBacEYae1bh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Feb 29, 2012 at 09:36:02AM -0500, John Baldwin wrote:
> On Wednesday, February 29, 2012 8:25:07 am Konstantin Belousov wrote:
> > On Wed, Feb 29, 2012 at 02:37:25PM +0200, Mikolaj Golub wrote:
> > >=20
> > > On Wed, 29 Feb 2012 12:03:00 +0000 Robert N. M. Watson wrote:
> > >=20
> > >  RNMW> I think the monitoring aspect of the patch is fine.
> > >=20
> > >  RNMW> The bit I was worried about was external umask changes. This c=
an cause
> > >  RNMW> race conditions for applications that manage their umask -- for
> > >  RNMW> example, bsdtar, if I recall correctly. It's one thing to use a
> > >  RNMW> debugger to force an application to change its umask -- the de=
veloper
> > >  RNMW> needs to know they are changing application behaviour. But exp=
osing a
> > >  RNMW> feature that can lead to correct applications but incorrect re=
sults is
> > >  RNMW> a risky thing to do, hence my objection.
> > >=20
> > >  RNMW> I think given the other objections, it would be wise to remove=
 write
> > >  RNMW> access to process umasks, but retain read access for procstat =
(which is
> > >  RNMW> quite useful, I agree).
> > >=20
> > > I still don't see why having a sysctl RW is worse than asking users t=
o run
> > > something like in the attach when they need to change umask for anoth=
er
> > > process, but ok, if people don't like RW I will remove it.
> > >=20
> > What is done is attach is much worse then the sysctl, just because
> > debugger attach often causes spurious EINTR, indeed seriously disrupting
> > applications, as opposed to some uncertain damage that could be done in
> > theory.
>=20
> kgdb doesn't though, and presumably for umask you would change it via kgd=
b, so
> from the running process' perspective it would look the same as changing =
it via
> sysctl.

Right, but an idea of the change was to allow to do this for somebody who
does not know how to perform it in kgdb. Not to mention that kgdb -w
is risky, e.g. because filedesc might have changed under kgdb, so you would
write over freed memory.

--cl8+tZBacEYae1bh
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (FreeBSD)

iEYEARECAAYFAk9ORUgACgkQC3+MBN1Mb4hkgQCg4eZSfK8M8FK2ywsijJ7pD58F
kQAAoOUtORWe6fX3d8qK10JBlXRHZUG9
=NiSX
-----END PGP SIGNATURE-----

--cl8+tZBacEYae1bh--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120229153328.GG55074>