[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACT4Y+YEa+mAH_RcYGRx=H=nk_VDB223_sKg3ZV7CHbm2ftiqw@mail.gmail.com>
Date: Thu, 22 Oct 2020 17:01:44 +0200
From: Dmitry Vyukov <dvyukov@...gle.com>
To: Marco Elver <elver@...gle.com>
Cc: "Paul E. McKenney" <paulmck@...nel.org>,
Mark Rutland <mark.rutland@....com>,
kasan-dev <kasan-dev@...glegroups.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] kcsan: selftest: Ensure that address is at least PAGE_SIZE
On Thu, Oct 22, 2020 at 1:45 PM Marco Elver <elver@...gle.com> wrote:
>
> In preparation of supporting only addresses not within the NULL page,
> change the selftest to never use addresses that are less than PAGE_SIZE.
>
> Signed-off-by: Marco Elver <elver@...gle.com>
Reviewed-by: Dmitry Vyukov <dvyukov@...gle.com>
> ---
> v2:
> * Introduce patch to series.
> ---
> kernel/kcsan/selftest.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/kernel/kcsan/selftest.c b/kernel/kcsan/selftest.c
> index d98bc208d06d..9014a3a82cf9 100644
> --- a/kernel/kcsan/selftest.c
> +++ b/kernel/kcsan/selftest.c
> @@ -33,6 +33,9 @@ static bool test_encode_decode(void)
> unsigned long addr;
>
> prandom_bytes(&addr, sizeof(addr));
> + if (addr < PAGE_SIZE)
> + addr = PAGE_SIZE;
> +
> if (WARN_ON(!check_encodable(addr, size)))
> return false;
>
> --
> 2.29.0.rc1.297.gfa9743e501-goog
>
Powered by blists - more mailing lists