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: <87bm8b6vb0.fsf@ashishki-desk.ger.corp.intel.com>
Date:   Wed, 03 Oct 2018 15:58:43 +0300
From:   Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To:     Mathieu Poirier <mathieu.poirier@...aro.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [QUEUED v20180920 05/16] stm class: Add a helper for writing data packets

Mathieu Poirier <mathieu.poirier@...aro.org> writes:

>> +static ssize_t notrace stm_write(struct stm_data *data, unsigned int master,
>> +			  unsigned int channel, const char *buf, size_t count)
>> +{
>> +	ssize_t sz;
>> +
>> +	sz = stm_data_write(data, master, channel, true, buf, count);
>> +	if (sz > 0)
>> +		data->packet(data, master, channel, STP_PACKET_FLAG, 0, 0,
>> +			     buf);
>
> The original code the payload of a flag packet was '0' while in this patch
> changes it to be anything.  Some external tooling could be very confused.

I think the original intention was so: the 'size' field of ->packet()
refers to how many bytes from the given 'payload' the callback should
use. IOW, with size 0, buf may point to anything (still a valid pointer
though). But that should have been documented better from the beginning,
so you're completely right. I'll make a note to myself to go over the
API bits and sort out stuff like that.

Thanks,
--
Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ