lkml.org 
[lkml]   [2020]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v2 12/19] x86/signal: Land on &frame->retcode when vdso isn't mapped
    On Mon, Nov 23, 2020 at 4:30 PM Dmitry Safonov <dima@arista.com> wrote:
    >
    > Since commit 9fbbd4dd17d0 ("x86: Don't require the vDSO for handling
    > a.out signals") after processing 32-bit signal if there is no vdso
    > mapped frame->retcode is used as a landing.
    > Do the same for rt ia32 signals.
    > It also makes the ia32 compat signals match the native ia32 case.
    >
    > This shouldn't be mistaken for encouragement for running binaries with
    > executable stack, rather something to do in hopefully very rare
    > situation with disabled or unmapped vdso and absent SA_RESTORER.
    > For non-executable stack it'll segfault on attempt to land, rather than
    > land on a random address where vdso was previously mapped.
    > For programs with executable stack it'll just do the same for rt signals
    > as for non-rt.
    >
    > Discouraging users to run with executable stack is done separately in
    > commit 47a2ebb7f505 ("execve: warn if process starts with executable
    > stack").
    >
    > Signed-off-by: Dmitry Safonov <dima@arista.com>

    The new code is more readable than the old code, too.

    Acked-by: Andy Lutomirski <luto@kernel.org>

    \
     
     \ /
      Last update: 2020-11-25 00:11    [W:4.384 / U:0.412 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site