Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1612255

Re: syscall_get_error() && TS_ checks

From Oleg Nesterov <oleg@redhat.com>
Newsgroups linux.kernel
Subject Re: syscall_get_error() && TS_ checks
Date 2017-03-29 21:00 +0200
Message-ID <tqqZ4-2xD-9@gated-at.bofh.it> (permalink)
References (2 earlier) <tqoXf-188-15@gated-at.bofh.it> <tqp6V-1bC-15@gated-at.bofh.it> <tqpgB-1u5-3@gated-at.bofh.it> <tqpgB-1u5-1@gated-at.bofh.it> <tqpqi-1xr-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 03/29, Linus Torvalds wrote:
>
> That said, I'm not sure why you want to change this in the first
> place? I think the current syscall_get_error() - with explicit compat
> handling and all - is fine.

To simplify this logic. To kill TS_I386_REGS_POKED (which doesn't really
work and can't) and to remove the subtle dependency on TS_COMPAT in ret-
with-signal paths.

Again, afaics we only need these compat checks because regs->ax could be
changed by 32-bit debugger without sign-extension. And TS_I386_REGS_POKED
means that if TS_COMPAT is not set, then the debugger should have also
changed regs->orig_ax. This mostly works, but imo too fragile.

Currently we have the same check in get_nr_restart_syscall() but it is
even more broken (see the patch/changelog), so it should go away and in
this case it would be nice to avoid these checks in do_signal() path too.

Oleg.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/1] get_nr_restart_syscall() should return  __NR_ia32_restart_syscall if __USER32_CS Oleg Nesterov <oleg@redhat.com> - 2017-03-28 17:10 +0200
  syscall_get_error() && TS_ checks Oleg Nesterov <oleg@redhat.com> - 2017-03-29 18:40 +0200
    Re: syscall_get_error() && TS_ checks Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-29 18:50 +0200
      Re: syscall_get_error() && TS_ checks Oleg Nesterov <oleg@redhat.com> - 2017-03-29 19:00 +0200
        Re: syscall_get_error() && TS_ checks Oleg Nesterov <oleg@redhat.com> - 2017-03-29 19:10 +0200
          Re: syscall_get_error() && TS_ checks Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-29 19:20 +0200
            Re: syscall_get_error() && TS_ checks Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-29 21:00 +0200
              Re: syscall_get_error() && TS_ checks Oleg Nesterov <oleg@redhat.com> - 2017-03-30 16:00 +0200
                Re: syscall_get_error() && TS_ checks Oleg Nesterov <oleg@redhat.com> - 2017-03-30 18:00 +0200
                Re: syscall_get_error() && TS_ checks Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-30 19:50 +0200
                Re: syscall_get_error() && TS_ checks Andy Lutomirski <luto@amacapital.net> - 2017-03-30 20:30 +0200
                Re: syscall_get_error() && TS_ checks Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-30 20:40 +0200
                Re: syscall_get_error() && TS_ checks Andy Lutomirski <luto@amacapital.net> - 2017-03-30 21:00 +0200
                Re: syscall_get_error() && TS_ checks Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-30 21:20 +0200
                Re: syscall_get_error() && TS_ checks Andy Lutomirski <luto@amacapital.net> - 2017-03-30 21:30 +0200
                Re: syscall_get_error() && TS_ checks Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-30 21:30 +0200
            Re: syscall_get_error() && TS_ checks Oleg Nesterov <oleg@redhat.com> - 2017-03-29 21:00 +0200
        Re: syscall_get_error() && TS_ checks Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-29 19:10 +0200
      Re: syscall_get_error() && TS_ checks Andy Lutomirski <luto@amacapital.net> - 2017-03-29 19:10 +0200

csiph-web