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 tag 'pstore-v6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull tiny pstore update from Kees Cook:

- pstore: Change kmsg_bytes storage size to u32

* tag 'pstore-v6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
pstore: Change kmsg_bytes storage size to u32

+9 -8
+1 -1
fs/pstore/inode.c
··· 266 266 static int pstore_show_options(struct seq_file *m, struct dentry *root) 267 267 { 268 268 if (kmsg_bytes != CONFIG_PSTORE_DEFAULT_KMSG_BYTES) 269 - seq_printf(m, ",kmsg_bytes=%lu", kmsg_bytes); 269 + seq_printf(m, ",kmsg_bytes=%u", kmsg_bytes); 270 270 return 0; 271 271 } 272 272
+2 -2
fs/pstore/internal.h
··· 6 6 #include <linux/time.h> 7 7 #include <linux/pstore.h> 8 8 9 - extern unsigned long kmsg_bytes; 9 + extern unsigned int kmsg_bytes; 10 10 11 11 #ifdef CONFIG_PSTORE_FTRACE 12 12 extern void pstore_register_ftrace(void); ··· 35 35 36 36 extern struct pstore_info *psinfo; 37 37 38 - extern void pstore_set_kmsg_bytes(int); 38 + extern void pstore_set_kmsg_bytes(unsigned int bytes); 39 39 extern void pstore_get_records(int); 40 40 extern void pstore_get_backend_records(struct pstore_info *psi, 41 41 struct dentry *root, int quiet);
+6 -5
fs/pstore/platform.c
··· 92 92 MODULE_PARM_DESC(compress, "compression to use"); 93 93 94 94 /* How much of the kernel log to snapshot */ 95 - unsigned long kmsg_bytes = CONFIG_PSTORE_DEFAULT_KMSG_BYTES; 96 - module_param(kmsg_bytes, ulong, 0444); 95 + unsigned int kmsg_bytes = CONFIG_PSTORE_DEFAULT_KMSG_BYTES; 96 + module_param(kmsg_bytes, uint, 0444); 97 97 MODULE_PARM_DESC(kmsg_bytes, "amount of kernel log to snapshot (in bytes)"); 98 98 99 99 static void *compress_workspace; ··· 107 107 static char *big_oops_buf; 108 108 static size_t max_compressed_size; 109 109 110 - void pstore_set_kmsg_bytes(int bytes) 110 + void pstore_set_kmsg_bytes(unsigned int bytes) 111 111 { 112 - kmsg_bytes = bytes; 112 + WRITE_ONCE(kmsg_bytes, bytes); 113 113 } 114 114 115 115 /* Tag each group of saved records with a sequence number */ ··· 278 278 struct kmsg_dump_detail *detail) 279 279 { 280 280 struct kmsg_dump_iter iter; 281 + unsigned int remaining = READ_ONCE(kmsg_bytes); 281 282 unsigned long total = 0; 282 283 const char *why; 283 284 unsigned int part = 1; ··· 301 300 kmsg_dump_rewind(&iter); 302 301 303 302 oopscount++; 304 - while (total < kmsg_bytes) { 303 + while (total < remaining) { 305 304 char *dst; 306 305 size_t dst_size; 307 306 int header_size;