From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Subject: Re: [RFC,PATCH 1/2] seccomp_filters: system call filtering using BPF Date: Thu, 12 Jan 2012 18:23:15 +0100 Message-ID: <20120112172315.GA26295@redhat.com> References: <1326302710-9427-1-git-send-email-wad@chromium.org> <1326302710-9427-2-git-send-email-wad@chromium.org> <20120112162231.GA23960@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-kernel@vger.kernel.org, keescook@chromium.org, john.johansen@canonical.com, serge.hallyn@canonical.com, coreyb@linux.vnet.ibm.com, pmoore@redhat.com, eparis@redhat.com, djm@mindrot.org, torvalds@linux-foundation.org, segoon@openwall.com, rostedt@goodmis.org, jmorris@namei.org, scarybeasts@gmail.com, avi@redhat.com, penberg@cs.helsinki.fi, viro@zeniv.linux.org.uk, luto@mit.edu, mingo@elte.hu, akpm@linux-foundation.org, khilman@ti.com, borislav.petkov@amd.com, amwang@redhat.com, ak@linux.intel.com, eric.dumazet@gmail.com, gregkh@suse.de, dhowells@redhat.com, daniel.lezcano@free.fr, linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org, olofj@chromium.org, mhalcrow@google.com, dlaor@redhat.com To: Will Drewry Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-security-module-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 01/12, Will Drewry wrote: > > On Thu, Jan 12, 2012 at 10:22 AM, Oleg Nesterov wro= te: > >> + =A0 =A0 =A0*/ > >> + =A0 =A0 regs =3D seccomp_get_regs(regs_tmp, ®s_size); > > > > Stupid question. I am sure you know what are you doing ;) and I kno= w > > nothing about !x86 arches. > > > > But could you explain why it is designed to use user_regs_struct ? > > Why we can't simply use task_pt_regs() and avoid the (costly) regse= ts? > > So on x86 32, it would work since user_regs_struct =3D=3D task_pt_reg= s > (iirc), but on x86-64 > and others, that's not true. Yes sure, I meant that userpace should use pt_regs too. > If it would be appropriate to expose pt_regs to userspace, then I'd > happily do so :) Ah, so that was the reason. But it is already exported? At least I see the "#ifndef __KERNEL__" definition in arch/x86/include/asm/ptrace.h. Once again, I am not arguing, just trying to understand. And I do not know if this definition is part of abi. Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-securit= y-module" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html