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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171001091520.GA21161@infradead.org>
Date:   Sun, 1 Oct 2017 02:15:20 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Gargi Sharma <gs051095@...il.com>
Cc:     linux-kernel@...r.kernel.org, riel@...riel.com,
        julia.lawall@...6.fr, akpm@...ux-foundation.org, mingo@...nel.org,
        pasha.tatashin@...cle.com, ktkhai@...tuozzo.com, oleg@...hat.com
Subject: Re: [PATCH v2 1/2] pid: Replace pid bitmap implementation with IDR
 API

> -		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.

Also is last - 1 always the correct answer?  Even with idr_alloc_cyclic
we could wrap around, couldn't we?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ