All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] function tst_parse_cmdline exist?
@ 2024-03-04  8:44 Li Wang
  2024-03-04 15:23 ` Cyril Hrubis
  0 siblings, 1 reply; 3+ messages in thread
From: Li Wang @ 2024-03-04  8:44 UTC (permalink / raw)
  To: LTP List

Hi All,

Do we have a funcion similar to tst_parse_cmdline() in LTP lib?

I asking this because recently people reached to me about the
init_module01 failing on the system with ' module.sig_enforce=1'
kernel parameter. That makes me think there are quite many
various kernel parameter changes in some behavior when added in,
so if not, I can help to create one to do such a thing.

In a word, the main purpose is just to parse '/proc/cmdline' contents
and export the necessary value to test case.

Or, any suggestions on the topic?

<<<test_output>>>
tst_lockdown.c:82: TINFO: Kernel lockdown: off
tst_lockdown.c:31: TINFO: SecureBoot sysfs file not available
tst_test.c:1709: TINFO: LTP version: 20240129
tst_test.c:1593: TINFO: Timeout per run is 0h 00m 30s
finit_module01.c:35: TFAIL: finit_module(fd, "status=valid", 0) failed:
EKEYREJECTED (129)

Summary:
passed   0
failed   1
broken   0
skipped  0
warnings 0


-- 
Regards,
Li Wang

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] function tst_parse_cmdline exist?
  2024-03-04  8:44 [LTP] function tst_parse_cmdline exist? Li Wang
@ 2024-03-04 15:23 ` Cyril Hrubis
  2024-03-05  3:15   ` Li Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Cyril Hrubis @ 2024-03-04 15:23 UTC (permalink / raw)
  To: Li Wang; +Cc: LTP List

Hi!
> Do we have a funcion similar to tst_parse_cmdline() in LTP lib?

Not yet.

> I asking this because recently people reached to me about the
> init_module01 failing on the system with ' module.sig_enforce=1'
> kernel parameter. That makes me think there are quite many
> various kernel parameter changes in some behavior when added in,
> so if not, I can help to create one to do such a thing.

I suppose that there is no other way to figure out that the signatures
are enforced via commandline, right?

> In a word, the main purpose is just to parse '/proc/cmdline' contents
> and export the necessary value to test case.
> 
> Or, any suggestions on the topic?

We already parse cmdline in the stack_clash.c test, so I suppose we may
as well add a function to the test library.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] function tst_parse_cmdline exist?
  2024-03-04 15:23 ` Cyril Hrubis
@ 2024-03-05  3:15   ` Li Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Li Wang @ 2024-03-05  3:15 UTC (permalink / raw)
  To: Cyril Hrubis; +Cc: LTP List

On Mon, Mar 4, 2024 at 11:24 PM Cyril Hrubis <chrubis@suse.cz> wrote:

> Hi!
> > Do we have a funcion similar to tst_parse_cmdline() in LTP lib?
>
> Not yet.
>
> > I asking this because recently people reached to me about the
> > init_module01 failing on the system with ' module.sig_enforce=1'
> > kernel parameter. That makes me think there are quite many
> > various kernel parameter changes in some behavior when added in,
> > so if not, I can help to create one to do such a thing.
>
> I suppose that there is no other way to figure out that the signatures
> are enforced via commandline, right?
>

Right (at least based on my knowledge), we have to parse '/proc/cmdline'
and detect the key parameters for determining where the test goes next.

(i.e. init_module01: PASS without that parameter 'module.sig_enforce=1',
FAIL as expected with having it)



>
> > In a word, the main purpose is just to parse '/proc/cmdline' contents
> > and export the necessary value to test case.
> >
> > Or, any suggestions on the topic?
>
> We already parse cmdline in the stack_clash.c test, so I suppose we may
> as well add a function to the test library.
>

Thanks for the info, I guess we need a more generic function for wide use
in the lib, I prefer to name it tst_parse_kcmdline() simply but maybe extend
something if necessary.


-- 
Regards,
Li Wang

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-05  3:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-04  8:44 [LTP] function tst_parse_cmdline exist? Li Wang
2024-03-04 15:23 ` Cyril Hrubis
2024-03-05  3:15   ` Li Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.