Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-5.4' into for-linus

+51 -23
+7 -8
Documentation/ABI/testing/dev-kmsg
··· 12 12 The logged line can be prefixed with a <N> syslog prefix, which 13 13 carries the syslog priority and facility. The single decimal 14 14 prefix number is composed of the 3 lowest bits being the syslog 15 - priority and the higher bits the syslog facility number. 15 + priority and the next 8 bits the syslog facility number. 16 16 17 17 If no prefix is given, the priority number is the default kernel 18 18 log priority and the facility number is set to LOG_USER (1). It ··· 90 90 +sound:card0 - subsystem:devname 91 91 92 92 The flags field carries '-' by default. A 'c' indicates a 93 - fragment of a line. All following fragments are flagged with 94 - '+'. Note, that these hints about continuation lines are not 95 - necessarily correct, and the stream could be interleaved with 96 - unrelated messages, but merging the lines in the output 97 - usually produces better human readable results. A similar 98 - logic is used internally when messages are printed to the 99 - console, /proc/kmsg or the syslog() syscall. 93 + fragment of a line. Note, that these hints about continuation 94 + lines are not necessarily correct, and the stream could be 95 + interleaved with unrelated messages, but merging the lines in 96 + the output usually produces better human readable results. A 97 + similar logic is used internally when messages are printed to 98 + the console, /proc/kmsg or the syslog() syscall. 100 99 101 100 By default, kernel tries to avoid fragments by concatenating 102 101 when it can and fragments are rare; however, when extended
+11 -4
kernel/printk/braille.c
··· 11 11 12 12 int _braille_console_setup(char **str, char **brl_options) 13 13 { 14 - if (!strncmp(*str, "brl,", 4)) { 14 + size_t len; 15 + 16 + len = str_has_prefix(*str, "brl,"); 17 + if (len) { 15 18 *brl_options = ""; 16 - *str += 4; 17 - } else if (!strncmp(*str, "brl=", 4)) { 18 - *brl_options = *str + 4; 19 + *str += len; 20 + return 0; 21 + } 22 + 23 + len = str_has_prefix(*str, "brl="); 24 + if (len) { 25 + *brl_options = *str + len; 19 26 *str = strchr(*brl_options, ','); 20 27 if (!*str) { 21 28 pr_err("need port name after brl=\n");
+18 -8
kernel/printk/printk.c
··· 118 118 119 119 static int __control_devkmsg(char *str) 120 120 { 121 + size_t len; 122 + 121 123 if (!str) 122 124 return -EINVAL; 123 125 124 - if (!strncmp(str, "on", 2)) { 126 + len = str_has_prefix(str, "on"); 127 + if (len) { 125 128 devkmsg_log = DEVKMSG_LOG_MASK_ON; 126 - return 2; 127 - } else if (!strncmp(str, "off", 3)) { 128 - devkmsg_log = DEVKMSG_LOG_MASK_OFF; 129 - return 3; 130 - } else if (!strncmp(str, "ratelimit", 9)) { 131 - devkmsg_log = DEVKMSG_LOG_MASK_DEFAULT; 132 - return 9; 129 + return len; 133 130 } 131 + 132 + len = str_has_prefix(str, "off"); 133 + if (len) { 134 + devkmsg_log = DEVKMSG_LOG_MASK_OFF; 135 + return len; 136 + } 137 + 138 + len = str_has_prefix(str, "ratelimit"); 139 + if (len) { 140 + devkmsg_log = DEVKMSG_LOG_MASK_DEFAULT; 141 + return len; 142 + } 143 + 134 144 return -EINVAL; 135 145 } 136 146
+5
lib/test_printf.c
··· 455 455 test("foo", "%pd", &test_dentry[0]); 456 456 test("foo", "%pd2", &test_dentry[0]); 457 457 458 + test("(null)", "%pd", NULL); 459 + test("(efault)", "%pd", PTR_INVALID); 460 + test("(null)", "%pD", NULL); 461 + test("(efault)", "%pD", PTR_INVALID); 462 + 458 463 test("romeo", "%pd", &test_dentry[3]); 459 464 test("alfa/romeo", "%pd2", &test_dentry[3]); 460 465 test("bravo/alfa/romeo", "%pd3", &test_dentry[3]);
+10 -3
lib/vsprintf.c
··· 869 869 return widen_string(buf, n, end, spec); 870 870 } 871 871 872 + static noinline_for_stack 873 + char *file_dentry_name(char *buf, char *end, const struct file *f, 874 + struct printf_spec spec, const char *fmt) 875 + { 876 + if (check_pointer(&buf, end, f, spec)) 877 + return buf; 878 + 879 + return dentry_name(buf, end, f->f_path.dentry, spec, fmt); 880 + } 872 881 #ifdef CONFIG_BLOCK 873 882 static noinline_for_stack 874 883 char *bdev_name(char *buf, char *end, struct block_device *bdev, ··· 2175 2166 case 'C': 2176 2167 return clock(buf, end, ptr, spec, fmt); 2177 2168 case 'D': 2178 - return dentry_name(buf, end, 2179 - ((const struct file *)ptr)->f_path.dentry, 2180 - spec, fmt); 2169 + return file_dentry_name(buf, end, ptr, spec, fmt); 2181 2170 #ifdef CONFIG_BLOCK 2182 2171 case 'g': 2183 2172 return bdev_name(buf, end, ptr, spec, fmt);