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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 25 Apr 2008 17:59:53 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Jiri Slaby <jirislaby@...il.com>,
	David Miller <davem@...emloft.net>, zdenek.kabelac@...il.com,
	rjw@...k.pl, paulmck@...ux.vnet.ibm.com, akpm@...ux-foundation.org,
	linux-ext4@...r.kernel.org, herbert@...dor.apana.org.au,
	penberg@...helsinki.fi, clameter@....com,
	linux-kernel@...r.kernel.org, Andi Kleen <andi@...stfloor.org>,
	pageexec@...email.hu, "H. Peter Anvin" <hpa@...or.com>,
	Jeremy Fitzhardinge <jeremy@...p.org>
Subject: Re: [PATCH 1/1] x86: fix text_poke


* Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca> wrote:

> Woooow, just a sec here. I removed the atomicity test _because_ there 
> happen to be a case where it's safe to do non-atomic instruction 
> modification. If we do :
> 
> 1) replace the instruction first byte by a breakpoint, execute an
>   instruction bypass (see the immediate values patches for detail)
> 2) modify the instruction non-atomically
> 3) put back the original instruction first byte.
> 
> That's why I removed the BUG_ONs at the beginning of the function. 
> That's also why it's required to deal with page crossing.

but the code as-is is nonsensical. It checks for:

        BUG_ON(len > sizeof(long));

but then deals with page crossing...

it should also rename text_poke_early() to text_poke_core(), and call 
_that_ from text_poke() if core_kernel_text(). From that alone the whole 
poke_text() function would look a whole lot cleaner.

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists