Skip to content

Commit 1b10d2c

Browse files
committed
Merge tag 'bootconfig-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull bootconfig updates from Masami Hiramatsu: - Documentation update for /proc/cmdline, which includes both the parameters from bootloader and the embedded parameters in the kernel - fs/proc: Add bootloader argument as a comment line to /proc/bootconfig so that the user can distinguish what parameters were passed from bootloader even if bootconfig modified that - Documentation fix to add /proc/bootconfig to proc.rst * tag 'bootconfig-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: doc: Add /proc/bootconfig to proc.rst fs/proc: Add boot loader arguments as comment to /proc/bootconfig doc: Update /proc/cmdline documentation to include boot config
2 parents 1e0c505 + acbc3ec commit 1b10d2c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Documentation/filesystems/proc.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,9 +689,15 @@ files are there, and which are missing.
689689
File Content
690690
============ ===============================================================
691691
apm Advanced power management info
692+
bootconfig Kernel command line obtained from boot config,
693+
and, if there were kernel parameters from the
694+
boot loader, a "# Parameters from bootloader:"
695+
line followed by a line containing those
696+
parameters prefixed by "# ". (5.5)
692697
buddyinfo Kernel memory allocator information (see text) (2.5)
693698
bus Directory containing bus specific information
694-
cmdline Kernel command line
699+
cmdline Kernel command line, both from bootloader and embedded
700+
in the kernel image
695701
cpuinfo Info about the CPU
696702
devices Available devices (block and character)
697703
dma Used DMS channels

fs/proc/bootconfig.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ static int __init copy_xbc_key_value_list(char *dst, size_t size)
6262
break;
6363
dst += ret;
6464
}
65+
if (ret >= 0 && boot_command_line[0]) {
66+
ret = snprintf(dst, rest(dst, end), "# Parameters from bootloader:\n# %s\n",
67+
boot_command_line);
68+
if (ret > 0)
69+
dst += ret;
70+
}
6571
}
6672
out:
6773
kfree(key);

0 commit comments

Comments
 (0)