Re: [PATCH v2 2/2] lib/test_bitmap: Fix address space when test user buffer

From: Andrew Morton
Date: Thu Jan 09 2020 - 15:08:17 EST


On Thu, 9 Jan 2020 12:36:01 +0200 Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

> Force address space to avoid the following warning:
>
> lib/test_bitmap.c:461:53: warning: incorrect type in argument 1 (different address spaces)
> lib/test_bitmap.c:461:53: expected char const [noderef] <asn:1> *ubuf
> lib/test_bitmap.c:461:53: got char const *in

We did this in

commit 17b6753ff08bc47f50da09f5185849172c598315
Author: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
AuthorDate: Wed Dec 4 16:53:06 2019 -0800
Commit: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
CommitDate: Wed Dec 4 19:44:14 2019 -0800

lib/test_bitmap: force argument of bitmap_parselist_user() to proper address space

> --- a/lib/test_bitmap.c
> +++ b/lib/test_bitmap.c
> @@ -458,7 +458,8 @@ static void __init __test_bitmap_parse(int is_user)
>
> set_fs(KERNEL_DS);
> time = ktime_get();
> - err = bitmap_parse_user(test.in, len, bmap, test.nbits);
> + err = bitmap_parse_user((__force const char __user *)test.in, len,
> + bmap, test.nbits);
> time = ktime_get() - time;
> set_fs(orig_fs);
> } else {

Except your tree has `test' where mainline has `ptest'. I'm not sure
what has happened here?