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]
Date:	Thu, 3 Mar 2016 08:19:07 +0530
From:	Parav Pandit <pandit.parav@...il.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	cgroups@...r.kernel.org, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-rdma@...r.kernel.org,
	lizefan@...wei.com, Johannes Weiner <hannes@...xchg.org>,
	Doug Ledford <dledford@...hat.com>,
	Liran Liss <liranl@...lanox.com>,
	"Hefty, Sean" <sean.hefty@...el.com>,
	Jason Gunthorpe <jgunthorpe@...idianresearch.com>,
	Haggai Eran <haggaie@...lanox.com>,
	Jonathan Corbet <corbet@....net>, james.l.morris@...cle.com,
	serge@...lyn.com, Or Gerlitz <ogerlitz@...lanox.com>,
	Matan Barak <matanb@...lanox.com>, raindel@...lanox.com,
	akpm@...ux-foundation.org, linux-security-module@...r.kernel.org
Subject: Re: [PATCHv9 1/3] rdmacg: Added rdma cgroup controller

Hi Tejun, Haggai,

On Thu, Mar 3, 2016 at 1:28 AM, Parav Pandit <pandit.parav@...il.com> wrote:
>>> +     rpool->refcnt--;
>>> +     if (rpool->refcnt == 0 && rpool->num_max_cnt == pool_info->table_len) {
>>
>> If the caller charges 2 and then uncharges 1 two times, the refcnt
>> underflows?  Why not just track how many usages are zero?
>>
> This is certainly must fix bug. Changed refcnt to usage_sum and changed to do
> usage_sum -= num during uncharging
> and
> usage_sum += num during charing.

This is not sufficient as css_get() and put are done only once per
call, which leads to similar problem as of refcnt.
As I think more, I realised that this particular test is missing that
resulted in this related bug, I realize that we don't have use case to
have "num" field from the IB stack side.
For bulk free IB stack will have to keep track of different or same
rdmacg returned values to call uncharge() with right number of
resources, all of that complexity just doesn't make sense and not
required.
So as first step to further simplify this, I am removing "num" input
field from charge and uncharge API.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ