/* * AppArmor security module * * This file contains AppArmor security identifier (sid) manipulation fns * * Copyright 2009-2010 Canonical Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, version 2 of the * License. * * * AppArmor allocates a unique sid for every profile loaded. If a profile * is replaced it receives the sid of the profile it is replacing. * * The sid value of 0 is invalid. */ #include #include #include #include "include/sid.h" /* global counter from which sids are allocated */ static u32 global_sid; static DEFINE_SPINLOCK(sid_lock); /* TODO FIXME: add sid to profile mapping, and sid recycling */ /** * aa_alloc_sid - allocate a new sid for a profile */ u32 aa_alloc_sid(void) { u32 sid; /* * TODO FIXME: sid recycling - part of profile mapping table */ spin_lock(&sid_lock); sid = (++global_sid); spin_unlock(&sid_lock); return sid; } /** * aa_free_sid - free a sid * @sid: sid to free */ void aa_free_sid(u32 sid) { ; /* NOP ATM */ } ion> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2017-01-27 11:56:06 -0700
committerJens Axboe <axboe@fb.com>2017-01-27 11:56:06 -0700
commitc14024dbb156c8392908aaa822097d27c6af8ec8 (patch)
tree02f6ffa664b16bd76750c05f62708a518de2acdc /include/uapi/xen/evtchn.h
parent08965c2eba135bdfb6e86cf25308e01421c7e0ce (diff)
parent3b4f18843e511193e7eb616710e838f5852e661d (diff)
Merge branch 'stable/for-jens-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-linus
Konrad writes: Please pull in your 'for-linus' branch two little fixes for Xen block front: One fix is for handling the XEN_PAGE_SIZE != PAGE_SIZE (4KB vs 64KB on ARM for example) mishandling while the other is fixing the accounting for the configuration changes.
Diffstat (limited to 'include/uapi/xen/evtchn.h')