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] [day] [month] [year] [list]
Date: Wed, 15 Nov 2023 20:00:00 -0800
From: Joe Perches <joe@...ches.com>
To: David Howells <dhowells@...hat.com>, Christian Brauner
	 <christian@...uner.io>
Cc: Jens Axboe <axboe@...nel.dk>, Al Viro <viro@...iv.linux.org.uk>, Linus
 Torvalds <torvalds@...ux-foundation.org>, Christoph Hellwig <hch@....de>,
 David Laight <David.Laight@...LAB.COM>, Matthew Wilcox
 <willy@...radead.org>, Brendan Higgins <brendanhiggins@...gle.com>, David
 Gow <davidgow@...gle.com>,  linux-fsdevel@...r.kernel.org,
 linux-block@...r.kernel.org, linux-mm@...ck.org,  netdev@...r.kernel.org,
 linux-kselftest@...r.kernel.org,  kunit-dev@...glegroups.com,
 linux-kernel@...r.kernel.org, Johannes Thumshirn
 <Johannes.Thumshirn@....com>, Christian Brauner <brauner@...nel.org>, David
 Hildenbrand <david@...hat.com>, John Hubbard <jhubbard@...dia.com>
Subject: Re: [PATCH v3 01/10] iov_iter: Fix some checkpatch complaints in
 kunit tests

On Wed, 2023-11-15 at 15:49 +0000, David Howells wrote:
> Fix some checkpatch complaints in the new iov_iter kunit tests:
> 
>  (1) Some lines had eight spaces instead of a tab at the start.
> 
>  (2) Checkpatch doesn't like (void*)(unsigned long)0xnnnnnULL, so switch to
>      using POISON_POINTER_DELTA plus an offset instead.

That's because checkpatch is fundamentally stupid and
that's a false positive.

> diff --git a/lib/kunit_iov_iter.c b/lib/kunit_iov_iter.c
[]
> @@ -548,7 +548,7 @@ static void __init iov_kunit_extract_pages_kvec(struct kunit *test)
>  		size_t offset0 = LONG_MAX;
>  
>  		for (i = 0; i < ARRAY_SIZE(pagelist); i++)
> -			pagelist[i] = (void *)(unsigned long)0xaa55aa55aa55aa55ULL;
> +			pagelist[i] = (void *)POISON_POINTER_DELTA + 0x5a;

I think the original is easier to understand
or would best be replaced by a single #define
without the addition.

> @@ -626,7 +626,7 @@ static void __init iov_kunit_extract_pages_bvec(struct kunit *test)
>  		size_t offset0 = LONG_MAX;
>  
>  		for (i = 0; i < ARRAY_SIZE(pagelist); i++)
> -			pagelist[i] = (void *)(unsigned long)0xaa55aa55aa55aa55ULL;
> +			pagelist[i] = (void *)POISON_POINTER_DELTA + 0x5a;

etc...


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ