linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andy Lutomirski <luto@amacapital.net>,
	Will Drewry <wad@chromium.org>, Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH] tools/testing/selftests/seccomp: change USER_NOTIF_MAGIC definition
Date: Sat, 30 Nov 2019 08:13:01 -0800	[thread overview]
Message-ID: <201911300811.7D70D30@keescook> (raw)
In-Reply-To: <20191129055128.25952-1-jcmvbkbc@gmail.com>

On Thu, Nov 28, 2019 at 09:51:28PM -0800, Max Filippov wrote:
> USER_NOTIF_MAGIC is used to both initialize seccomp_notif_resp::val and
> verify syscall resturn value. On 32-bit architectures syscall return
> value has type long, but the value of USER_NOTIF_MAGIC has type long
> long because it doesn't fit into long. As a result all syscall return
> value comparisons with USER_NOTIF_MAGIC are false. This is also reported
> by the compiler when '-W' is added to CFLAGS.

Hi! Thanks for sending this. There is already a patch in the pipeline
for getting it fixed; it should show up in Linus's tree soon:
https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?h=for-next/seccomp&id=223e660bc7638d126a0e4fbace4f33f2895788c4

-- 
Kees Cook

      reply	other threads:[~2019-11-30 16:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-29  5:51 [PATCH] tools/testing/selftests/seccomp: change USER_NOTIF_MAGIC definition Max Filippov
2019-11-30 16:13 ` Kees Cook [this message]

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=201911300811.7D70D30@keescook \
    --to=keescook@chromium.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=shuah@kernel.org \
    --cc=wad@chromium.org \
    /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).