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] [day] [month] [year] [list]
Date:   Tue, 7 Sep 2021 13:22:20 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
        Al Viro <viro@...iv.linux.org.uk>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Tony Luck <tony.luck@...el.com>,
        Song Liu <songliubraving@...com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Peter Ziljstra <peterz@...radead.org>
Subject: Re: [patch V2 05/20] x86/extable: Rework the exception table
 mechanics

On Tue, Sep 07, 2021 at 09:56:20PM +0200, Thomas Gleixner wrote:
> The exception table entries contain the instruction address, the fixup
> address and the handler address. All addresses are relative. Storing the
> handler address has a few downsides:
> 
>  1) Most handlers need to be exported
>  
>  2) Handlers can be defined everywhere and there is no overview about the
>     handler types
> 
>  3) MCE needs to check the handler type to decide whether an in kernel #MC
>     can be recovered. The functionality of the handler itself is not in any
>     way special, but for these checks there need to be separate functions
>     which in the worst case have to be exported.
> 
>     Some of these 'recoverable' exception fixups are pretty obscure and
>     just reuse some other handler to spare code. That obfuscates e.g. the
>     #MC safe copy functions. Cleaning that up would require more handlers
>     and exports
> 
> Rework the exception fixup mechanics by storing a fixup type number instead
> of the handler address and invoke the proper handler for each fixup
> type. Also teach the extable sort to leave the type field alone.
> 
> This makes most handlers static except for special cases like the MCE
> MSR fixup and the BPF fixup. This allows to add more types for cleaning up
> the obscure places without adding more handler code and exports.
> 
> There is a marginal code size reduction for a production config and it
> removes _eight_ exported symbols.
> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: Tony Luck <tony.luck@...el.com>
> Cc: Song Liu <songliubraving@...com>
> Cc: Alexei Starovoitov <ast@...nel.org>
> Cc: Daniel Borkmann <daniel@...earbox.net>

bpf bits look good to me.
Acked-by: Alexei Starovoitov <ast@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ