lkml.org 
[lkml]   [2010]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/7] arch/x86/mm/kmemcheck: Remove double test
On 28.8.2010 18.41, Julia Lawall wrote:
> The opcodes 0x2e and 0x3e are tested for in the first Group 2 line as well.
>
> The sematic match that finds this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> //<smpl>
> @expression@
> expression E;
> @@
>
> (
> * E
> || ... || E
> |
> * E
> && ...&& E
> )
> //</smpl>
>
> Signed-off-by: Julia Lawall<julia@diku.dk>
>
> ---
> This is a guess as to what the code should be. Perhaps something else
> should have been tested instead.

The last two items are branch hint prefixes that use same encoding as CS
and DS segment override prefixes.

Reviewed-by: Pekka Enberg <penberg@kernel.org>

Can you pick this up in the x86.git tree, please?

> arch/x86/mm/kmemcheck/opcode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/mm/kmemcheck/opcode.c b/arch/x86/mm/kmemcheck/opcode.c
> index 63c19e2..324aa3f 100644
> --- a/arch/x86/mm/kmemcheck/opcode.c
> +++ b/arch/x86/mm/kmemcheck/opcode.c
> @@ -9,7 +9,7 @@ static bool opcode_is_prefix(uint8_t b)
> b == 0xf0 || b == 0xf2 || b == 0xf3
> /* Group 2 */
> || b == 0x2e || b == 0x36 || b == 0x3e || b == 0x26
> - || b == 0x64 || b == 0x65 || b == 0x2e || b == 0x3e
> + || b == 0x64 || b == 0x65
> /* Group 3 */
> || b == 0x66
> /* Group 4 */
>



\
 
 \ /
  Last update: 2010-08-29 12:29    [W:0.036 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site