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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 11 Mar 2021 09:28:46 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Peter Zijlstra' <peterz@...radead.org>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>
CC:     bpf <bpf@...r.kernel.org>, Steven Rostedt <rostedt@...dmis.org>,
        "H. Peter Anvin" <hpa@...or.com>, X86 ML <x86@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: RE: The killing of ideal_nops[]

From: Peter Zijlstra <peterz@...radead.org>
...
> Below is the latest version which I just pushed out to my git tree so
> that the robots can have a go at it.

Why not delete the indirection table?
So you end up with:

> +#ifndef CONFIG_64BIT
> +
> +/*
> + * Generic 32bit nops from GAS:
> + *
> + * 1: nop
> + * 2: movl %esi,%esi
> + * 3: leal 0x00(%esi),%esi
> + * 4: leal 0x00(,%esi,1),%esi
> + * 5: leal %ds:0x00(,%esi,1),%esi
> + * 6: leal 0x00000000(%esi),%esi
> + * 7: leal 0x00000000(,%esi,1),%esi
> + * 8: leal %ds:0x00000000(,%esi,1),%esi
>   *
> - * *_NOP5_ATOMIC must be a single instruction.
> + * Except 5 and 8, which are DS prefixed 4 and 7 resp, where GAS would emit 2
> + * nop instructions.
>   */
> +#define BYTES_NOP1	0x90
> +#define BYTES_NOP2	0x89,0xf6
> +#define BYTES_NOP3	0x8d,0x76,0x00
> +#define BYTES_NOP4	0x8d,0x74,0x26,0x00
> +#define BYTES_NOP5	0x3e,BYTES_NOP4
> +#define BYTES_NOP6	0x8d,0xb6,0x00,0x00,0x00,0x00
> +#define BYTES_NOP7	0x8d,0xb4,0x26,0x00,0x00,0x00,0x00
> +#define BYTES_NOP8	0x3e,BYTES_NOP7

const unsigned char const x86_nops[8][8] = {
	{ BYTES_NOP1 },
	{ BYTES_NOP2 },
	{ BYTES_NOP3 },
	{ BYTES_NOP4 },
	{ BYTES_NOP5 },
	{ BYTES_NOP6 },
	{ BYTES_NOP7 },
	{ BYTES_NOP8 }
};

The rest of the patch may not need changing.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ