From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [RFC PATCH v3 10/10] ima: Print /proc/cmdline and IMA kernel config
Date: Wed, 25 Apr 2018 15:16:20 +0200 [thread overview]
Message-ID: <20180425131620.GA27526@x230> (raw)
In-Reply-To: <20180425074116.hic5a3nfunyxamcd@g206.suse.de>
Hi Michael,
thank you for your comment.
> On Tue, Apr 24, 2018 at 08:35:56PM +0200, Petr Vorel wrote:
> > +print_ima_config()
> > +{
> > + local config="/boot/config-$(uname -r)"
> Just a small remark here: not all distributions have /boot/config-* files
> in place. I don't remember which ones this were.
> Wouldn't it make sense to check this file, if it does not exist check
> if /proc/config.gz is available?
I haven't found any normal distro not having config in place (openSUSE/SLE, Debian/Ubuntu,
CentOS/Red Hat), but there might be some. I guess most of embedded devices don't have
that (it's a question if they have IKCONFIG_PROC=y) but why not to try it.
I wonder if we'd benefit from having these functions in shell API:
is_enabled(CONFIG_FOO)
is_module(CONFIG_FOO)
is_builtin(CONFIG_FOO)
which would do simple grep of either /boot/config-$(uname -r) or /proc/config.gz.
The first three are inspired with kernel macros from include/linux/kconfig.h
> Kind regards,
> Michael
Kind regards,
Petr
next prev parent reply other threads:[~2018-04-25 13:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-24 18:35 [LTP] [RFC PATCH v3 10/10] ima: Print /proc/cmdline and IMA kernel config Petr Vorel
2018-04-25 7:41 ` Michael Moese
2018-04-25 13:16 ` Petr Vorel [this message]
2018-04-25 13:40 ` Cyril Hrubis
2018-04-25 14:02 ` Petr Vorel
2018-04-25 14:07 ` Cyril Hrubis
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=20180425131620.GA27526@x230 \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
/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 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.