lkml.org 
[lkml]   [2018]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Use an IDR to allocate apparmor secids
On Mon, Jun 04, 2018 at 07:35:24PM -0700, John Johansen wrote:
> On 06/04/2018 07:27 PM, Matthew Wilcox wrote:
> > On Mon, Jun 04, 2018 at 06:27:09PM -0700, John Johansen wrote:
> >> hey Mathew,
> >>
> >> I've pulled this into apparmor-next and done the retuning of
> >> AA_SECID_INVALID a follow on patch. The reworking of the api to
> >> return the specific error type can wait for another cycle.
> >
> > Oh ... here's what I currently have. I decided that AA_SECID_INVALID
> > wasn't needed.
> >
> well not needed in the allocation path, but definitely needed and it
> needs to be 0.
>
> This is for catching some uninitialized or freed and zeroed values.
> The debug checks aren't in the current version, as they were
> residing in another debug patch, but I will pull them out into their
> own patch.

With the IDR, I don't know if you need it for debug.

BUG_ON(label != idr_find(&aa_secids, label->secid))

should do the trick.

\
 
 \ /
  Last update: 2018-06-05 13:48    [W:0.083 / U:2.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site