This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v4 1/4] lib: introduce copy_struct_from_user() helper
- From: Kees Cook <keescook at chromium dot org>
- To: Aleksa Sarai <cyphar at cyphar dot com>
- Cc: Michael Ellerman <mpe at ellerman dot id dot au>, Ingo Molnar <mingo at redhat dot com>, Peter Zijlstra <peterz at infradead dot org>, Alexander Shishkin <alexander dot shishkin at linux dot intel dot com>, Jiri Olsa <jolsa at redhat dot com>, Namhyung Kim <namhyung at kernel dot org>, Christian Brauner <christian at brauner dot io>, Rasmus Villemoes <linux at rasmusvillemoes dot dk>, Al Viro <viro at zeniv dot linux dot org dot uk>, Linus Torvalds <torvalds at linux-foundation dot org>, libc-alpha at sourceware dot org, linux-api at vger dot kernel dot org, linux-kernel at vger dot kernel dot org
- Date: Thu, 10 Oct 2019 09:43:26 -0700
- Subject: Re: [PATCH v4 1/4] lib: introduce copy_struct_from_user() helper
- References: <20191001011055.19283-1-cyphar@cyphar.com> <20191001011055.19283-2-cyphar@cyphar.com> <87eezkx2y7.fsf@mpe.ellerman.id.au> <20191010114007.o3bygjf4jlfk242e@yavin.dot.cyphar.com>
On Thu, Oct 10, 2019 at 10:40:07PM +1100, Aleksa Sarai wrote:
> Yeah, it takes about 5-10s on my laptop. We could switch it to just
> everything within a 4K block, but the main reason for testing with
> 2*PAGE_SIZE is to make sure that check_nonzero_user() works across page
> boundaries. Though we could only do check_nonzero_user() in the region
> of the page boundary (maybe i E (PAGE_SIZE-512,PAGE_SIZE+512]?)
Yeah, I like this idea: just poke at the specific edge-case.
--
Kees Cook