From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v4 4/7] Add lsm_get_self_attr03 test
Date: Mon, 2 Jun 2025 18:35:56 +0200 [thread overview]
Message-ID: <501ca64d-10d5-46b5-967b-e76a201cb171@suse.com> (raw)
In-Reply-To: <aD23bPyqhaAAkPXH@yuki.lan>
On 6/2/25 16:38, Cyril Hrubis wrote:
> Hi!
>>> next_ctx(next)
>>>
>>> Otherwise we will fail the check below.
>> Right.
> Feel free to add my Reviewed-by: with that fixed.
Ok
>
>>>> + for (uint32_t i = 1; i < count; i++) {
>>>> + TST_EXP_EXPR(strcmp(attr, (char *)next->ctx) != 0,
>>>> + "Attribute and next LSM context must be different");
>>>> +
>>>> + next = next_ctx(next);
>>>> + }
>>> Have you actually tried this on a machine with more than one LSM active?
>> Fixed, also I think I we to check if "/sys/kernel/security/lsm" exists.
>> I guess it doesn't exist if no LSM are present.
> We do call verify_supported_attr_current(); in the setup, that should be
> enough. What I was asking for was if you ever tested this code on a
> mach9ine where the count > 1 so that the loop actually triggered.
>
I modify verify_supported_attr_current() in order to check if
/sys/kernel/security/lsm exists.
And yes, I tested the code on a VM with 7 LSM(s).
Gonna send the next patch and then merge.
Thanks,
Andrea
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-06-02 16:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 7:18 [LTP] [PATCH v4 0/7] LSM testing suite Andrea Cervesato
2025-04-29 7:18 ` [LTP] [PATCH v4 1/7] Add fallback definitions of LSM syscalls Andrea Cervesato
2025-06-02 12:05 ` Cyril Hrubis
2025-04-29 7:18 ` [LTP] [PATCH v4 2/7] Add lsm_get_self_attr01 test Andrea Cervesato
2025-04-29 7:18 ` [LTP] [PATCH v4 3/7] Add lsm_get_self_attr02 test Andrea Cervesato
2025-06-02 12:16 ` Cyril Hrubis
2025-04-29 7:18 ` [LTP] [PATCH v4 4/7] Add lsm_get_self_attr03 test Andrea Cervesato
2025-06-02 12:46 ` Cyril Hrubis
2025-06-02 13:18 ` Andrea Cervesato via ltp
2025-06-02 14:38 ` Cyril Hrubis
2025-06-02 16:35 ` Andrea Cervesato via ltp [this message]
2025-04-29 7:18 ` [LTP] [PATCH v4 5/7] Add lsm_list_modules01 test Andrea Cervesato
2025-04-29 7:18 ` [LTP] [PATCH v4 6/7] Add lsm_list_modules02 test Andrea Cervesato
2025-06-02 14:59 ` Cyril Hrubis
2025-04-29 7:18 ` [LTP] [PATCH v4 7/7] Add lsm_set_self_attr01 test Andrea Cervesato
2025-06-02 15:17 ` Cyril Hrubis
2025-06-05 8:13 ` Petr Vorel
2025-06-05 8:18 ` Petr Vorel
2025-06-05 8:25 ` Andrea Cervesato via ltp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=501ca64d-10d5-46b5-967b-e76a201cb171@suse.com \
--to=ltp@lists.linux.it \
--cc=andrea.cervesato@suse.com \
--cc=chrubis@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox