From: "Dmitry V. Levin" <ldv@altlinux.org>
To: Tycho Andersen <tycho@tycho.ws>
Cc: Kees Cook <keescook@chromium.org>,
Oleg Nesterov <oleg@redhat.com>,
linux-api@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] seccomp, ptrace: switch get_metadata types to arch independent
Date: Wed, 21 Feb 2018 06:17:34 +0300 [thread overview]
Message-ID: <20180221031734.GA27173@altlinux.org> (raw)
In-Reply-To: <20180221024747.9659-2-tycho@tycho.ws>
[-- Attachment #1: Type: text/plain, Size: 1635 bytes --]
On Tue, Feb 20, 2018 at 07:47:45PM -0700, Tycho Andersen wrote:
> Commit 26500475ac1b ("ptrace, seccomp: add support for retrieving seccomp
> metadata") introduced `struct seccomp_metadata`, which contained unsigned
> longs that should be arch independent. The type of the flags member was
> chosen to match the corresponding argument to seccomp(), and so we need
> something at least as big as unsigned long. My understanding is that __u64
> should fit the bill, so let's switch both types to that.
>
> While this is userspace facing, it was only introduced in 4.16-rc2, and so
> should be safe assuming it goes in before then.
>
> Reported-by: "Dmitry V. Levin" <ldv@altlinux.org>
> Signed-off-by: Tycho Andersen <tycho@tycho.ws>
> CC: Kees Cook <keescook@chromium.org>
> CC: Oleg Nesterov <oleg@redhat.com>
> ---
> include/uapi/linux/ptrace.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/uapi/linux/ptrace.h b/include/uapi/linux/ptrace.h
> index e46d82b91166..d5a1b8a492b9 100644
> --- a/include/uapi/linux/ptrace.h
> +++ b/include/uapi/linux/ptrace.h
> @@ -69,8 +69,8 @@ struct ptrace_peeksiginfo_args {
> #define PTRACE_SECCOMP_GET_METADATA 0x420d
>
> struct seccomp_metadata {
> - unsigned long filter_off; /* Input: which filter */
> - unsigned int flags; /* Output: filter's flags */
> + __u64 filter_off; /* Input: which filter */
> + __u64 flags; /* Output: filter's flags */
> };
>
> /* Read signals from a shared (process wide) queue */
That's much better, thanks.
Reviewed-by: "Dmitry V. Levin" <ldv@altlinux.org>
--
ldv
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2018-02-21 3:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 2:47 [PATCH 0/3] some fixups for PTRACE_SECCOMP_GET_METADATA Tycho Andersen
2018-02-21 2:47 ` [PATCH 1/3] seccomp, ptrace: switch get_metadata types to arch independent Tycho Andersen
2018-02-21 3:17 ` Dmitry V. Levin [this message]
2018-02-21 2:47 ` [PATCH 2/3] ptrace, seccomp: tweak get_metadata behavior slightly Tycho Andersen
2018-02-21 2:47 ` [PATCH 3/3] seccomp: add a selftest for get_metadata Tycho Andersen
2018-02-22 1:05 ` [PATCH 0/3] some fixups for PTRACE_SECCOMP_GET_METADATA 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=20180221031734.GA27173@altlinux.org \
--to=ldv@altlinux.org \
--cc=keescook@chromium.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=tycho@tycho.ws \
/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