[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201016065403.GA9343@infradead.org>
Date: Fri, 16 Oct 2020 07:54:03 +0100
From: Christoph Hellwig <hch@...radead.org>
To: "Christopher M. Riedl" <cmr@...efail.de>
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
viro@...iv.linux.org.uk
Subject: Re: [PATCH 1/8] powerpc/uaccess: Add unsafe_copy_from_user
On Thu, Oct 15, 2020 at 10:01:52AM -0500, Christopher M. Riedl wrote:
> Implement raw_copy_from_user_allowed() which assumes that userspace read
> access is open. Use this new function to implement raw_copy_from_user().
> Finally, wrap the new function to follow the usual "unsafe_" convention
> of taking a label argument. The new raw_copy_from_user_allowed() calls
> __copy_tofrom_user() internally, but this is still safe to call in user
> access blocks formed with user_*_access_begin()/user_*_access_end()
> since asm functions are not instrumented for tracing.
Please also add a fallback unsafe_copy_from_user to linux/uaccess.h
so this can be used as a generic API.
Powered by blists - more mailing lists