printk changes for 6.4
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEESH4wyp42V4tXvYsjUqAMR0iAlPIFAmRGaygACgkQUqAMR0iA lPKlGBAAqn0yS8E2CP16Oo8nCB5AjoPVzohh6pQ6O8G0CFhvu47EKVTHPTa1BEFE YAz94geN5crpAmEcQyBcqkcJuLRXmYBOqE1x9M4PcCUUXTjcyYEzBYsOZO+j5jB7 LUPX6jBbm2PpbT/e1ZSr90R8MhblVfBTD7DJHmXGhibYHj5D4KOwxQnhx8uWz9aT dgTWm1AgwEX85wUpXil5phD+YnvI/TxGlyV4AVOYh3y3K7Kc4CAeHFzCsg3h/Amr c2RR1dzvmMcEvg8lF3U9MsnVNF/2i0Tg9BXLRxSe1c20CKhtzNNPH5krPa3vHGeP P//FWDAd9S2hev54TN7LO92V+IsDh8nlU++HwRua50wflzJU/tkyWDtcmmlkGU6A hqtMUWE4libAaAW7FBJomRFirmEtEA4GwXN5WH3+B6htgVwKKrKhL9U/PtQtZxZ1 GUEvtjmnBIfGndu7fHv70a1sLc9LuebOfmOQs3W6p6KUZkmL1Hqg1WGQoYwmUz4A bZRbCwMYNJCG4iO2jDmPU27D6tWMbQdt1kZ20svP6p3PRGy8EuI1C5tnO5Jhkw3E FCFudMMZEuZmBoztWWqEkZSfbMDlH6kc1+6+HMuCfSrpg6QD87TzO5CONIHCZyk9 f3UD04R//BubTdiKQ4y/g6OwctihX7F8i3O71hTj5etuYqPs0nI= =t0d6 -----END PGP SIGNATURE----- Merge tag 'printk-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk updates from Petr Mladek: - Code cleanup and dead code removal * tag 'printk-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printk: Remove obsoleted check for non-existent "user" object lib/vsprintf: Use isodigit() for the octal number check Remove orphaned CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT
This commit is contained in:
commit
7ec85f3e08
@ -4,7 +4,6 @@ CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_PREEMPT_VOLUNTARY=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_LOG_BUF_SHIFT=16
|
||||
CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=12
|
||||
CONFIG_CGROUPS=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
|
@ -1,6 +1,5 @@
|
||||
# CONFIG_CPU_ISOLATION is not set
|
||||
CONFIG_LOG_BUF_SHIFT=13
|
||||
CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=12
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
# CONFIG_RD_GZIP is not set
|
||||
# CONFIG_RD_BZIP2 is not set
|
||||
|
@ -1,6 +1,5 @@
|
||||
# CONFIG_CPU_ISOLATION is not set
|
||||
CONFIG_LOG_BUF_SHIFT=13
|
||||
CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=12
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_SYSFS_SYSCALL is not set
|
||||
# CONFIG_FHANDLE is not set
|
||||
|
@ -1,6 +1,5 @@
|
||||
# CONFIG_CPU_ISOLATION is not set
|
||||
CONFIG_LOG_BUF_SHIFT=16
|
||||
CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=12
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
# CONFIG_RD_BZIP2 is not set
|
||||
# CONFIG_RD_LZMA is not set
|
||||
|
24
init/Kconfig
24
init/Kconfig
@ -765,30 +765,6 @@ config LOG_CPU_MAX_BUF_SHIFT
|
||||
13 => 8 KB for each CPU
|
||||
12 => 4 KB for each CPU
|
||||
|
||||
config PRINTK_SAFE_LOG_BUF_SHIFT
|
||||
int "Temporary per-CPU printk log buffer size (12 => 4KB, 13 => 8KB)"
|
||||
range 10 21
|
||||
default 13
|
||||
depends on PRINTK
|
||||
help
|
||||
Select the size of an alternate printk per-CPU buffer where messages
|
||||
printed from unsafe contexts are temporary stored. One example would
|
||||
be NMI messages, another one - printk recursion. The messages are
|
||||
copied to the main log buffer in a safe context to avoid a deadlock.
|
||||
The value defines the size as a power of 2.
|
||||
|
||||
Those messages are rare and limited. The largest one is when
|
||||
a backtrace is printed. It usually fits into 4KB. Select
|
||||
8KB if you want to be on the safe side.
|
||||
|
||||
Examples:
|
||||
17 => 128 KB for each CPU
|
||||
16 => 64 KB for each CPU
|
||||
15 => 32 KB for each CPU
|
||||
14 => 16 KB for each CPU
|
||||
13 => 8 KB for each CPU
|
||||
12 => 4 KB for each CPU
|
||||
|
||||
config PRINTK_INDEX
|
||||
bool "Printk indexing debugfs interface"
|
||||
depends on PRINTK && DEBUG_FS
|
||||
|
@ -730,7 +730,7 @@ static ssize_t devkmsg_write(struct kiocb *iocb, struct iov_iter *from)
|
||||
size_t len = iov_iter_count(from);
|
||||
ssize_t ret = len;
|
||||
|
||||
if (!user || len > PRINTKRB_RECORD_MAX)
|
||||
if (len > PRINTKRB_RECORD_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
/* Ignore when user logging is disabled. */
|
||||
@ -792,9 +792,6 @@ static ssize_t devkmsg_read(struct file *file, char __user *buf,
|
||||
};
|
||||
ssize_t ret;
|
||||
|
||||
if (!user)
|
||||
return -EBADF;
|
||||
|
||||
ret = mutex_lock_interruptible(&user->lock);
|
||||
if (ret)
|
||||
return ret;
|
||||
@ -859,8 +856,6 @@ static loff_t devkmsg_llseek(struct file *file, loff_t offset, int whence)
|
||||
struct devkmsg_user *user = file->private_data;
|
||||
loff_t ret = 0;
|
||||
|
||||
if (!user)
|
||||
return -EBADF;
|
||||
if (offset)
|
||||
return -ESPIPE;
|
||||
|
||||
@ -893,9 +888,6 @@ static __poll_t devkmsg_poll(struct file *file, poll_table *wait)
|
||||
struct printk_info info;
|
||||
__poll_t ret = 0;
|
||||
|
||||
if (!user)
|
||||
return EPOLLERR|EPOLLNVAL;
|
||||
|
||||
poll_wait(file, &log_wait, wait);
|
||||
|
||||
if (prb_read_valid_info(prb, atomic64_read(&user->seq), &info, NULL)) {
|
||||
@ -944,9 +936,6 @@ static int devkmsg_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct devkmsg_user *user = file->private_data;
|
||||
|
||||
if (!user)
|
||||
return 0;
|
||||
|
||||
ratelimit_state_exit(&user->rs);
|
||||
|
||||
mutex_destroy(&user->lock);
|
||||
|
@ -3621,7 +3621,7 @@ int vsscanf(const char *buf, const char *fmt, va_list args)
|
||||
if (!digit
|
||||
|| (base == 16 && !isxdigit(digit))
|
||||
|| (base == 10 && !isdigit(digit))
|
||||
|| (base == 8 && (!isdigit(digit) || digit > '7'))
|
||||
|| (base == 8 && !isodigit(digit))
|
||||
|| (base == 0 && !isdigit(digit)))
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user