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: <Z_9kvTUIqOo7htBl@gmail.com>
Date: Wed, 16 Apr 2025 10:05:17 +0200
From: Ingo Molnar <mingo@...nel.org>
To: "Chang S. Bae" <chang.seok.bae@...el.com>
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


* 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've done that for this patch, so no need to resend it.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ