linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@amacapital.net>
To: AKASHI Takahiro <takahiro.akashi@linaro.org>,
	wad@chromium.org, catalin.marinas@arm.com, will.deacon@arm.com,
	keescook@chromium.org
Cc: dsaxena@linaro.org, linux-arm-kernel@lists.infradead.org,
	linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/3] asm-generic: Add generic seccomp.h for secure computing mode 1
Date: Wed, 23 Jul 2014 20:40:26 -0700	[thread overview]
Message-ID: <53D0802A.7070703@amacapital.net> (raw)
In-Reply-To: <1406020499-5537-3-git-send-email-takahiro.akashi@linaro.org>

On 07/22/2014 02:14 AM, AKASHI Takahiro wrote:
> Those values (__NR_seccomp_*) are used solely in secure_computing()
> to identify mode 1 system calls. If compat system calls have different
> syscall numbers, asm/seccomp.h may override them.
>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> ---
>   include/asm-generic/seccomp.h |   28 ++++++++++++++++++++++++++++
>   1 file changed, 28 insertions(+)
>   create mode 100644 include/asm-generic/seccomp.h
>
> diff --git a/include/asm-generic/seccomp.h b/include/asm-generic/seccomp.h
> new file mode 100644
> index 0000000..5e97022
> --- /dev/null
> +++ b/include/asm-generic/seccomp.h
> @@ -0,0 +1,28 @@
> +/*
> + * include/asm-generic/seccomp.h
> + *
> + * Copyright (C) 2014 Linaro Limited
> + * Author: AKASHI Takahiro <takahiro.akashi@linaro.org>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +#ifndef _ASM_GENERIC_SECCOMP_H
> +#define _ASM_GENERIC_SECCOMP_H
> +
> +#include <asm-generic/unistd.h>
> +
> +#if defined(CONFIG_COMPAT) && !defined(__NR_seccomp_read_32)
> +#define __NR_seccomp_read_32		__NR_read
> +#define __NR_seccomp_write_32		__NR_write
> +#define __NR_seccomp_exit_32		__NR_exit
> +#define __NR_seccomp_sigreturn_32	__NR_rt_sigreturn
> +#endif /* CONFIG_COMPAT && ! already defined */
> +
> +#define __NR_seccomp_read		__NR_read
> +#define __NR_seccomp_write		__NR_write
> +#define __NR_seccomp_exit		__NR_exit
> +#define __NR_seccomp_sigreturn		__NR_rt_sigreturn

I don't like these names.  __NR_seccomp_read sounds like the number of a 
syscall called seccomp_read.

Also, shouldn't something be including this header?  I'm confused.

--Andy

  reply	other threads:[~2014-07-24  3:40 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-22  9:14 [PATCH v5 0/3] arm64: Add seccomp support AKASHI Takahiro
2014-07-22  9:14 ` [PATCH v5 1/3] arm64: ptrace: reload a syscall number after ptrace operations AKASHI Takahiro
2014-07-22 20:15   ` Kees Cook
2014-07-23  7:03     ` AKASHI Takahiro
2014-07-23  8:25       ` Will Deacon
2014-07-23  9:09         ` AKASHI Takahiro
2014-07-23 15:13       ` Kees Cook
2014-07-24  3:54   ` Andy Lutomirski
2014-07-24  5:57     ` AKASHI Takahiro
2014-07-24 15:01       ` Andy Lutomirski
2014-07-25 10:36         ` AKASHI Takahiro
2014-07-25 11:03           ` Will Deacon
2014-07-29  6:49             ` AKASHI Takahiro
2014-07-29 13:26               ` Will Deacon
2014-07-22  9:14 ` [PATCH v5 2/3] asm-generic: Add generic seccomp.h for secure computing mode 1 AKASHI Takahiro
2014-07-24  3:40   ` Andy Lutomirski [this message]
2014-07-24  4:41     ` Kees Cook
2014-07-24  5:17       ` AKASHI Takahiro
2014-07-24 14:57         ` Andy Lutomirski
2014-07-25  8:52           ` AKASHI Takahiro
2014-07-22  9:14 ` [PATCH v5 3/3] arm64: Add seccomp support AKASHI Takahiro
2014-07-24  3:52   ` Andy Lutomirski
2014-07-24  5:40     ` AKASHI Takahiro
2014-07-24 15:00       ` Andy Lutomirski
2014-07-24 15:16         ` Catalin Marinas
2014-07-25  9:37         ` AKASHI Takahiro
2014-08-05 15:08           ` Kees Cook
2014-08-08  7:35             ` AKASHI Takahiro
2014-08-11  9:24               ` Will Deacon
2014-08-12  6:57                 ` AKASHI Takahiro
2014-08-12  9:40                   ` Will Deacon
2014-08-12 11:17                     ` AKASHI Takahiro
2014-08-15 14:33                       ` Will Deacon
2014-07-22 20:16 ` [PATCH v5 0/3] " Kees Cook
2014-07-23  7:09   ` AKASHI Takahiro
2014-07-23 15:36     ` Kees Cook

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 \
    --in-reply-to=53D0802A.7070703@amacapital.net \
    --to=luto@amacapital.net \
    --cc=catalin.marinas@arm.com \
    --cc=dsaxena@linaro.org \
    --cc=keescook@chromium.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=takahiro.akashi@linaro.org \
    --cc=wad@chromium.org \
    --cc=will.deacon@arm.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).