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:   Sun, 1 Oct 2017 16:05:58 +0530
From:   Gargi Sharma <gs051095@...il.com>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     linux-kernel@...r.kernel.org, Rik van Riel <riel@...riel.com>,
        Julia Lawall <julia.lawall@...6.fr>, akpm@...ux-foundation.org,
        mingo@...nel.org, pasha.tatashin@...cle.com, ktkhai@...tuozzo.com,
        Oleg Nesterov <oleg@...hat.com>
Subject: Re: [PATCH v2 1/2] pid: Replace pid bitmap implementation with IDR API

On Sun, Oct 1, 2017 at 2:45 PM, Christoph Hellwig <hch@...radead.org> wrote:
>> -             task_active_pid_ns(current)->last_pid);
>> +             task_active_pid_ns(current)->idr.idr_next-1);
>
> I think we want a well documented helper for this pattern instead
> of poking into the internals.
idr_get_cursor() get can be used instead of idr.idr_next, so that we do not
expose the internals.
>
> Also is last - 1 always the correct answer?  Even with idr_alloc_cyclic
> we could wrap around, couldn't we?
-1 will be incorrect when the pids wrap around. Should we go back to
setting up last_pid as it was done before? Or should we use idr_get_cursor
and determine if pid was rolled over and then perform necessary action?

Thanks!
Gargi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ