lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 25 Sep 2010 19:13:04 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	rth@...ddle.net
Cc:	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: alpha: potential race around hae_cache in RESTORE_ALL

	What happens if we get to RESTORE_ALL with interrupts enabled,
find that we want to restore HAE, get to
        stq     $21, HAE_CACHE($19);    \
and get hit by an interrupt right after that assignment?  Note that
*alpha_mv->hae_register is still not updated, but alpha_mv->hae_cache
already is, so if the interrupt calls set_hae() it would get seriously
confused if the value it wants is equal to the value we've put into
->hae_cache.

	Until ~2002 it used to have a couple of swpipl around these
assignments and __set_hae() is still doing those.  I agree that on
many exits we *will* have interrupts disabled when we get to RESTORE_ALL,
but not on all of them.  E.g. any interrupt taken in kernel mode will
happily go to restore_all without bothering with swpipl at all.

	AFAICS, it looks like a race; the change in question had been
introduced in "Update Alpha UP for thread_info and scheduler changes"
(Feb 10 2002, commit 374eeee8a8a50e12278dfa37021df7b6efe506c3 in historical
git tree).

	Comments?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ