Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jan 2013 02:08:40 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Alfred Perlstein <bright@mu.org>
Cc:        arch@freebsd.org, toolchain@freebsd.org
Subject:   Re: Fast sigblock (AKA rtld speedup)
Message-ID:  <20130108000840.GA82219@kib.kiev.ua>
In-Reply-To: <50EB3319.6060303@mu.org>
References:  <20130107182235.GA65279@kib.kiev.ua> <50EB3319.6060303@mu.org>

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

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

On Mon, Jan 07, 2013 at 03:42:01PM -0500, Alfred Perlstein wrote:
> On 1/7/13 1:22 PM, Konstantin Belousov wrote:
> > Below is the forward of the patch for which I failed to obtain a private
> > review. Might be, the list generates more responses.
> Very cool.
>=20
> Sorry for being rusty here, but is it safe to call fuword in the middle=
=20
> of issignal()?
>=20
> The reason I ask is because it looks like proc lock is required for this=
=20
> block, and I forget it fuword(9) can fault.
>=20
> If fuword(9) can fault then I don't think you can do this.
>=20
> You'll need to use something like fuswintr(9) or wire the page down=20
> using vslock(9) or something.
>=20
> I am probably missing something?

No, you are completely right. This is a serious bug. Thank you.

I was careful to code the td_sigblock_val prefetch etc, but failed
to do the update properly. There is no reason to execute the update
in the issignal() at all, the setting of the pending bit can be postponed
to the moment after the postsig() loop was executed.

I uploaded the updated but not yet tested patch at
http://people.freebsd.org/~kib/misc/rtld-sigblock.1.patch

--/SXoEQDAiXmUSAYo
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iQIcBAEBAgAGBQJQ62OIAAoJEJDCuSvBvK1B3UwP/AtqY913PEsaOOuAuMCBfgo2
yYoBB/d4xaDzMNglQ6TxTNiqy4tN6Wd3vki38VrW4Kc4QbAmL4Yi+w08D8LkXqQ0
OuwP3PuHz6s9eoSOY+rIkHVhxG624SxnzCiKrSS6X8wT1Mky/dvYH/YsfgkXUTsH
gbVJdP7P8jIkst9Rajepq6n9jjHqaWSJZ7JIMrQenVRy/x3PteidWGhL+UjIPBrw
pOAXuwsvmr+NSqNhsiPCD7Q7yDOKBz3SALLjI/llc4cr1lC5j9C65bAa7gJKTHWZ
Gj0jDz2+GI7CyM18TrUqMNspnh4WqXCSlAzhfsSG5LmS9Zl2FlI0T2UvOxLm9kl4
S5w4YofRVRUIjLyaXtebTGY29HE2mDripJkE6dYnU8sH0t7vShoLSfEvrHalBPNy
px/Qtq8pRZWzPrnq/maFXCgqBwSfGEmuRhLX6e8EFHw35rnaN0f4p+cbqArJLpqB
GIXksbN19Pre8LQfK4iNJxNqhUd0OniRqMP1qbqBU2/IrDTEmdhnT411fr1Wtvtz
N1bLmEgou0Pgm5JC3h+FxbpnevvHaXgJGS01rt5L4GC/yAHmO60qf0KqbyRveMqu
rxVaO7g1W+VeRpIxW9MUsk1dtyJosu/+higMc2iI063+YeZcvjRimLFOByHW7FXH
BMfeFRMFZV7/ocl1IRdV
=7eJr
-----END PGP SIGNATURE-----

--/SXoEQDAiXmUSAYo--



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