From: Harald Freudenberger <freude@linux.ibm.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
hca@linux.ibm.com, gor@linux.ibm.com, borntraeger@de.ibm.com
Subject: Re: [PATCH] s390/zcrypt: remove set_fs() invocation in zcrypt device driver
Date: Mon, 14 Sep 2020 09:36:07 +0200 [thread overview]
Message-ID: <e367fef4-1634-7b8e-0ef5-4cdc108edadd@linux.ibm.com> (raw)
In-Reply-To: <20200911062134.GB21597@lst.de>
On 11.09.20 08:21, Christoph Hellwig wrote:
> On Thu, Sep 10, 2020 at 12:28:38PM +0200, Harald Freudenberger wrote:
>> +static inline unsigned long z_copy_from_user(bool userspace,
>> + void *to, const void __user *from, unsigned long n)
> Can you avoid the pointless long lines in the function declaration?
Yes, will do.
>
>> +{
>> + if (likely(userspace))
>> + return copy_from_user(to, from, n);
>> + memcpy(to, (void __force *) from, n);
>> + return 0;
>> +}
>> +
>> +static inline unsigned long z_copy_to_user(bool userspace,
>> + void __user *to, const void *from, unsigned long n)
>> +{
>> + if (likely(userspace))
>> + return copy_to_user(to, from, n);
>> + memcpy((void __force *) to, from, n);
>> + return 0;
> Otherwise this doesn't look great, but also not horrible and gets rid
> of the set_fs while reducing the lines of code, so:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
Christoph, maybe you have a greater idea on how to solve this. So don't hesitate and tell me.
Otherwise how to we provide this fix then ? My recommendation would be to go the 'usual' way:
Commit this s390 internal and then let this go out with the next kernel merge window when
next time Linus is pulling patches from the s390 subsystem for the 5.10 kernel development cycle.
next prev parent reply other threads:[~2020-09-14 7:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-10 10:28 [PATCH] s390/zcrypt: remove set_fs() invocation in zcrypt device driver Harald Freudenberger
2020-09-11 6:21 ` Christoph Hellwig
2020-09-14 7:36 ` Harald Freudenberger [this message]
2020-09-14 7:55 ` Heiko Carstens
2020-09-15 9:50 ` Harald Freudenberger
2020-09-15 6:39 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e367fef4-1634-7b8e-0ef5-4cdc108edadd@linux.ibm.com \
--to=freude@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox