* [PATCH] compat: remove compat_printk
@ 2016-06-17 14:26 Arnd Bergmann
2016-06-21 23:38 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2016-06-17 14:26 UTC (permalink / raw)
To: Andrew Morton
Cc: Arnd Bergmann, Alexander Viro, Theodore Ts'o,
Arnaldo Carvalho de Melo, linux-fsdevel, linux-kernel
After 7e8e385aaf6e ("x86/compat: Remove sys32_vm86_warning"), this
function has become unused, so we can remove it as well.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
fs/compat.c | 14 --------------
include/linux/compat.h | 1 -
kernel/sysctl.c | 10 ----------
3 files changed, 25 deletions(-)
diff --git a/fs/compat.c b/fs/compat.c
index be6e48b0a46c..e07968974391 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -54,20 +54,6 @@
#include <asm/ioctls.h>
#include "internal.h"
-int compat_log = 1;
-
-int compat_printk(const char *fmt, ...)
-{
- va_list ap;
- int ret;
- if (!compat_log)
- return 0;
- va_start(ap, fmt);
- ret = vprintk(fmt, ap);
- va_end(ap);
- return ret;
-}
-
/*
* Not all architectures have sys_utime, so implement this in terms
* of sys_utimes.
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 0c510f25cf99..5adf66de6e6b 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -433,7 +433,6 @@ asmlinkage long compat_sys_settimeofday(struct compat_timeval __user *tv,
asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp);
-extern __printf(1, 2) int compat_printk(const char *fmt, ...);
extern void sigset_from_compat(sigset_t *set, const compat_sigset_t *compat);
extern void sigset_to_compat(compat_sigset_t *compat, const sigset_t *set);
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 35f0dcb1cb4f..de331c3858e5 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -106,7 +106,6 @@ extern unsigned int core_pipe_limit;
extern int pid_max;
extern int pid_max_min, pid_max_max;
extern int percpu_pagelist_fraction;
-extern int compat_log;
extern int latencytop_enabled;
extern int sysctl_nr_open_min, sysctl_nr_open_max;
#ifndef CONFIG_MMU
@@ -1077,15 +1076,6 @@ static struct ctl_table kern_table[] = {
.extra1 = &neg_one,
},
#endif
-#ifdef CONFIG_COMPAT
- {
- .procname = "compat-log",
- .data = &compat_log,
- .maxlen = sizeof (int),
- .mode = 0644,
- .proc_handler = proc_dointvec,
- },
-#endif
#ifdef CONFIG_RT_MUTEXES
{
.procname = "max_lock_depth",
--
2.9.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] compat: remove compat_printk
2016-06-17 14:26 [PATCH] compat: remove compat_printk Arnd Bergmann
@ 2016-06-21 23:38 ` Andrew Morton
2016-06-22 10:15 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2016-06-21 23:38 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Alexander Viro, Theodore Ts'o, Arnaldo Carvalho de Melo,
linux-fsdevel, linux-kernel
On Fri, 17 Jun 2016 16:26:21 +0200 Arnd Bergmann <arnd@arndb.de> wrote:
> After 7e8e385aaf6e ("x86/compat: Remove sys32_vm86_warning"), this
> function has become unused, so we can remove it as well.
hm,
> @@ -1077,15 +1076,6 @@ static struct ctl_table kern_table[] = {
> .extra1 = &neg_one,
> },
> #endif
> -#ifdef CONFIG_COMPAT
> - {
> - .procname = "compat-log",
> - .data = &compat_log,
> - .maxlen = sizeof (int),
> - .mode = 0644,
> - .proc_handler = proc_dointvec,
> - },
> -#endif
How do we know we can simply remove /proc/sys/kernel/compat-log without
breaking any userspace?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] compat: remove compat_printk
2016-06-21 23:38 ` Andrew Morton
@ 2016-06-22 10:15 ` Arnd Bergmann
2016-06-22 17:09 ` Andreas Dilger
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2016-06-22 10:15 UTC (permalink / raw)
To: Andrew Morton
Cc: Alexander Viro, Theodore Ts'o, Arnaldo Carvalho de Melo,
linux-fsdevel, linux-kernel
On Tuesday, June 21, 2016 4:38:57 PM CEST Andrew Morton wrote:
> > @@ -1077,15 +1076,6 @@ static struct ctl_table kern_table[] = {
> > .extra1 = &neg_one,
> > },
> > #endif
> > -#ifdef CONFIG_COMPAT
> > - {
> > - .procname = "compat-log",
> > - .data = &compat_log,
> > - .maxlen = sizeof (int),
> > - .mode = 0644,
> > - .proc_handler = proc_dointvec,
> > - },
> > -#endif
>
> How do we know we can simply remove /proc/sys/kernel/compat-log without
> breaking any userspace?
>
Good point. I guess we can leave this in place just in case (with a comment)
and just remove the compat_printk function. We could probably have a Kconfig
symbol for obsolete sysctl files, but if this is the only one controlled
by it, it's probably not worth the effort.
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] compat: remove compat_printk
2016-06-22 10:15 ` Arnd Bergmann
@ 2016-06-22 17:09 ` Andreas Dilger
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Dilger @ 2016-06-22 17:09 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Andrew Morton, Alexander Viro, Theodore Ts'o,
Arnaldo Carvalho de Melo, linux-fsdevel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]
> On Jun 22, 2016, at 4:15 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Tuesday, June 21, 2016 4:38:57 PM CEST Andrew Morton wrote:
>>> @@ -1077,15 +1076,6 @@ static struct ctl_table kern_table[] = {
>>> .extra1 = &neg_one,
>>> },
>>> #endif
>>> -#ifdef CONFIG_COMPAT
>>> - {
>>> - .procname = "compat-log",
>>> - .data = &compat_log,
>>> - .maxlen = sizeof (int),
>>> - .mode = 0644,
>>> - .proc_handler = proc_dointvec,
>>> - },
>>> -#endif
>>
>> How do we know we can simply remove /proc/sys/kernel/compat-log without
>> breaking any userspace?
>>
>
> Good point. I guess we can leave this in place just in case (with a comment)
> and just remove the compat_printk function. We could probably have a Kconfig
> symbol for obsolete sysctl files, but if this is the only one controlled
> by it, it's probably not worth the effort.
It probably makes sense to print a deprecation warning containing the current
process name if this /proc file is modified, so that users can update any
scripts/tools using it.
Cheers, Andreas
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-22 17:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-17 14:26 [PATCH] compat: remove compat_printk Arnd Bergmann
2016-06-21 23:38 ` Andrew Morton
2016-06-22 10:15 ` Arnd Bergmann
2016-06-22 17:09 ` Andreas Dilger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.