From: Luis Chamberlain <mcgrof@kernel.org>
To: Zev Weiss <zev@bewilderbeest.net>
Cc: Kees Cook <keescook@chromium.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org, akpm@linux-foundation.org,
yzaikin@google.com, brendanhiggins@google.com
Subject: Re: [PATCH 1/2] test_sysctl: add tests for >32-bit values written to 32-bit integers
Date: Wed, 6 Feb 2019 11:52:02 -0800 [thread overview]
Message-ID: <20190206195202.GF11489@garbanzo.do-not-panic.com> (raw)
Thanks for the patches, please include akpm@linux-foundation.org in the
future, as we can merge the changes through Andrew as well.
Also please Cc yzaikin@google.com, brendanhiggins@google.com in follow
ups for now. They are looking at the sysctl testing code as well.
Some feedback below:
In-Reply-To: <20181227111231.12912-2-zev@bewilderbeest.net>
On Thu, Dec 27, 2018 at 05:12:29AM -0600, Zev Weiss wrote:
> +run_wideint_tests()
> +{
> + # check negative and positive 64-bit values, with and without
> + # bits set in the lower 31, and with and without bit 31 (sign
> + # bit of a 32-bit int) set. None of these are representable
> + # in 32 bits, and hence all should fail.
> + check_failure 0x0000010000000000
> + check_failure 0x0000010080000000
> + check_failure 0x000001ff7fffffff
> + check_failure 0x000001ffffffffff
> + check_failure 0xffffffff7fffffff
> + check_failure 0xffffffffffffffff
This s64 version of -1
> + check_failure 0xffffff0000000000
> + check_failure 0xffffff0080000000
> +}
It was still unclear from the comments and manually looking at the
values why they are clear candidates to always test from all respective
64-bit values. A comment per each would be useful.
Luis
next reply other threads:[~2019-02-06 19:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-06 19:52 Luis Chamberlain [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-12-27 11:12 [PATCH 0/2] sysctl: fix range-checking in do_proc_dointvec_minmax_conv() Zev Weiss
2018-12-27 11:12 ` [PATCH 1/2] test_sysctl: add tests for >32-bit values written to 32-bit integers Zev Weiss
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=20190206195202.GF11489@garbanzo.do-not-panic.com \
--to=mcgrof@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=brendanhiggins@google.com \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=yzaikin@google.com \
--cc=zev@bewilderbeest.net \
/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).