Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1207220
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!newsfeed.Update.UU.SE!news.Update.UU.SE!itgate.net!bofh.it!news.nic.it!robomod |
|---|---|
| From | Andy Lutomirski <luto@amacapital.net> |
| Newsgroups | linux.kernel |
| Subject | Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? |
| Date | Fri, 14 Aug 2015 01:00:02 +0200 |
| Message-ID | <pX9DA-q0-19@gated-at.bofh.it> (permalink) |
| References | <pWWdk-6oF-13@gated-at.bofh.it> <pX2sq-74a-3@gated-at.bofh.it> <pX3y9-92-7@gated-at.bofh.it> <pX4kx-1jL-1@gated-at.bofh.it> <pX4Nz-1RR-3@gated-at.bofh.it> <pX5JE-3dG-15@gated-at.bofh.it> <pX8oa-7bD-11@gated-at.bofh.it> <pX8xQ-7ln-21@gated-at.bofh.it> <pX9Dz-q0-7@gated-at.bofh.it> <pX9DA-q0-9@gated-at.bofh.it> |
| X-Original-To | Linus Torvalds <torvalds@linux-foundation.org> |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=WANMK7QYuayAvLZxwKhX0EEj1u+sFd7H/M+b3qaL40I=; b=XvWWYUksqavkHUcvmBLdC8ZNka/Hhye7bSAvOZLj0kjDOnpQtn2VW4dN7gAXGhgMsm I1jYcN2mOWX79GmEPGvh6wEmoFU+TLk7l1E9fARu5WdcB+dja/1oug0s4MRqMZVT8k5o AWlSvb0HuBJMVV3G1ujscdvqMZK5k53jomGBDXJIkZd34KKEVdTimLfCdgNF/+YDcAEN 4HWjtdY6fAVht11HR+xEYnctgBgvwWeenYrj3I+sSifFfmzRjSHv2DX+OC+7bdic7H7T fdREYL9hSUBnpb8x98usOBj89Mpy0efwryKmJJttWWNvbAvdM9pcTmX9qOsupkHhn2Th rDzw== |
| X-Gm-Message-State | ALoCoQmPf7pxZwpjYFvTzr8Ku1AEjqrZ3HCUeoJgigyUTMidPzUzUqXSF15/1fjh3LlX+fi9w0YP |
| X-Received | by 10.182.199.105 with SMTP id jj9mr7741660obc.47.1439506749770; Thu, 13 Aug 2015 15:59:09 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 52 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Denys Vlasenko <dvlasenk@redhat.com>, Kees Cook <keescook@chromium.org>, David Drysdale <drysdale@google.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Will Drewry <wad@chromium.org>, Ingo Molnar <mingo@kernel.org>, Alok Kataria <akataria@vmware.com>, Borislav Petkov <bp@alien8.de>, Alexei Starovoitov <ast@plumgrid.com>, Frederic Weisbecker <fweisbec@gmail.com>, "H. Peter Anvin" <hpa@zytor.com>, Oleg Nesterov <oleg@redhat.com>, Steven Rostedt <rostedt@goodmis.org>, X86 ML <x86@kernel.org> |
| X-Original-Date | Thu, 13 Aug 2015 15:58:50 -0700 |
| X-Original-Message-ID | <CALCETrUCXkKvD2K+U2WcGg6-7aJgqJuc99NbUzH9egAFx7Supw@mail.gmail.com> |
| X-Original-References | <CAHse=S8UeYVJqRBx-_wf=jeDERTJxzM=YRH5izBpQnrCHOxcDA@mail.gmail.com> <55CCB510.3060807@redhat.com> <CAHse=S8BrL6KeQL9gwa=9TH0nqWrNxq7rcHc--pAVriG+pxBmA@mail.gmail.com> <CALCETrXP0bH9nhh=aOPsiA-Bs0zNW_0xbXFhvbMPZeDV71VtZA@mail.gmail.com> <CAHse=S8OuPb4KFWBXJS6c9YdGPEH8MgpbWJ5qP79r04+4rK2Fw@mail.gmail.com> <CAGXu5j+gXShOAdK93KuVide93VYA_ObyjbK-zb7CwgOLc2JCnQ@mail.gmail.com> <55CD0DAC.9080809@redhat.com> <CALCETrWj6X+zCX47iHip0Qjp88p7f3p0uWvskL357XCyvPrXVA@mail.gmail.com> <CA+55aFyA9+16Jer2nKMOs6_uhRA-egvFDSR8fgNoD9AuPLE4GQ@mail.gmail.com> <CA+55aFx6Ade9UwDQ2KgsQgVMog+B9VXNYqrb1vm+EvBbkazhuA@mail.gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1207220 |
Show key headers only | View raw
On Thu, Aug 13, 2015 at 3:54 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Thu, Aug 13, 2015 at 3:49 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>>
>> Does the attached patch make sense and work?
>
> Btw, I'm not all that happy with it anyway.
>
> I still think Denys' patch also potentially changed what audit and
> strace see for %rax in the pt_regs to -ENOSYS, which I'm not convinced
> is a good change.
For better for for worse, the native 64-bit path changed several
versions agi, and nothing broke that I'm aware of. The change was:
commit 54eea9957f5763dd1a2555d7e4cb53b4dd389cc6
Author: Andy Lutomirski <luto@amacapital.net>
Date: Fri Sep 5 15:13:55 2014 -0700
x86_64, entry: Treat regs->ax the same in fastpath and slowpath syscalls
AFAIK, ptrace has always seen ax == -ENOSYS on syscall entry for
native 64-bit syscalls. My change just simplified the fast path
(which is invisible by ptrace for obvious reasons, unless someone
traces fork or something along those lines *without*) and made it less
different from the slow path. (IIRC it also simplified some stuff
down the road.)
Looking at 3.19's ia32entry.S, it has:
sysenter_tracesys:
#ifdef CONFIG_AUDITSYSCALL
testl $(_TIF_WORK_SYSCALL_ENTRY &
~_TIF_SYSCALL_AUDIT),TI_flags+THREAD_INFO(%rsp,RIP-ARGOFFSET)
jz sysenter_auditsys
#endif
SAVE_REST
CLEAR_RREGS
movq $-ENOSYS,RAX(%rsp)/* ptrace can change this for a bad syscall */
So I think it's always been the intent and practice that ptracers
would see ax == -ENOSYS on syscall entry.
IOW, whether this is good or bad, I don't think it's really a change.
--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? David Drysdale <drysdale@google.com> - 2015-08-13 10:40 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? Denys Vlasenko <dvlasenk@redhat.com> - 2015-08-13 17:20 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? David Drysdale <drysdale@google.com> - 2015-08-13 18:30 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? Andy Lutomirski <luto@amacapital.net> - 2015-08-13 19:20 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? David Drysdale <drysdale@google.com> - 2015-08-13 19:50 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? Kees Cook <keescook@chromium.org> - 2015-08-13 20:50 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? Denys Vlasenko <dvlasenk@redhat.com> - 2015-08-13 23:40 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? Andy Lutomirski <luto@amacapital.net> - 2015-08-13 23:50 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? Kees Cook <keescook@chromium.org> - 2015-08-14 01:00 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? Andy Lutomirski <luto@amacapital.net> - 2015-08-14 01:10 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? Kees Cook <keescook@chromium.org> - 2015-08-14 01:20 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-14 01:40 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? Denys Vlasenko <dvlasenk@redhat.com> - 2015-08-14 14:00 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? Andy Lutomirski <luto@amacapital.net> - 2015-08-14 16:30 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? David Drysdale <drysdale@google.com> - 2015-08-14 09:40 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-14 01:00 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? Andy Lutomirski <luto@amacapital.net> - 2015-08-14 01:00 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-14 01:30 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-14 01:00 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? Linus Torvalds <torvalds@linux-foundation.org> - 2015-08-14 00:30 +0200
Re: [Regression v4.2 ?] 32-bit seccomp-BPF returned errno values wrong in VM? Denys Vlasenko <dvlasenk@redhat.com> - 2015-08-14 13:30 +0200
csiph-web