コンソールに出力するレベルを制御する/proc/sys/kernel/printk
の設定を試す必要があります。 proc(5)
から:nice(2)
値のように、下値は高い優先順位を持って、
/proc/sys/kernel/printk
The four values in this file are console_loglevel,
default_message_loglevel, minimum_console_level, and
default_console_loglevel. These values influence
printk() behavior when printing or logging error
messages. See syslog(2) for more info on the
different loglevels. Messages with a higher priority
than console_loglevel will be printed to the console.
Messages without an explicit priority will be printed
with priority default_message_level.
minimum_console_loglevel is the minimum (highest)
value to which console_loglevel can be set.
default_console_loglevel is the default value for
console_loglevel.
注意。
/foo/b
を実行するためのパス/foo/a
ためexecve()
を作るための最も簡単な方法は、/foo/a
の上に/foo/b
をバインド・マウントすることです:
mount -obind /foo/b /foo/a
ませカーネルモジュールは必要ありません。
この同じタスクをカーネルモジュールで実行すると、かなり多くの作業が必要になります。 LSMインターフェースは、ターゲットがいつ実行されているかを把握するのに役立つ情報を提供します。出発地点をお探しの場合は、do_execve()
のfs/exec.c
が読書を開始する場所です。 ctags
をインストールして実行して、エディタのctags
統合を使用する方法を理解しておくと、コードを読みやすくすることができます。