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>] [day] [month] [year] [list]
Date:   Sat, 19 Jan 2019 11:59:53 -0500
From:   Scott Bauer <sbauer@...donthack.me>
To:     David Kozub <zub@...ux.fjfi.cvut.cz>
Cc:     linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
        hch@...radead.org, jonathan.derrick@...el.com
Subject: Re: [PATCH v2 09/16] block: sed-opal: split generation of bytestring
 header and content

On Thu, Jan 17, 2019 at 09:31:49PM +0000, David Kozub wrote:
> -
> -	memcpy(&cmd->cmd[cmd->pos], bytestring, len);
> +	start = &cmd->cmd[cmd->pos];
>  	cmd->pos += len;

This is somewhat pendatic, but it helps me review patches if we keep things together.
Since we're no longer doing the memcpy in this function, can we please move the cmd->pos += len
to the location where we actually do the memcpy.

I'm willing to be told to get over it if other reviewers don't like that approach, but if no one cares
please move it.


> +	return start;
> +}
>  
> +static void add_token_bytestring(int *err, struct opal_dev *cmd,
> +				 const u8 *bytestring, size_t len)
> +{
> +	u8 *start;
> +
> +	start = add_bytestring_header(err, cmd, len);
> +	if (!start)
> +		return;
> +	memcpy(start, bytestring, len);

Do the above here instead.

> 2.20.1
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ