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]
Message-ID: <87vb0a3hk5.fsf@belgarion.home>
Date:	Tue, 12 Jul 2016 19:14:02 +0200
From:	Robert Jarzmik <robert.jarzmik@...e.fr>
To:	Mark Brown <broonie@...nel.org>
Cc:	"Franklin S Cooper Jr." <fcooper@...com>,
	Andy Shevchenko <andy.shevchenko@...il.com>,
	david.s.gordon@...el.com, Jens Axboe <axboe@...com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ming Lin <ming.l@....samsung.com>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-spi <linux-spi@...r.kernel.org>,
	Sekhar Nori <nsekhar@...com>,
	Peter Ujfalusi <peter.ujfalusi@...com>
Subject: Re: [RFC] [PATCH v2 1/3] scatterlist: Add support to clone scatterlist

Mark Brown <broonie@...nel.org> writes:

> On Thu, Jul 07, 2016 at 07:43:25PM +0200, Robert Jarzmik wrote:
>
>> I'll try, but I don't trust much my chances of success, given that this tester :
>>  - should compile and link in $(TOP)/lib/scatterlist.c, as this is where
>>    sg_split() is defined
>>  - this implies all its includes
>>  - this implies at least these ones :
>> 	bug.h
>> 	mm.h
>> 	scatterlist.h
>> 	string.h
>> 	types.h
>>  - this implies having page_to_phys and co. defined somewhere without
>>    draining the whole include/linux and include/asm* trees
>
>> For the tester, I had created an apart include/linux tree where all the includes
>> were _manually_ filled in with minimal content.
>
>> I don't know if an existing selftest had already this kind of problem,
>> ie. having to compile and link a kernel .c file, and that makes me feel this
>> might be difficult to keep a nice standalone tester.
>
> Right, that's messy :(  Could it be refactored as a boot/module load
> time test so it could be built in the kernel environment?  Less
> convenient to use (though KVM/UML help) but easier to build.

Actually I thought a bit about it and I got a "messy" idea.

In order to keep things in userspace (for tests it really is more convenient),
I'm going to try this approach :
 - make tools/testing/selftests/lib/sg_split.c, based on the tester
 - make the Makefile generate a scatterlist_generated.c out of lib/scatterlist.c,
   where all the includes will be 'grepped; out and replaced by a single "#include
   sg_split.h" containing all the necessary defines
 - create the sg_split.h as a concatenation of all the .h files I had to use for
   the tester (I will reuse existing .h if it is applicable)

We'll see if that's feasible or not. As long as the "mess" is contained within
sg_split.h, and if it doesn't become a too ugly beast, it might work.

Cheers.

-- 
Robert

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ