From: Gabriel Krisman Bertazi <email@example.com> To: Pavel Machek <firstname.lastname@example.org> Cc: email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com Subject: Re: [PATCH v4 0/2] Syscall User Redirection Date: Tue, 04 Aug 2020 10:26:56 -0400 [thread overview] Message-ID: <firstname.lastname@example.org> (raw) In-Reply-To: <20200802120115.GC1289@bug> (Pavel Machek's message of "Sun, 2 Aug 2020 14:01:15 +0200") Pavel Machek <email@example.com> writes: > Hi! > >> This is v4 of Syscall User Redirection. The implementation itself is >> not modified from v3, it only applies the latest round of reviews to the >> selftests. >> >> __NR_syscalls is not really exported in header files other than >> asm-generic for every architecture, so it felt safer to optionally >> expose it with a fallback to a high value. >> >> Also, I didn't expose tests for PR_GET as that is not currently >> implemented. If possible, I'd have it supported by a future patchset, >> since it is not immediately necessary to support this feature. >> >> Finally, one question: Which tree would this go through? > > Should it come with Documentation? Hi, Thanks for the review. I will prepare it for the next iteration. > How does it interact with ptrace, seccomp and similar? That is a very good question. Regarding seccomp, this must take precedence, since the use case is emulation (it can be invoked with a different ABI) such that seccomp filtering by syscall number doesn't make sense in the first place. In addition, either the syscall is dispatched back to userspace, in which case there is no resource for seccomp to protect, or the syscall will be executed, and seccomp will execute next. Regarding ptrace, I experimented with before and after, and while the same ABI argument applies, I felt it was easier to debug if I let ptrace happen for syscalls that are dispatched back to userspace. In addition, doing it after ptrace makes the code in syscall_exit_work slightly simpler, since it doesn't require special handling for this feature. For PTRACE_SYSEMU in particular, either placing this before or after is a bit odd. I don't think there is a right answer for this one, but I don't see anyone wanting to use these features at the same time. I think as long as it is documented behavior, it should be fine either way. -- Gabriel Krisman Bertazi
prev parent reply other threads:[~2020-08-04 14:27 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-16 19:31 Gabriel Krisman Bertazi 2020-07-16 19:31 ` [PATCH v4 1/2] kernel: Implement selective syscall userspace redirection Gabriel Krisman Bertazi 2020-07-16 21:06 ` Matthew Wilcox 2020-07-16 21:26 ` Kees Cook 2020-07-17 0:20 ` Andy Lutomirski 2020-07-17 2:15 ` Gabriel Krisman Bertazi 2020-07-17 4:48 ` Andy Lutomirski 2020-07-21 12:06 ` Mark Rutland 2020-07-20 9:23 ` Thomas Gleixner 2020-07-20 9:44 ` Will Deacon 2020-07-20 10:08 ` Thomas Gleixner 2020-07-20 13:46 ` Gabriel Krisman Bertazi 2020-07-16 19:31 ` [PATCH v4 2/2] selftests: Add kselftest for syscall user dispatch Gabriel Krisman Bertazi 2020-07-16 20:04 ` [PATCH v4 0/2] Syscall User Redirection Kees Cook 2020-07-16 20:22 ` Christian Brauner 2020-07-16 20:25 ` Kees Cook 2020-07-16 20:29 ` Christian Brauner 2020-07-16 20:30 ` Gabriel Krisman Bertazi 2020-07-16 21:06 ` Carlos O'Donell 2020-08-02 12:01 ` Pavel Machek 2020-08-04 14:26 ` Gabriel Krisman Bertazi [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [PATCH v4 0/2] Syscall User Redirection' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).