Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752988AbbDRLRw (ORCPT ); Sat, 18 Apr 2015 07:17:52 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:35010 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752083AbbDRLRu (ORCPT ); Sat, 18 Apr 2015 07:17:50 -0400 MIME-Version: 1.0 Reply-To: mtk.manpages@gmail.com In-Reply-To: <5522A66F.9060606@gmail.com> References: <5522A66F.9060606@gmail.com> From: "Michael Kerrisk (man-pages)" Date: Sat, 18 Apr 2015 13:17:28 +0200 Message-ID: Subject: Re: [patch] seccomp.2: Note that memory area is read-only To: "CC: Kees Cook" Cc: Michael Kerrisk , "linux-man@vger.kernel.org" , lkml Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1747 Lines: 63 Hi Kees, Ping! Cheers, Michael On 6 April 2015 at 17:29, Michael Kerrisk (man-pages) wrote: > Hi Kees, > > I recently was asked about the point below, and had to go check the code > to be sure, since the man page said nothing. It would be good to have > a confirmation: the seccomp_data buffer supplied to a seccomp BPF program > is read-only, right? (That is, one can't write to the buffer in order to > change the arguments that a system call actually receives.) > > A small man page patch below. > > Cheers, > > Michael > > --- a/man2/seccomp.2 > +++ b/man2/seccomp.2 > @@ -232,15 +232,15 @@ struct sock_filter { /* Filter block */ > }; > .fi > .in > > When executing the instructions, the BPF program operates on the > system call information made available (i.e., use the > .BR BPF_ABS > -addressing mode) as a buffer of the following form: > +addressing mode) as a (read-only) buffer of the following form: > > .in +4n > .nf > struct seccomp_data { > int nr; /* System call number */ > __u32 arch; /* AUDIT_ARCH_* value > (see ) */ > > > -- > Michael Kerrisk > Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ > Linux/UNIX System Programming Training: http://man7.org/training/ -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- 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/