*sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget%/translations/zh_CN/userspace-api/lsmmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/zh_TW/userspace-api/lsmmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/it_IT/userspace-api/lsmmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/ja_JP/userspace-api/lsmmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/ko_KR/userspace-api/lsmmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/sp_SP/userspace-api/lsmmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhh?/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm.rsthKubh)}(h;Copyright (C) 2022 Casey Schaufler h]h;Copyright (C) 2022 Casey Schaufler }hhsbah}(h]h ]h"]h$]h&]hhuh1hhhhhhhhKubh)}(h$Copyright (C) 2022 Intel Corporationh]h$Copyright (C) 2022 Intel Corporation}hhsbah}(h]h ]h"]h$]h&]hhuh1hhhhhhhhKubhsection)}(hhh](htitle)}(hLinux Security Modulesh]hLinux Security Modules}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh field_list)}(hhh](hfield)}(hhh](h field_name)}(hAuthorh]hAuthor}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhKubh field_body)}(hCasey Schauflerh]h paragraph)}(hjh]hCasey Schaufler}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK hjubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hhh](h)}(hDateh]hDate}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhKubj)}(h July 2023 h]j)}(h July 2023h]h July 2023}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK hj1ubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubeh}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubj)}(hxLinux security modules (LSM) provide a mechanism to implement additional access controls to the Linux security policies.h]hxLinux security modules (LSM) provide a mechanism to implement additional access controls to the Linux security policies.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK hhhhubj)}(hAThe various security modules may support any of these attributes:h]hAThe various security modules may support any of these attributes:}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhhhhubj)}(hXk``LSM_ATTR_CURRENT`` is the current, active security context of the process. The proc filesystem provides this value in ``/proc/self/attr/current``. This is supported by the SELinux, Smack and AppArmor security modules. Smack also provides this value in ``/proc/self/attr/smack/current``. AppArmor also provides this value in ``/proc/self/attr/apparmor/current``.h](hliteral)}(h``LSM_ATTR_CURRENT``h]hLSM_ATTR_CURRENT}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjqubhd is the current, active security context of the process. The proc filesystem provides this value in }(hjqhhhNhNubjv)}(h``/proc/self/attr/current``h]h/proc/self/attr/current}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjqubhk. This is supported by the SELinux, Smack and AppArmor security modules. Smack also provides this value in }(hjqhhhNhNubjv)}(h!``/proc/self/attr/smack/current``h]h/proc/self/attr/smack/current}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjqubh'. AppArmor also provides this value in }(hjqhhhNhNubjv)}(h$``/proc/self/attr/apparmor/current``h]h /proc/self/attr/apparmor/current}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjqubh.}(hjqhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhhhhubj)}(hX1``LSM_ATTR_EXEC`` is the security context of the process at the time the current image was executed. The proc filesystem provides this value in ``/proc/self/attr/exec``. This is supported by the SELinux and AppArmor security modules. AppArmor also provides this value in ``/proc/self/attr/apparmor/exec``.h](jv)}(h``LSM_ATTR_EXEC``h]h LSM_ATTR_EXEC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh is the security context of the process at the time the current image was executed. The proc filesystem provides this value in }(hjhhhNhNubjv)}(h``/proc/self/attr/exec``h]h/proc/self/attr/exec}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubhg. This is supported by the SELinux and AppArmor security modules. AppArmor also provides this value in }(hjhhhNhNubjv)}(h!``/proc/self/attr/apparmor/exec``h]h/proc/self/attr/apparmor/exec}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhhhhubj)}(h``LSM_ATTR_FSCREATE`` is the security context of the process used when creating file system objects. The proc filesystem provides this value in ``/proc/self/attr/fscreate``. This is supported by the SELinux security module.h](jv)}(h``LSM_ATTR_FSCREATE``h]hLSM_ATTR_FSCREATE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh{ is the security context of the process used when creating file system objects. The proc filesystem provides this value in }(hjhhhNhNubjv)}(h``/proc/self/attr/fscreate``h]h/proc/self/attr/fscreate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh3. This is supported by the SELinux security module.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhhhhubj)}(h``LSM_ATTR_KEYCREATE`` is the security context of the process used when creating key objects. The proc filesystem provides this value in ``/proc/self/attr/keycreate``. This is supported by the SELinux security module.h](jv)}(h``LSM_ATTR_KEYCREATE``h]hLSM_ATTR_KEYCREATE}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj3ubhs is the security context of the process used when creating key objects. The proc filesystem provides this value in }(hj3hhhNhNubjv)}(h``/proc/self/attr/keycreate``h]h/proc/self/attr/keycreate}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1juhj3ubh3. This is supported by the SELinux security module.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK#hhhhubj)}(hX7``LSM_ATTR_PREV`` is the security context of the process at the time the current security context was set. The proc filesystem provides this value in ``/proc/self/attr/prev``. This is supported by the SELinux and AppArmor security modules. AppArmor also provides this value in ``/proc/self/attr/apparmor/prev``.h](jv)}(h``LSM_ATTR_PREV``h]h LSM_ATTR_PREV}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1juhjaubh is the security context of the process at the time the current security context was set. The proc filesystem provides this value in }(hjahhhNhNubjv)}(h``/proc/self/attr/prev``h]h/proc/self/attr/prev}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjaubhg. This is supported by the SELinux and AppArmor security modules. AppArmor also provides this value in }(hjahhhNhNubjv)}(h!``/proc/self/attr/apparmor/prev``h]h/proc/self/attr/apparmor/prev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjaubh.}(hjahhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK(hhhhubj)}(h``LSM_ATTR_SOCKCREATE`` is the security context of the process used when creating socket objects. The proc filesystem provides this value in ``/proc/self/attr/sockcreate``. This is supported by the SELinux security module.h](jv)}(h``LSM_ATTR_SOCKCREATE``h]hLSM_ATTR_SOCKCREATE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubhv is the security context of the process used when creating socket objects. The proc filesystem provides this value in }(hjhhhNhNubjv)}(h``/proc/self/attr/sockcreate``h]h/proc/self/attr/sockcreate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh3. This is supported by the SELinux security module.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK.hhhhubh)}(hhh](h)}(hKernel interfaceh]hKernel interface}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK4ubh)}(hhh](h)}(h/Set a security attribute of the current processh]h/Set a security attribute of the current process}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK7ubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](single"sys_lsm_set_self_attr (C function)c.sys_lsm_set_self_attrhNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(h`long sys_lsm_set_self_attr (unsigned int attr, struct lsm_ctx __user * ctx, u32 size, u32 flags)h]hdesc_signature_line)}(h^long sys_lsm_set_self_attr(unsigned int attr, struct lsm_ctx __user *ctx, u32 size, u32 flags)h](hdesc_sig_keyword_type)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjhhhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:57: ./security/lsm_syscalls.chK7ubhdesc_sig_space)}(h h]h }(hj'hhhNhNubah}(h]h ]wah"]h$]h&]uh1j%hjhhhj$hK7ubh desc_name)}(hsys_lsm_set_self_attrh]h desc_sig_name)}(hsys_lsm_set_self_attrh]hsys_lsm_set_self_attr}(hj>hhhNhNubah}(h]h ]nah"]h$]h&]uh1j<hj8ubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1j6hjhhhj$hK7ubhdesc_parameterlist)}(hD(unsigned int attr, struct lsm_ctx __user *ctx, u32 size, u32 flags)h](hdesc_parameter)}(hunsigned int attrh](j)}(hunsignedh]hunsigned}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj]ubj&)}(h h]h }(hjohhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj]ubj)}(hinth]hint}(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj]ubj&)}(h h]h }(hjhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj]ubj=)}(hattrh]hattr}(hjhhhNhNubah}(h]h ]jIah"]h$]h&]uh1j<hj]ubeh}(h]h ]h"]h$]h&]noemphhhuh1j[hjWubj\)}(hstruct lsm_ctx __user *ctxh](hdesc_sig_keyword)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjubj&)}(h h]h }(hjhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubh)}(hhh]j=)}(hlsm_ctxh]hlsm_ctx}(hjhhhNhNubah}(h]h ]jIah"]h$]h&]uh1j<hjubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jj@sbc.sys_lsm_set_self_attrasbuh1hhjubj&)}(h h]h }(hjhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubh__user}(hjhhhNhNubj&)}(h h]h }(hjhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjubj=)}(hctxh]hctx}(hj.hhhNhNubah}(h]h ]jIah"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]noemphhhuh1j[hjWubj\)}(hu32 sizeh](h)}(hhh]j=)}(hu32h]hu32}(hjJhhhNhNubah}(h]h ]jIah"]h$]h&]uh1j<hjGubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjLmodnameN classnameNjj)}j]jc.sys_lsm_set_self_attrasbuh1hhjCubj&)}(h h]h }(hjhhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjCubj=)}(hsizeh]hsize}(hjvhhhNhNubah}(h]h ]jIah"]h$]h&]uh1j<hjCubeh}(h]h ]h"]h$]h&]noemphhhuh1j[hjWubj\)}(h u32 flagsh](h)}(hhh]j=)}(hu32h]hu32}(hjhhhNhNubah}(h]h ]jIah"]h$]h&]uh1j<hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.sys_lsm_set_self_attrasbuh1hhjubj&)}(h h]h }(hjhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubj=)}(hflagsh]hflags}(hjhhhNhNubah}(h]h ]jIah"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]noemphhhuh1j[hjWubeh}(h]h ]h"]h$]h&]hhuh1jUhjhhhj$hK7ubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1j sphinx_line_type declaratorhj hhhj$hK7ubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhj$hK7hjhhubh desc_content)}(hhh]j)}(h,Set current task's security module attributeh]h.Set current task’s security module attribute}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:57: ./security/lsm_syscalls.chK-hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj$hK7ubeh}(h]h ](jfunctioneh"]h$]h&]domainjobjtypej desctypej noindex noindexentrynocontentsentryuh1jhhhjhNhNubh container)}(hX**Parameters** ``unsigned int attr`` which attribute to set ``struct lsm_ctx __user * ctx`` the LSM contexts ``u32 size`` size of **ctx** ``u32 flags`` reserved for future use **Description** Sets the calling task's LSM context. On success this function returns 0. If the attribute specified cannot be set a negative value indicating the reason for the error is returned.h](j)}(h**Parameters**h]hstrong)}(hjh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:57: ./security/lsm_syscalls.chK1hjubhdefinition_list)}(hhh](hdefinition_list_item)}(h-``unsigned int attr`` which attribute to set h](hterm)}(h``unsigned int attr``h]jv)}(hjCh]hunsigned int attr}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjAubah}(h]h ]h"]h$]h&]uh1j?hY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:57: ./security/lsm_syscalls.chK.hj;ubh definition)}(hhh]j)}(hwhich attribute to seth]hwhich attribute to set}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXhK.hj[ubah}(h]h ]h"]h$]h&]uh1jYhj;ubeh}(h]h ]h"]h$]h&]uh1j9hjXhK.hj6ubj:)}(h1``struct lsm_ctx __user * ctx`` the LSM contexts h](j@)}(h``struct lsm_ctx __user * ctx``h]jv)}(hj~h]hstruct lsm_ctx __user * ctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhj|ubah}(h]h ]h"]h$]h&]uh1j?hY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:57: ./security/lsm_syscalls.chK/hjxubjZ)}(hhh]j)}(hthe LSM contextsh]hthe LSM contexts}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhK/hjubah}(h]h ]h"]h$]h&]uh1jYhjxubeh}(h]h ]h"]h$]h&]uh1j9hjhK/hj6ubj:)}(h``u32 size`` size of **ctx** h](j@)}(h ``u32 size``h]jv)}(hjh]hu32 size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubah}(h]h ]h"]h$]h&]uh1j?hY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:57: ./security/lsm_syscalls.chK0hjubjZ)}(hhh]j)}(hsize of **ctx**h](hsize of }(hjhhhNhNubj)}(h**ctx**h]hctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK0hjubah}(h]h ]h"]h$]h&]uh1jYhjubeh}(h]h ]h"]h$]h&]uh1j9hjhK0hj6ubj:)}(h&``u32 flags`` reserved for future use h](j@)}(h ``u32 flags``h]jv)}(hjh]h u32 flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubah}(h]h ]h"]h$]h&]uh1j?hY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:57: ./security/lsm_syscalls.chK1hjubjZ)}(hhh]j)}(hreserved for future useh]hreserved for future use}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhK1hjubah}(h]h ]h"]h$]h&]uh1jYhjubeh}(h]h ]h"]h$]h&]uh1j9hjhK1hj6ubeh}(h]h ]h"]h$]h&]uh1j4hjubj)}(h**Description**h]j)}(hj9h]h Description}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:57: ./security/lsm_syscalls.chK3hjubj)}(hSets the calling task's LSM context. On success this function returns 0. If the attribute specified cannot be set a negative value indicating the reason for the error is returned.h]hSets the calling task’s LSM context. On success this function returns 0. If the attribute specified cannot be set a negative value indicating the reason for the error is returned.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:57: ./security/lsm_syscalls.chK3hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubeh}(h]/set-a-security-attribute-of-the-current-processah ]h"]/set a security attribute of the current processah$]h&]uh1hhjhhhhhK7ubh)}(hhh](h)}(hhjfhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jhhhjmhNhNubj)}(hX**Parameters** ``unsigned int attr`` which attribute to return ``struct lsm_ctx __user * ctx`` the user-space destination for the information, or NULL ``u32 __user * size`` pointer to the size of space available to receive the data ``u32 flags`` special handling options. LSM_FLAG_SINGLE indicates that only attributes associated with the LSM identified in the passed **ctx** be reported. **Description** Returns the calling task's LSM contexts. On success this function returns the number of **ctx** array elements. This value may be zero if there are no LSM contexts assigned. If **size** is insufficient to contain the return data -E2BIG is returned and **size** is set to the minimum required size. In all other cases a negative value indicating the error is returned.h](j)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:63: ./security/lsm_syscalls.chKBhjubj5)}(hhh](j:)}(h0``unsigned int attr`` which attribute to return h](j@)}(h``unsigned int attr``h]jv)}(hjh]hunsigned int attr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubah}(h]h ]h"]h$]h&]uh1j?hY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:63: ./security/lsm_syscalls.chK?hjubjZ)}(hhh]j)}(hwhich attribute to returnh]hwhich attribute to return}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhK?hjubah}(h]h ]h"]h$]h&]uh1jYhjubeh}(h]h ]h"]h$]h&]uh1j9hjhK?hjubj:)}(hX``struct lsm_ctx __user * ctx`` the user-space destination for the information, or NULL h](j@)}(h``struct lsm_ctx __user * ctx``h]jv)}(hjh]hstruct lsm_ctx __user * ctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubah}(h]h ]h"]h$]h&]uh1j?hY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:63: ./security/lsm_syscalls.chK@hjubjZ)}(hhh]j)}(h7the user-space destination for the information, or NULLh]h7the user-space destination for the information, or NULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhK@hjubah}(h]h ]h"]h$]h&]uh1jYhjubeh}(h]h ]h"]h$]h&]uh1j9hjhK@hjubj:)}(hQ``u32 __user * size`` pointer to the size of space available to receive the data h](j@)}(h``u32 __user * size``h]jv)}(hj h]hu32 __user * size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubah}(h]h ]h"]h$]h&]uh1j?hY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:63: ./security/lsm_syscalls.chKAhj ubjZ)}(hhh]j)}(h:pointer to the size of space available to receive the datah]h:pointer to the size of space available to receive the data}(hj5 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1 hKAhj2 ubah}(h]h ]h"]h$]h&]uh1jYhj ubeh}(h]h ]h"]h$]h&]uh1j9hj1 hKAhjubj:)}(h``u32 flags`` special handling options. LSM_FLAG_SINGLE indicates that only attributes associated with the LSM identified in the passed **ctx** be reported. h](j@)}(h ``u32 flags``h]jv)}(hjU h]h u32 flags}(hjW hhhNhNubah}(h]h ]h"]h$]h&]uh1juhjS ubah}(h]h ]h"]h$]h&]uh1j?hY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:63: ./security/lsm_syscalls.chKDhjO ubjZ)}(hhh]j)}(hspecial handling options. LSM_FLAG_SINGLE indicates that only attributes associated with the LSM identified in the passed **ctx** be reported.h](hzspecial handling options. LSM_FLAG_SINGLE indicates that only attributes associated with the LSM identified in the passed }(hjn hhhNhNubj)}(h**ctx**h]hctx}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjn ubh be reported.}(hjn hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:63: ./security/lsm_syscalls.chKBhjk ubah}(h]h ]h"]h$]h&]uh1jYhjO ubeh}(h]h ]h"]h$]h&]uh1j9hjj hKDhjubeh}(h]h ]h"]h$]h&]uh1j4hjubj)}(h**Description**h]j)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:63: ./security/lsm_syscalls.chKFhjubj)}(hXoReturns the calling task's LSM contexts. On success this function returns the number of **ctx** array elements. This value may be zero if there are no LSM contexts assigned. If **size** is insufficient to contain the return data -E2BIG is returned and **size** is set to the minimum required size. In all other cases a negative value indicating the error is returned.h](hZReturns the calling task’s LSM contexts. On success this function returns the number of }(hj hhhNhNubj)}(h**ctx**h]hctx}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhR array elements. This value may be zero if there are no LSM contexts assigned. If }(hj hhhNhNubj)}(h**size**h]hsize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhC is insufficient to contain the return data -E2BIG is returned and }(hj hhhNhNubj)}(h**size**h]hsize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhk is set to the minimum required size. In all other cases a negative value indicating the error is returned.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:63: ./security/lsm_syscalls.chKFhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjmhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!sys_lsm_list_modules (C function)c.sys_lsm_list_moduleshNtauh1jhjmhhhNhNubj)}(hhh](j)}(hJlong sys_lsm_list_modules (u64 __user * ids, u32 __user * size, u32 flags)h]j)}(hGlong sys_lsm_list_modules(u64 __user *ids, u32 __user *size, u32 flags)h](j)}(hlongh]hlong}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj hhhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:66: ./security/lsm_syscalls.chK`ubj&)}(h h]h }(hj- hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj hhhj, hK`ubj7)}(hsys_lsm_list_modulesh]j=)}(hsys_lsm_list_modulesh]hsys_lsm_list_modules}(hj? hhhNhNubah}(h]h ]jIah"]h$]h&]uh1j<hj; ubah}(h]h ](jPjQeh"]h$]h&]hhuh1j6hj hhhj, hK`ubjV)}(h.(u64 __user *ids, u32 __user *size, u32 flags)h](j\)}(hu64 __user *idsh](h)}(hhh]j=)}(hu64h]hu64}(hj^ hhhNhNubah}(h]h ]jIah"]h$]h&]uh1j<hj[ ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj` modnameN classnameNjj)}j]j)}jjA sbc.sys_lsm_list_modulesasbuh1hhjW ubj&)}(h h]h }(hj~ hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjW ubh__user}(hjW hhhNhNubj&)}(h h]h }(hj hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjW ubj)}(hj!h]h*}(hj hhhNhNubah}(h]h ]j*ah"]h$]h&]uh1jhjW ubj=)}(hidsh]hids}(hj hhhNhNubah}(h]h ]jIah"]h$]h&]uh1j<hjW ubeh}(h]h ]h"]h$]h&]noemphhhuh1j[hjS ubj\)}(hu32 __user *sizeh](h)}(hhh]j=)}(hu32h]hu32}(hj hhhNhNubah}(h]h ]jIah"]h$]h&]uh1j<hj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]jz c.sys_lsm_list_modulesasbuh1hhj ubj&)}(h h]h }(hj hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj ubh__user}(hj hhhNhNubj&)}(h h]h }(hj hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj ubj)}(hj!h]h*}(hj hhhNhNubah}(h]h ]j*ah"]h$]h&]uh1jhj ubj=)}(hsizeh]hsize}(hj hhhNhNubah}(h]h ]jIah"]h$]h&]uh1j<hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1j[hjS ubj\)}(h u32 flagsh](h)}(hhh]j=)}(hu32h]hu32}(hj. hhhNhNubah}(h]h ]jIah"]h$]h&]uh1j<hj+ ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj0 modnameN classnameNjj)}j]jz c.sys_lsm_list_modulesasbuh1hhj' ubj&)}(h h]h }(hjL hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj' ubj=)}(hflagsh]hflags}(hjZ hhhNhNubah}(h]h ]jIah"]h$]h&]uh1j<hj' ubeh}(h]h ]h"]h$]h&]noemphhhuh1j[hjS ubeh}(h]h ]h"]h$]h&]hhuh1jUhj hhhj, hK`ubeh}(h]h ]h"]h$]h&]hhjuh1j jjhj hhhj, hK`ubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jhj, hK`hj hhubj)}(hhh]j)}(h,Return a list of the active security modulesh]h,Return a list of the active security modules}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:66: ./security/lsm_syscalls.chKThj hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj, hK`ubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj jjjuh1jhhhjmhNhNubj)}(hX,**Parameters** ``u64 __user * ids`` the LSM module ids ``u32 __user * size`` pointer to size of **ids**, updated on return ``u32 flags`` reserved for future use, must be zero **Description** Returns a list of the active LSM ids. On success this function returns the number of **ids** array elements. This value may be zero if there are no LSMs active. If **size** is insufficient to contain the return data -E2BIG is returned and **size** is set to the minimum required size. In all other cases a negative value indicating the error is returned.h](j)}(h**Parameters**h]j)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:66: ./security/lsm_syscalls.chKXhj ubj5)}(hhh](j:)}(h(``u64 __user * ids`` the LSM module ids h](j@)}(h``u64 __user * ids``h]jv)}(hj h]hu64 __user * ids}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubah}(h]h ]h"]h$]h&]uh1j?hY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:66: ./security/lsm_syscalls.chKUhj ubjZ)}(hhh]j)}(hthe LSM module idsh]hthe LSM module ids}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj hKUhj ubah}(h]h ]h"]h$]h&]uh1jYhj ubeh}(h]h ]h"]h$]h&]uh1j9hj hKUhj ubj:)}(hD``u32 __user * size`` pointer to size of **ids**, updated on return h](j@)}(h``u32 __user * size``h]jv)}(hj h]hu32 __user * size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubah}(h]h ]h"]h$]h&]uh1j?hY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:66: ./security/lsm_syscalls.chKVhj ubjZ)}(hhh]j)}(h-pointer to size of **ids**, updated on returnh](hpointer to size of }(hj hhhNhNubj)}(h**ids**h]hids}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, updated on return}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhj hKVhj ubah}(h]h ]h"]h$]h&]uh1jYhj ubeh}(h]h ]h"]h$]h&]uh1j9hj hKVhj ubj:)}(h4``u32 flags`` reserved for future use, must be zero h](j@)}(h ``u32 flags``h]jv)}(hjI h]h u32 flags}(hjK hhhNhNubah}(h]h ]h"]h$]h&]uh1juhjG ubah}(h]h ]h"]h$]h&]uh1j?hY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:66: ./security/lsm_syscalls.chKWhjC ubjZ)}(hhh]j)}(h%reserved for future use, must be zeroh]h%reserved for future use, must be zero}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ hKWhj_ ubah}(h]h ]h"]h$]h&]uh1jYhjC ubeh}(h]h ]h"]h$]h&]uh1j9hj^ hKWhj ubeh}(h]h ]h"]h$]h&]uh1j4hj ubj)}(h**Description**h]j)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:66: ./security/lsm_syscalls.chKYhj ubj)}(hXbReturns a list of the active LSM ids. On success this function returns the number of **ids** array elements. This value may be zero if there are no LSMs active. If **size** is insufficient to contain the return data -E2BIG is returned and **size** is set to the minimum required size. In all other cases a negative value indicating the error is returned.h](hUReturns a list of the active LSM ids. On success this function returns the number of }(hj hhhNhNubj)}(h**ids**h]hids}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhH array elements. This value may be zero if there are no LSMs active. If }(hj hhhNhNubj)}(h**size**h]hsize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhC is insufficient to contain the return data -E2BIG is returned and }(hj hhhNhNubj)}(h**size**h]hsize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhk is set to the minimum required size. In all other cases a negative value indicating the error is returned.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:66: ./security/lsm_syscalls.chKYhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjmhhhNhNubeh}(h]