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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4dd209b7-0c56-4782-880e-4642516dbf1b@intel.com>
Date: Wed, 16 Apr 2025 09:55:59 -0700
From: "Chang S. Bae" <chang.seok.bae@...el.com>
To: Ingo Molnar <mingo@...nel.org>
CC: <mingo@...hat.com>, <linux-kernel@...r.kernel.org>, <x86@...nel.org>,
	<tglx@...utronix.de>, <bp@...en8.de>, <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH 07/10] x86/fpu: Refactor xfeature bitmask update code for
 sigframe XSAVE

On 4/16/2025 1:05 AM, Ingo Molnar wrote:
> 
> * Chang S. Bae <chang.seok.bae@...el.com> wrote:
> 
>> +static inline int set_xfeature_in_sigframe(struct xregs_state __user *xbuf, u64 mask)
>> +{
>> +	u64 xfeatures;
>> +	int err;
>> +
>> +	/* Read the xfeatures value already saved in the user buffer */
>> +	err  = __get_user(xfeatures, &xbuf->header.xfeatures);
>> +	xfeatures |= mask;
>> +	err |= __put_user(xfeatures, &xbuf->header.xfeatures);
>> +	return err;
>> +}
> 
> For future reference, please put an extra newline before 'return'
> statements, so that the code looks more 'balanced':
> 
>> +{
>> +	u64 xfeatures;
>> +	int err;
>> +
>> +	/* Read the xfeatures value already saved in the user buffer */
>> +	err  = __get_user(xfeatures, &xbuf->header.xfeatures);
>> +	xfeatures |= mask;
>> +	err |= __put_user(xfeatures, &xbuf->header.xfeatures);
>> +
>> +	return err;
>> +}

I see. Thanks for the note.

> I've done that for this patch, so no need to resend it.

Thanks!
Chang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ