Thread (34 messages) 34 messages, 4 authors, 2018-11-30

Re: [PATCH v8 1/2] seccomp: add a return code to trap to userspace

From: Oleg Nesterov <oleg@redhat.com>
Date: 2018-10-30 16:27:59
Also in: lkml

On 10/30, Tycho Andersen wrote:
quoted hunk ↗ jump to hunk
@@ -828,6 +823,11 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd,
 	 */
 	rmb();
 
+	if (!sd) {
+		populate_seccomp_data(&sd_local);
+		sd = &sd_local;
+	}
+
To me it would be more clean to remove the "if (!sd)" check, case(SECCOMP_RET_TRACE)
in __seccomp_filter() can simply do populate_seccomp_data(&sd_local) unconditionally
and pass &sd_local to __seccomp_filter().

Oleg.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help