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]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/pt_BR/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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhKubh field_body)}(hCasey Schauflerh]h paragraph)}(hjh]hCasey Schaufler}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hhh](j)}(hDateh]hDate}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4hhhKubj)}(h July 2023 h]j)}(h July 2023h]h July 2023}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK hjEubah}(h]h ]h"]h$]h&]uh1jhj4ubeh}(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.}(hjihhhNhNubah}(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:}(hjwhhhNhNubah}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhd is the current, active security context of the process. The proc filesystem provides this value in }(hjhhhNhNubj)}(h``/proc/self/attr/current``h]h/proc/self/attr/current}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhk. This is supported by the SELinux, Smack and AppArmor security modules. Smack also provides this value in }(hjhhhNhNubj)}(h!``/proc/self/attr/smack/current``h]h/proc/self/attr/smack/current}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh'. AppArmor also provides this value in }(hjhhhNhNubj)}(h$``/proc/self/attr/apparmor/current``h]h /proc/self/attr/apparmor/current}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(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](j)}(h``LSM_ATTR_EXEC``h]h LSM_ATTR_EXEC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is the security context of the process at the time the current image was executed. The proc filesystem provides this value in }(hjhhhNhNubj)}(h``/proc/self/attr/exec``h]h/proc/self/attr/exec}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhg. This is supported by the SELinux and AppArmor security modules. AppArmor also provides this value in }(hjhhhNhNubj)}(h!``/proc/self/attr/apparmor/exec``h]h/proc/self/attr/apparmor/exec}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(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](j)}(h``LSM_ATTR_FSCREATE``h]hLSM_ATTR_FSCREATE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh{ is the security context of the process used when creating file system objects. The proc filesystem provides this value in }(hjhhhNhNubj)}(h``/proc/self/attr/fscreate``h]h/proc/self/attr/fscreate}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh3. 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](j)}(h``LSM_ATTR_KEYCREATE``h]hLSM_ATTR_KEYCREATE}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubhs is the security context of the process used when creating key objects. The proc filesystem provides this value in }(hjGhhhNhNubj)}(h``/proc/self/attr/keycreate``h]h/proc/self/attr/keycreate}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubh3. This is supported by the SELinux security module.}(hjGhhhNhNubeh}(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](j)}(h``LSM_ATTR_PREV``h]h LSM_ATTR_PREV}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuubh is the security context of the process at the time the current security context was set. The proc filesystem provides this value in }(hjuhhhNhNubj)}(h``/proc/self/attr/prev``h]h/proc/self/attr/prev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuubhg. This is supported by the SELinux and AppArmor security modules. AppArmor also provides this value in }(hjuhhhNhNubj)}(h!``/proc/self/attr/apparmor/prev``h]h/proc/self/attr/apparmor/prev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuubh.}(hjuhhhNhNubeh}(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](j)}(h``LSM_ATTR_SOCKCREATE``h]hLSM_ATTR_SOCKCREATE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhv is the security context of the process used when creating socket objects. The proc filesystem provides this value in }(hjhhhNhNubj)}(h``/proc/self/attr/sockcreate``h]h/proc/self/attr/sockcreate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh3. 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}(hj)hhhNhNubah}(h]h ]ktah"]h$]h&]uh1j'hj#hhhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:57: ./security/lsm_syscalls.chK/ubhdesc_sig_space)}(h h]h }(hj;hhhNhNubah}(h]h ]wah"]h$]h&]uh1j9hj#hhhj8hK/ubh desc_name)}(hsys_lsm_set_self_attrh]h desc_sig_name)}(hsys_lsm_set_self_attrh]hsys_lsm_set_self_attr}(hjRhhhNhNubah}(h]h ]nah"]h$]h&]uh1jPhjLubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jJhj#hhhj8hK/ubhdesc_parameterlist)}(hD(unsigned int attr, struct lsm_ctx __user *ctx, u32 size, u32 flags)h](hdesc_parameter)}(hunsigned int attrh](j()}(hunsignedh]hunsigned}(hjuhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjqubj:)}(h h]h }(hjhhhNhNubah}(h]h ]jFah"]h$]h&]uh1j9hjqubj()}(hinth]hint}(hjhhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hjqubj:)}(h h]h }(hjhhhNhNubah}(h]h ]jFah"]h$]h&]uh1j9hjqubjQ)}(hattrh]hattr}(hjhhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhjqubeh}(h]h ]h"]h$]h&]noemphhhuh1johjkubjp)}(hstruct lsm_ctx __user *ctxh](hdesc_sig_keyword)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjubj:)}(h h]h }(hjhhhNhNubah}(h]h ]jFah"]h$]h&]uh1j9hjubh)}(hhh]jQ)}(hlsm_ctxh]hlsm_ctx}(hjhhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhjubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jjTsbc.sys_lsm_set_self_attrasbuh1hhjubj:)}(h h]h }(hjhhhNhNubah}(h]h ]jFah"]h$]h&]uh1j9hjubh__user}(hjhhhNhNubj:)}(h h]h }(hj#hhhNhNubah}(h]h ]jFah"]h$]h&]uh1j9hjubhdesc_sig_punctuation)}(h*h]h*}(hj3hhhNhNubah}(h]h ]pah"]h$]h&]uh1j1hjubjQ)}(hctxh]hctx}(hjBhhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhjubeh}(h]h ]h"]h$]h&]noemphhhuh1johjkubjp)}(hu32 sizeh](h)}(hhh]jQ)}(hu32h]hu32}(hj^hhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhj[ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj`modnameN classnameNjj)}j ]j c.sys_lsm_set_self_attrasbuh1hhjWubj:)}(h h]h }(hj|hhhNhNubah}(h]h ]jFah"]h$]h&]uh1j9hjWubjQ)}(hsizeh]hsize}(hjhhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhjWubeh}(h]h ]h"]h$]h&]noemphhhuh1johjkubjp)}(h u32 flagsh](h)}(hhh]jQ)}(hu32h]hu32}(hjhhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j ]j c.sys_lsm_set_self_attrasbuh1hhjubj:)}(h h]h }(hjhhhNhNubah}(h]h ]jFah"]h$]h&]uh1j9hjubjQ)}(hflagsh]hflags}(hjhhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhjubeh}(h]h ]h"]h$]h&]noemphhhuh1johjkubeh}(h]h ]h"]h$]h&]hhuh1jihj#hhhj8hK/ubeh}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1j!sphinx_line_type declaratorhjhhhj8hK/ubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhj8hK/hjhhubh 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&]uh1jhjhhhj8hK/ubeh}(h]h ](jfunctioneh"]h$]h&]domainjobjtypejdesctypejnoindex 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)}(hj0h]h Parameters}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j2hj.ubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:57: ./security/lsm_syscalls.chK3hj*ubhdefinition_list)}(hhh](hdefinition_list_item)}(h-``unsigned int attr`` which attribute to set h](hterm)}(h``unsigned int attr``h]j)}(hjWh]hunsigned int attr}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1jShY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:57: ./security/lsm_syscalls.chK0hjOubh definition)}(hhh]j)}(hwhich attribute to seth]hwhich attribute to set}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlhK0hjoubah}(h]h ]h"]h$]h&]uh1jmhjOubeh}(h]h ]h"]h$]h&]uh1jMhjlhK0hjJubjN)}(h1``struct lsm_ctx __user * ctx`` the LSM contexts h](jT)}(h``struct lsm_ctx __user * ctx``h]j)}(hjh]hstruct lsm_ctx __user * ctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jShY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:57: ./security/lsm_syscalls.chK1hjubjn)}(hhh]j)}(hthe LSM contextsh]hthe LSM contexts}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhK1hjubah}(h]h ]h"]h$]h&]uh1jmhjubeh}(h]h ]h"]h$]h&]uh1jMhjhK1hjJubjN)}(h``u32 size`` size of **ctx** h](jT)}(h ``u32 size``h]j)}(hjh]hu32 size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jShY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:57: ./security/lsm_syscalls.chK2hjubjn)}(hhh]j)}(hsize of **ctx**h](hsize of }(hjhhhNhNubj3)}(h**ctx**h]hctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j2hjubeh}(h]h ]h"]h$]h&]uh1jhjhK2hjubah}(h]h ]h"]h$]h&]uh1jmhjubeh}(h]h ]h"]h$]h&]uh1jMhjhK2hjJubjN)}(h&``u32 flags`` reserved for future use h](jT)}(h ``u32 flags``h]j)}(hjh]h u32 flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jShY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:57: ./security/lsm_syscalls.chK3hj ubjn)}(hhh]j)}(hreserved for future useh]hreserved for future use}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'hK3hj(ubah}(h]h ]h"]h$]h&]uh1jmhj ubeh}(h]h ]h"]h$]h&]uh1jMhj'hK3hjJubeh}(h]h ]h"]h$]h&]uh1jHhj*ubj)}(h**Description**h]j3)}(hjMh]h Description}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1j2hjKubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:57: ./security/lsm_syscalls.chK5hj*ubj)}(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.}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:57: ./security/lsm_syscalls.chK4hj*ubeh}(h]h ] kernelindentah"]h$]h&]uh1j(hjhhhNhNubeh}(h]/set-a-security-attribute-of-the-current-processah ]h"]/set a security attribute of the current processah$]h&]uh1hhjhhhhhK7ubh)}(hhh](h)}(hah"]h$]h&]uh1j1hj5ubjQ)}(hctxh]hctx}(hjhhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhj5ubeh}(h]h ]h"]h$]h&]noemphhhuh1johjubjp)}(hu32 __user *sizeh](h)}(hhh]jQ)}(hu32h]hu32}(hjhhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j ]jsc.sys_lsm_get_self_attrasbuh1hhjubj:)}(h h]h }(hjhhhNhNubah}(h]h ]jFah"]h$]h&]uh1j9hjubh__user}(hjhhhNhNubj:)}(h h]h }(hjhhhNhNubah}(h]h ]jFah"]h$]h&]uh1j9hjubj2)}(hj5h]h*}(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubjQ)}(hsizeh]hsize}(hj hhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhjubeh}(h]h ]h"]h$]h&]noemphhhuh1johjubjp)}(h u32 flagsh](h)}(hhh]jQ)}(hu32h]hu32}(hj'hhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhj$ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj)modnameN classnameNjj)}j ]jsc.sys_lsm_get_self_attrasbuh1hhj ubj:)}(h h]h }(hjEhhhNhNubah}(h]h ]jFah"]h$]h&]uh1j9hj ubjQ)}(hflagsh]hflags}(hjShhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1johjubeh}(h]h ]h"]h$]h&]hhuh1jihjhhhjhK@ubeh}(h]h ]h"]h$]h&]hhjuh1j!jjhjhhhjhK@ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhK@hjhhubj)}(hhh]j)}(h0Return current task's security module attributesh]h2Return current task’s security module attributes}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:63: ./security/lsm_syscalls.chK@hjzhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhK@ubeh}(h]h ](jfunctioneh"]h$]h&]j"jj#jj$jj%j&j'uh1jhhhjhNhNubj))}(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]j3)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j2hjubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:63: ./security/lsm_syscalls.chKDhjubjI)}(hhh](jN)}(h0``unsigned int attr`` which attribute to return h](jT)}(h``unsigned int attr``h]j)}(hjh]hunsigned int attr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jShY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:63: ./security/lsm_syscalls.chKAhjubjn)}(hhh]j)}(hwhich attribute to returnh]hwhich attribute to return}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhKAhjubah}(h]h ]h"]h$]h&]uh1jmhjubeh}(h]h ]h"]h$]h&]uh1jMhjhKAhjubjN)}(hX``struct lsm_ctx __user * ctx`` the user-space destination for the information, or NULL h](jT)}(h``struct lsm_ctx __user * ctx``h]j)}(hjh]hstruct lsm_ctx __user * ctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jShY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:63: ./security/lsm_syscalls.chKBhjubjn)}(hhh]j)}(h7the user-space destination for the information, or NULLh]h7the user-space destination for the information, or NULL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj hKBhj ubah}(h]h ]h"]h$]h&]uh1jmhjubeh}(h]h ]h"]h$]h&]uh1jMhj hKBhjubjN)}(hQ``u32 __user * size`` pointer to the size of space available to receive the data h](jT)}(h``u32 __user * size``h]j)}(hj0 h]hu32 __user * size}(hj2 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj. ubah}(h]h ]h"]h$]h&]uh1jShY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:63: ./security/lsm_syscalls.chKChj* ubjn)}(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}(hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjE hKChjF ubah}(h]h ]h"]h$]h&]uh1jmhj* ubeh}(h]h ]h"]h$]h&]uh1jMhjE hKChjubjN)}(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](jT)}(h ``u32 flags``h]j)}(hji h]h u32 flags}(hjk hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjg ubah}(h]h ]h"]h$]h&]uh1jShY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:63: ./security/lsm_syscalls.chKFhjc ubjn)}(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 }(hj hhhNhNubj3)}(h**ctx**h]hctx}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j2hj ubh be reported.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:63: ./security/lsm_syscalls.chKDhj ubah}(h]h ]h"]h$]h&]uh1jmhjc ubeh}(h]h ]h"]h$]h&]uh1jMhj~ hKFhjubeh}(h]h ]h"]h$]h&]uh1jHhjubj)}(h**Description**h]j3)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j2hj ubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:63: ./security/lsm_syscalls.chKHhjubj)}(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 hhhNhNubj3)}(h**ctx**h]hctx}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j2hj ubhR array elements. This value may be zero if there are no LSM contexts assigned. If }(hj hhhNhNubj3)}(h**size**h]hsize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j2hj ubhC is insufficient to contain the return data -E2BIG is returned and }(hj hhhNhNubj3)}(h**size**h]hsize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j2hj 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.chKGhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j(hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!sys_lsm_list_modules (C function)c.sys_lsm_list_moduleshNtauh1jhjhhhNhNubj)}(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}(hj2 hhhNhNubah}(h]h ]j4ah"]h$]h&]uh1j'hj. hhhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:66: ./security/lsm_syscalls.chKVubj:)}(h h]h }(hjA hhhNhNubah}(h]h ]jFah"]h$]h&]uh1j9hj. hhhj@ hKVubjK)}(hsys_lsm_list_modulesh]jQ)}(hsys_lsm_list_modulesh]hsys_lsm_list_modules}(hjS hhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhjO ubah}(h]h ](jdjeeh"]h$]h&]hhuh1jJhj. hhhj@ hKVubjj)}(h.(u64 __user *ids, u32 __user *size, u32 flags)h](jp)}(hu64 __user *idsh](h)}(hhh]jQ)}(hu64h]hu64}(hjr hhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhjo ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjt modnameN classnameNjj)}j ]j )}jjU sbc.sys_lsm_list_modulesasbuh1hhjk ubj:)}(h h]h }(hj hhhNhNubah}(h]h ]jFah"]h$]h&]uh1j9hjk ubh__user}(hjk hhhNhNubj:)}(h h]h }(hj hhhNhNubah}(h]h ]jFah"]h$]h&]uh1j9hjk ubj2)}(hj5h]h*}(hj hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjk ubjQ)}(hidsh]hids}(hj hhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhjk ubeh}(h]h ]h"]h$]h&]noemphhhuh1johjg ubjp)}(hu32 __user *sizeh](h)}(hhh]jQ)}(hu32h]hu32}(hj hhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j ]j c.sys_lsm_list_modulesasbuh1hhj ubj:)}(h h]h }(hj hhhNhNubah}(h]h ]jFah"]h$]h&]uh1j9hj ubh__user}(hj hhhNhNubj:)}(h h]h }(hj hhhNhNubah}(h]h ]jFah"]h$]h&]uh1j9hj ubj2)}(hj5h]h*}(hj hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj ubjQ)}(hsizeh]hsize}(hj& hhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1johjg ubjp)}(h u32 flagsh](h)}(hhh]jQ)}(hu32h]hu32}(hjB hhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhj? ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjD modnameN classnameNjj)}j ]j c.sys_lsm_list_modulesasbuh1hhj; ubj:)}(h h]h }(hj` hhhNhNubah}(h]h ]jFah"]h$]h&]uh1j9hj; ubjQ)}(hflagsh]hflags}(hjn hhhNhNubah}(h]h ]j]ah"]h$]h&]uh1jPhj; ubeh}(h]h ]h"]h$]h&]noemphhhuh1johjg ubeh}(h]h ]h"]h$]h&]hhuh1jihj. hhhj@ hKVubeh}(h]h ]h"]h$]h&]hhjuh1j!jjhj* hhhj@ hKVubah}(h]j% ah ](jjeh"]h$]h&]jj)jhuh1jhj@ hKVhj' 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.chKVhj hhubah}(h]h ]h"]h$]h&]uh1jhj' hhhj@ hKVubeh}(h]h ](jfunctioneh"]h$]h&]j"jj#j j$j j%j&j'uh1jhhhjhNhNubj))}(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]j3)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j2hj ubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:66: ./security/lsm_syscalls.chKZhj ubjI)}(hhh](jN)}(h(``u64 __user * ids`` the LSM module ids h](jT)}(h``u64 __user * ids``h]j)}(hj h]hu64 __user * ids}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jShY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:66: ./security/lsm_syscalls.chKWhj ubjn)}(hhh]j)}(hthe LSM module idsh]hthe LSM module ids}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj hKWhj ubah}(h]h ]h"]h$]h&]uh1jmhj ubeh}(h]h ]h"]h$]h&]uh1jMhj hKWhj ubjN)}(hD``u32 __user * size`` pointer to size of **ids**, updated on return h](jT)}(h``u32 __user * size``h]j)}(hj h]hu32 __user * size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jShY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:66: ./security/lsm_syscalls.chKXhj ubjn)}(hhh]j)}(h-pointer to size of **ids**, updated on returnh](hpointer to size of }(hj+ hhhNhNubj3)}(h**ids**h]hids}(hj3 hhhNhNubah}(h]h ]h"]h$]h&]uh1j2hj+ ubh, updated on return}(hj+ hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhj' hKXhj( ubah}(h]h ]h"]h$]h&]uh1jmhj ubeh}(h]h ]h"]h$]h&]uh1jMhj' hKXhj ubjN)}(h4``u32 flags`` reserved for future use, must be zero h](jT)}(h ``u32 flags``h]j)}(hj] h]h u32 flags}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ ubah}(h]h ]h"]h$]h&]uh1jShY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:66: ./security/lsm_syscalls.chKYhjW ubjn)}(hhh]j)}(h%reserved for future use, must be zeroh]h%reserved for future use, must be zero}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr hKYhjs ubah}(h]h ]h"]h$]h&]uh1jmhjW ubeh}(h]h ]h"]h$]h&]uh1jMhjr hKYhj ubeh}(h]h ]h"]h$]h&]uh1jHhj ubj)}(h**Description**h]j3)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j2hj ubah}(h]h ]h"]h$]h&]uh1jhY/var/lib/git/docbuild/linux/Documentation/userspace-api/lsm:66: ./security/lsm_syscalls.chK[hj 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 hhhNhNubj3)}(h**ids**h]hids}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j2hj ubhH array elements. This value may be zero if there are no LSMs active. If }(hj hhhNhNubj3)}(h**size**h]hsize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j2hj ubhC is insufficient to contain the return data -E2BIG is returned and }(hj hhhNhNubj3)}(h**size**h]hsize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j2hj 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.chKZhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1j(hjhhhNhNubeh}(h]