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] [thread-next>] [day] [month] [year] [list]
Message-ID: <e367fef4-1634-7b8e-0ef5-4cdc108edadd@linux.ibm.com>
Date:   Mon, 14 Sep 2020 09:36:07 +0200
From:   Harald Freudenberger <freude@...ux.ibm.com>
To:     Christoph Hellwig <hch@....de>
Cc:     linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org,
        hca@...ux.ibm.com, gor@...ux.ibm.com, borntraeger@...ibm.com
Subject: Re: [PATCH] s390/zcrypt: remove set_fs() invocation in zcrypt device
 driver

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@....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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ