lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190508084759.GD9224@smile.fi.intel.com>
Date:   Wed, 8 May 2019 11:47:59 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Yury Norov <yury.norov@...il.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Amritha Nambiar <amritha.nambiar@...el.com>,
        Willem de Bruijn <willemb@...gle.com>,
        Kees Cook <keescook@...omium.org>,
        Matthew Wilcox <willy@...radead.org>,
        "Tobin C . Harding" <tobin@...nel.org>,
        Will Deacon <will.deacon@....com>,
        Miklos Szeredi <mszeredi@...hat.com>,
        Vineet Gupta <vineet.gupta1@...opsys.com>,
        Chris Wilson <chris@...is-wilson.co.uk>,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        linux-kernel@...r.kernel.org, Yury Norov <ynorov@...vell.com>,
        Jens Axboe <axboe@...nel.dk>,
        Steffen Klassert <steffen.klassert@...unet.com>
Subject: Re: [PATCH 6/7] lib: new testcases for bitmap_parse{_user}

On Tue, Apr 30, 2019 at 06:06:35PM -0700, Yury Norov wrote:
> New version of bitmap_parse() is unified with bitmap_parse_list(),
> and therefore:
>  - weakens rules on whitespaces and commas between hex chunks;
>  - in addition to \0 allows using \n as the line ending symbol;
>  - allows passing UINT_MAX or any other big number as the length
>    of input string instead of actual string length.
> 
> The patch covers the cases.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

> 
> Signed-off-by: Yury Norov <ynorov@...vell.com>
> ---
>  lib/test_bitmap.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c
> index 731e107d811a..9e6b87895108 100644
> --- a/lib/test_bitmap.c
> +++ b/lib/test_bitmap.c
> @@ -343,14 +343,22 @@ static const unsigned long parse_test2[] __initconst = {
>  };
>  
>  static const struct test_bitmap_parselist parse_tests[] __initconst = {
> +	{0, "",				&parse_test[0 * step], 32, 0},
> +	{0, " ",			&parse_test[0 * step], 32, 0},
>  	{0, "0",			&parse_test[0 * step], 32, 0},
> +	{0, "0\n",			&parse_test[0 * step], 32, 0},
>  	{0, "1",			&parse_test[1 * step], 32, 0},
>  	{0, "deadbeef",			&parse_test[2 * step], 32, 0},
>  	{0, "1,0",			&parse_test[3 * step], 33, 0},
> +	{0, "deadbeef,\n,0,1",		&parse_test[2 * step], 96, 0},
>  
>  	{0, "deadbeef,1,0",		&parse_test2[0 * 2 * step], 96, 0},
>  	{0, "baadf00d,deadbeef,1,0",	&parse_test2[1 * 2 * step], 128, 0},
>  	{0, "badf00d,deadbeef,1,0",	&parse_test2[2 * 2 * step], 124, 0},
> +	{0, "badf00d,deadbeef,1,0",	&parse_test2[2 * 2 * step], 124, NO_LEN},
> +	{0, "  badf00d,deadbeef,1,0  ",	&parse_test2[2 * 2 * step], 124, 0},
> +	{0, " , badf00d,deadbeef,1,0 , ",	&parse_test2[2 * 2 * step], 124, 0},
> +	{0, " , badf00d, ,, ,,deadbeef,1,0 , ",	&parse_test2[2 * 2 * step], 124, 0},
>  
>  	{-EINVAL,    "goodfood,deadbeef,1,0",	NULL, 128, 0},
>  	{-EOVERFLOW, "3,0",			NULL, 33, 0},
> -- 
> 2.17.1
> 

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ