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: <CAG2=9p-po7j3eKJOLyp-cW8ConH7ODtA09187314rvfj8SScCg@mail.gmail.com>
Date:	Sun, 14 Feb 2016 14:25:40 +0800
From:	Chunyan Zhang <zhang.chunyan@...aro.org>
To:	Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Mathieu Poirier <mathieu.poirier@...aro.org>,
	Lyra Zhang <zhang.lyra@...il.com>
Subject: Re: [PATCH] drivers: stm: correct the index in master array release

On Tue, Feb 9, 2016 at 6:12 PM, Alexander Shishkin
<alexander.shishkin@...ux.intel.com> wrote:
> Chunyan Zhang <zhang.chunyan@...aro.org> writes:
>
>> It would be broken if stm_data->sw_start isn't zero, because that
>> stp_master_free() get the 'master' with __stm_master()/stm_master(),
>> in which the masterID is the second input parameter minus
>> stm_data->sw_start. So freeing STM masters has to start from
>> stm_data->sw_start.
>
> No, it won't. stm_master_free() handles nonexistent masters correctly.
> It does make sense to shrink the loop in stm_unregister_device() to
> avoid going through the [0..sw_start) range, since stm_master() returns
> NULL for those, but not for the reasons given in this patch description.

Let's assume sw_start = 64, sw_end = 79, sw_nmasters should be 16, if
the loop goes through [0..16), the existed masters will not be freed.
That's what I wanted to address in this patch. I meant the number of
loop in stm_unregister_device() is correct, but the start index isn't.
Sorry for not describing clear enough in the patch logs.

Thanks,
Chunyan

>
> Regards,
> --
> Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ