Memory allocated by kvzalloc() should be freed by kvfree().
Fixes: 34ca65352ddf2 ("net/mlx5: E-Switch, Indirect table infrastructur")
Signed-off-by: Xiaoming Ni
---
.../net/ethernet/mellanox/mlx5/core/esw/indir_table.c | 10 +-
1 file changed, 5 insertions(+), 5 deletion
port")
Reported-by: "kiyin(尹亮)"
Link: https://www.openwall.com/lists/oss-security/2020/11/01/1
Cc: #v3.3
Signed-off-by: Xiaoming Ni
---
net/nfc/llcp_sock.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.c
index 9e2799ee1595..59172614b249
fix Resource leakage and endless loop in net/nfc/llcp_sock.c,
reported by "kiyin(尹亮)".
Link: https://www.openwall.com/lists/oss-security/2020/11/01/1
Xiaoming Ni (4):
nfc: fix refcount leak in llcp_sock_bind()
nfc: fix refcount leak in llcp_sock_connect()
nfc: fix memo
inter when
creating a socket")
Reported-by: "kiyin(尹亮)"
Link: https://www.openwall.com/lists/oss-security/2020/11/01/1
Cc: #v3.6
Signed-off-by: Xiaoming Ni
---
net/nfc/llcp_sock.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.
local pointer when
creating a socket")
Reported-by: "kiyin(尹亮)"
Link: https://www.openwall.com/lists/oss-security/2020/11/01/1
Cc: #v3.6
Signed-off-by: Xiaoming Ni
---
net/nfc/llcp_sock.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.
-security/2020/11/01/1
Cc: #v3.11
Signed-off-by: Xiaoming Ni
---
net/nfc/llcp_sock.c | 4
1 file changed, 4 insertions(+)
diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.c
index 59172614b249..a3b46f03 100644
--- a/net/nfc/llcp_sock.c
+++ b/net/nfc/llcp_sock.c
@@ -673,6 +673,10
state remains unchanged.
Therefore, when llcp_sock_connect() is invoked again, resources such as
llcp_sock->service_name are not repeatedly applied because sk_state is
set to LLCP_CONNECTING.
In this way, the repeated invoking of llcp_sock_connect() does not
repeatedly leak resources.
Th
inter when
creating a socket")
Reported-by: "kiyin(尹亮)"
Link: https://www.openwall.com/lists/oss-security/2020/11/01/1
Cc: #v3.6
Signed-off-by: Xiaoming Ni
---
net/nfc/llcp_sock.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.
port")
Reported-by: "kiyin(尹亮)"
Link: https://www.openwall.com/lists/oss-security/2020/11/01/1
Cc: #v3.3
Signed-off-by: Xiaoming Ni
---
net/nfc/llcp_sock.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.c
index 9e2799ee1595..59172614b249
fix Resource leakage and endless loop in net/nfc/llcp_sock.c,
reported by "kiyin(尹亮)".
Link: https://www.openwall.com/lists/oss-security/2020/11/01/1
Xiaoming Ni (4):
nfc: fix refcount leak in llcp_sock_bind()
nfc: fix refcount leak in llcp_sock_connect()
nfc: fix memo
local pointer when
creating a socket")
Reported-by: "kiyin(尹亮)"
Link: https://www.openwall.com/lists/oss-security/2020/11/01/1
Cc: #v3.6
Signed-off-by: Xiaoming Ni
---
net/nfc/llcp_sock.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.
enwall.com/lists/oss-security/2020/11/01/1
Cc: #v3.11
Signed-off-by: Xiaoming Ni
---
net/nfc/llcp_sock.c | 4
1 file changed, 4 insertions(+)
diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.c
index 59172614b249..a3b46f03 100644
--- a/net/nfc/llcp_sock.c
+++ b/net/nf
On 2021/2/25 16:25, Greg KH wrote:
On Mon, Feb 22, 2021 at 08:53:52PM +0800, Xiaoming Ni wrote:
From: Thomas Gleixner
The handle_exit_race() function is defined in commit c158b461306df82
("futex: Cure exit race"), which never returns -EBUSY. This results
in a small piece of dead c
On 2021/2/24 15:47, Greg KH wrote:
On Wed, Feb 24, 2021 at 09:41:01AM +0800, Xiaoming Ni wrote:
On 2021/2/23 21:00, Greg KH wrote:
On Mon, Feb 22, 2021 at 10:11:37PM +0800, Xiaoming Ni wrote:
On 2021/2/22 20:09, Greg KH wrote:
On Mon, Feb 22, 2021 at 06:54:06PM +0800, Xiaoming Ni wrote:
On
t race")
Cc: sta...@vger.kernel.org # v4.9.258
Signed-off-by: Xiaoming Ni
---
kernel/futex.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/futex.c b/kernel/futex.c
index b65dbb5d60bb..0fd785410150 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1207,11
On 2021/2/23 21:00, Greg KH wrote:
On Mon, Feb 22, 2021 at 10:11:37PM +0800, Xiaoming Ni wrote:
On 2021/2/22 20:09, Greg KH wrote:
On Mon, Feb 22, 2021 at 06:54:06PM +0800, Xiaoming Ni wrote:
On 2021/2/22 18:16, Greg KH wrote:
On Mon, Feb 22, 2021 at 03:03:28PM +0800, Xiaoming Ni wrote
On 2021/2/22 20:09, Greg KH wrote:
On Mon, Feb 22, 2021 at 06:54:06PM +0800, Xiaoming Ni wrote:
On 2021/2/22 18:16, Greg KH wrote:
On Mon, Feb 22, 2021 at 03:03:28PM +0800, Xiaoming Ni wrote:
From: Thomas Gleixner
commit ac31c7ff8624409ba3c4901df9237a616c187a5d upstream.
This commit is
b461306df82 ("futex: Cure exit race")
Cc: sta...@vger.kernel.org # 4.9.258-rc1
Signed-off-by: Xiaoming Ni
---
kernel/futex.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/futex.c b/kernel/futex.c
index b65dbb5d60bb..0fd785410150 100644
--- a/kernel/
On 2021/2/22 18:16, Greg KH wrote:
On Mon, Feb 22, 2021 at 03:03:28PM +0800, Xiaoming Ni wrote:
From: Thomas Gleixner
commit ac31c7ff8624409ba3c4901df9237a616c187a5d upstream.
This commit is already in the 4.9 tree. If the backport was incorrect,
say that here, and describe what went wrong
I found a dead code in the queue/4.9 branch of the stable-rc repository.
2021-02-03:
commit c27f392040e2f6 ("futex: Provide distinct return value when
owner is exiting")
The function handle_exit_race does not exist. Therefore, the
change in handle_exit_race() is ignored in the pat
://lkml.kernel.org/r/20191106224556.935606...@linutronix.de
[nixiaoming: Modify handle_exit_race() to avoid dead code.]
Cc: sta...@vger.kernel.org # queue/4.9
Signed-off-by: Xiaoming Ni
---
kernel/futex.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/futex.c b/kernel
empty when "phram" is a sysctl field.
Error codes are returned in the failure branch, and error logs are
generated by parse_args().
Fixes: 3db978d480e2843 ("kernel/sysctl: support setting sysctl parameters
from kernel command line")
Cc: sta...@kernel.org # v5.8-rc1+
Signed-off-by:
now?
- Resend V3?
- Rewrite a new fix patch based on the current code of linux-next.
- Develop a new V4 patch: Use V2 to discuss how to use the Patch4
solution.
https://lore.kernel.org/linux-fsdevel/bc098af4-c0cd-212e-d09d-46d617d0a...@huawei.com/#t
Thanks
Xiaoming Ni
On 2021/1/12 12:33, Andrew Morton wrote:
On Tue, 12 Jan 2021 11:31:55 +0800 Xiaoming Ni wrote:
The process_sysctl_arg() does not check whether val is empty before
invoking strlen(val). If the command line parameter () is incorrectly
configured and val is empty, oops is triggered.
--- a
empty when "phram" is a sysctl field.
Error codes are returned in the failure branch, and error logs are
generated by parse_args().
Fixes: 3db978d480e2843 ("kernel/sysctl: support setting sysctl parameters
from kernel command line")
Signed-off-by: Xiaoming Ni
-
v3:
Retu
p(param, "sysctl", sizeof("sysctl") - 1) ==
0) {
param += sizeof("sysctl") - 1;
sysctl log for patch3:
no log
When process_sysctl_arg() is called, the param parameter may not be the
sysctl parameter.
Patch3 or patch4, which is better?
Thanks
Xiaoming Ni
On 2021/1/9 17:10, Andy Shevchenko wrote:
On Friday, January 8, 2021, Xiaoming Ni <mailto:nixiaom...@huawei.com>> wrote:
The process_sysctl_arg() does not check whether val is empty before
invoking strlen(val). If the command line parameter () is incorrectly
confi
On 2021/1/8 17:21, Michal Hocko wrote:
On Fri 08-01-21 10:33:39, Xiaoming Ni wrote:
The process_sysctl_arg() does not check whether val is empty before
invoking strlen(val). If the command line parameter () is incorrectly
configured and val is empty, oops is triggered.
For example
xes: 3db978d480e2843 ("kernel/sysctl: support setting sysctl parameters
from kernel command line")
Signed-off-by: Xiaoming Ni
-
v2:
Added log output of the failure branch based on the review comments of Kees
Cook.
v1: https://lore.kernel.org/lkml/20201224074256.
On 2021/1/7 7:46, Kees Cook wrote:
subject typo: "sysclt" -> "sysctl"
On Thu, Dec 24, 2020 at 03:42:56PM +0800, Xiaoming Ni wrote:
The process_sysctl_arg() does not check whether val is empty before
invoking strlen(val). If the command line parameter () is incorrectly
ping
On 2020/12/24 15:42, Xiaoming Ni wrote:
The process_sysctl_arg() does not check whether val is empty before
invoking strlen(val). If the command line parameter () is incorrectly
configured and val is empty, oops is triggered.
For example, "hung_task_panic=1" is incorrectly
xes: 3db978d480e2843 ("kernel/sysctl: support setting sysctl parameters
from kernel command line")
Signed-off-by: Xiaoming Ni
---
fs/proc/proc_sysctl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 317899222d7f..451
On 2020/12/22 1:12, Segher Boessenkool wrote:
On Mon, Dec 21, 2020 at 04:42:23PM +, David Laight wrote:
From: Segher Boessenkool
Sent: 21 December 2020 16:32
On Mon, Dec 21, 2020 at 04:17:21PM +0100, Christophe Leroy wrote:
Le 21/12/2020 à 04:27, Xiaoming Ni a écrit :
Since the commit
x86 and arm64's lead:
commit a25ffd3a6302a6 ("arm64: traps: Don't print stack or raw
PC/LR values in backtraces")
commit bb5e5ce545f203 ("x86/dumpstack: Remove kernel text
addresses from stack dump")
Signed-off-by: Xiaoming Ni
---
arch/powerpc/kernel/p
: Rename api to in_panic_state as recommended by Pavel Machek, Tetsuo
Handa, Randy Dunlap.
v1: https://lore.kernel.org/lkml/20201218114406.61906-1-nixiaom...@huawei.com/
API name: is_being_panic
Xiaoming Ni (4):
panic: Add new API in_panic_state()
hung_task: Replace
Replace the global variable "panic_heartbeats" with in_panic_state()
Signed-off-by: Xiaoming Ni
---
drivers/leds/trigger/ledtrig-heartbeat.c | 19 +--
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/drivers/leds/trigger/ledtrig-heartbeat.c
b/drivers/le
Replace the global variable "panic_detected" with in_panic_state()
Signed-off-by: Xiaoming Ni
---
drivers/leds/trigger/ledtrig-activity.c | 19 +--
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/drivers/leds/trigger/ledtrig-activity.c
b/drivers/le
Replace the global variable "did_panic" with in_panic_state()
Signed-off-by: Xiaoming Ni
---
kernel/hung_task.c | 17 +
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/kernel/hung_task.c b/kernel/hung_task.c
index bb2e3e15c84c..2747cd6dd35e 100644
--
: Xiaoming Ni
---
include/linux/kernel.h | 1 +
kernel/panic.c | 6 ++
2 files changed, 7 insertions(+)
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index f7902d8c1048..c9a9078157b6 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -167,6 +167,7 @@ void
On 2020/12/19 1:06, Randy Dunlap wrote:
On 12/18/20 6:36 AM, Tetsuo Handa wrote:
On 2020/12/18 21:59, Pavel Machek wrote:
On Fri 2020-12-18 19:44:04, Xiaoming Ni wrote:
Plus.. is_being_panic is not really english. "is_paniccing" would be
closer...?
Or in_panic() ?
Yes, or in_p
Replace the global variable "panic_detected" with is_be_panic()
Signed-off-by: Xiaoming Ni
---
drivers/leds/trigger/ledtrig-activity.c | 19 +--
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/drivers/leds/trigger/ledtrig-activity.c
b/drivers/leds/trigg
Add is_being_panic() to check whether the system is in panic state.
Used to replace the global variable used to determine the panic status
in other features: hung_task ledtrig-activity ledtrig-heartbeat
Xiaoming Ni (4):
panic: Add new API is_being_panic()
hung_task: Replace "did_panic&
Replace the global variable "did_panic" with is_be_panic()
Signed-off-by: Xiaoming Ni
---
kernel/hung_task.c | 17 +
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/kernel/hung_task.c b/kernel/hung_task.c
index bb2e3e15c84c..3374b993da4c 100644
--
Replace the global variable "panic_heartbeats" with is_be_panic()
Signed-off-by: Xiaoming Ni
---
drivers/leds/trigger/ledtrig-heartbeat.c | 19 +--
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/drivers/leds/trigger/ledtrig-heartbeat.c
b/drivers/le
Add is_being_panic() to check whether the system is in panic state.
Used to replace the global variable used to determine the panic status
in other features: hung_task ledtrig-activity ledtrig-heartbeat
Signed-off-by: Xiaoming Ni
---
include/linux/kernel.h | 1 +
kernel/panic.c | 6
drivers/dma/qcom/gpi.c:1447:3: warning: format '%llx' expects argument of
type 'long long unsigned int', but argument 5 has type 'phys_addr_t {aka
unsigned int}' [-Wformat=]
Signed-off-by: Xiaoming Ni
---
drivers/dma/qcom/gpi.c | 8
1 file changed, 4 inse
On 2020/12/8 2:59, Vignesh Raghavendra wrote:
Hi Xiaoming,
On 12/7/20 4:23 PM, Miquel Raynal wrote:
Hi Xiaoming,
Xiaoming Ni wrote on Mon, 7 Dec 2020 18:48:33
+0800:
ping
On 2020/11/27 21:07, Xiaoming Ni wrote:
When CONFIG_MTD_XIP=y, local_irq_disable() is called in xip_disable().
To
ping
On 2020/11/27 21:07, Xiaoming Ni wrote:
When CONFIG_MTD_XIP=y, local_irq_disable() is called in xip_disable().
To avoid sleep in interrupt context, we need to call local_irq_enable()
before schedule().
The problem call stack is as follows:
bug1:
do_write_oneword_retry
;)
Cc: sta...@vger.kernel.org # v2.6.13
Signed-off-by: Xiaoming Ni
---
drivers/mtd/chips/cfi_cmdset_0002.c | 16
1 file changed, 16 insertions(+)
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c
b/drivers/mtd/chips/cfi_cmdset_0002.c
index a1f3e1031c3d..12c3776f093a 100644
--- a/d
ping
On 2020/10/16 10:31, Xiaoming Ni wrote:
Printing raw pointer values in backtraces has potential security
implications and are of questionable value anyway.
This patch follows x86 and arm64's lead and removes the "Exception stack:"
dump from kernel backtraces:
commit
ack or raw
PC/LR values in backtraces")
commit 0ee1dd9f5e7eae ("x86/dumpstack: Remove raw stack dump")
Signed-off-by: Xiaoming Ni
---
arch/arm/kernel/traps.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/arch/arm/kernel/traps.c b/ar
#x27;t print stack or raw
PC/LR values in backtraces")
commit bb5e5ce545f203 ("x86/dumpstack: Remove kernel text
addresses from stack dump")
Signed-off-by: Xiaoming Ni
---
v2:
Delete [] from the stack according to the email discussion
in patch V1, Other inf
address when the call stack contains
kernel module symbols.
Delete the PC/LR address and retain the sysbol+offset. The kernel can
still be debugged.
Thanks
Xiaoming Ni
address.
Yes, only %08lx was deleted, but %ps is still retained.
- printk("%s[<%08lx>] (%ps) from [<%08lx>] (%pS)\n",
- loglvl, where, (void *)where, from, (void *)from);
+ printk("%s (%ps) from (%pS)\n",
+ loglvl, (void *)where, (void *)from);
Thanks
Xiaoming Ni
y_memremap'; did you mean 'devm_memremap'?
[-Werror=implicit-function-declaration]
add #include to fix this build error
Signed-off-by: Xiaoming Ni
---
drivers/firmware/efi/mokvar-table.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/firmware/efi/mokvar-table.c
b/d
#x27;t print stack or raw
PC/LR values in backtraces")
commit 0ee1dd9f5e7eae ("x86/dumpstack: Remove raw stack dump")
commit bb5e5ce545f203 ("x86/dumpstack: Remove kernel text
addresses from stack dump")
Signed-off-by: Xiaoming Ni
---
arch/arm/
On 2020/9/9 11:44, Amir Goldstein wrote:
On Tue, Sep 8, 2020 at 8:19 PM Matthew Wilcox wrote:
On Tue, Sep 08, 2020 at 04:18:29PM +0300, Amir Goldstein wrote:
On Tue, Sep 8, 2020 at 3:53 PM Xiaoming Ni wrote:
For example, in fs/coredump.c, do_coredump() calls filp_open() to
generate core
On 2020/9/8 18:06, Amir Goldstein wrote:
On Tue, Sep 8, 2020 at 11:02 AM Xiaoming Ni wrote:
The file opening action on the system may be from user-mode sys_open()
or kernel-mode filp_open().
Currently, fsnotify_open() is invoked in do_sys_openat2().
But filp_open() is not notified. Why? Is
ensure that both user-mode and kernel-mode file opening operations can
be notified?
Thanks
Xiaoming Ni
ping
On 2020/8/22 11:05, Xiaoming Ni wrote:
ecurity/commoncap.c: capabilties ==> capabilities
security/lsm_audit.c: programers ==> programmers
security/tomoyo/audit.c: stuct ==> struct
security/tomoyo/common.c: Poiter ==> Pointer
security/smack/smack_lsm.c: overriden ==> overri
spin_table.c:86: endianess ==> endianness
arch/arm64/kernel/smp_spin_table.c:88: endianess ==> endianness
arch/arm64/kvm/vgic/vgic-mmio-v3.c:1004: targetting ==> targeting
arch/arm64/kvm/vgic/vgic-mmio-v3.c:1005: targetting ==> targeting
Signed-off-by: Xiaoming Ni
---
arch/arm64/incl
fs.c: overriden ==> overridden
security/integrity/ima/ima_template_lib.c: algoritm ==> algorithm
Signed-off-by: Xiaoming Ni
---
security/commoncap.c | 2 +-
security/integrity/ima/ima_template_lib.c | 2 +-
security/lsm_audit.c | 2 +-
security/smack/smack_lsm
call
Similarly, modify tools/perf/arch/s390/entry/syscalls/syscall.tbl.
Fixes: ("All arch: remove system call sys_sysctl")
Fixes:
https://lore.kernel.org/linuxppc-dev/20200616030734.87257-1-nixiaom...@huawei.com/
Reported-by: kernel test robot
Signed-off-by: Xiaoming Ni
changes i
On 2020/6/18 19:27, Heiko Carstens wrote:
On Thu, Jun 18, 2020 at 07:03:20PM +0800, Xiaoming Ni wrote:
Build error on s390:
arch/s390/kernel/entry.o: in function `sys_call_table_emu':
>> (.rodata+0x1288): undefined reference to `__s390_'
In commit ("All arc
_sysctl")
Fixes:
https://lore.kernel.org/linuxppc-dev/20200616030734.87257-1-nixiaom...@huawei.com/
Reported-by: kernel test robot
Signed-off-by: Xiaoming Ni
---
arch/s390/kernel/syscalls/syscall.tbl | 1 -
tools/perf/arch/s390/entry/syscalls/syscall.tbl | 1 -
2 files changed,
ld mm->mm_users also be replaced by refcount_t?
In addition, is it better to change all variables that use
atomic_dec_and_test to control the release process to refconut_t?
Thanks
Xiaoming Ni
d-by: Hans Liljestrand
Link: https://lore.kernel.org/r/20190306110549.7628-4-elena.reshet...@intel.com
Signed-off-by: Kees Cook
Currently this patch is better than my RFC patch
Looks good to me.
Thanks
Xiaoming Ni
e is no information about the murderer in the panic
call stack...
So, add WARN() in get_cred()/put_cred(), and pray to catch the murderer
at the first scene.
Signed-off-by: Xiaoming Ni
---
include/linux/cred.h | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git
On 2020/6/10 3:20, Eric W. Biederman wrote:
Xiaoming Ni writes:
Since the commit 61a47c1ad3a4dc ("sysctl: Remove the sysctl system call"),
sys_sysctl has lost its actual role: any input can only return an error.
The remaining code does have a role. It reports programs that atte
On 2020/6/9 23:40, Kees Cook wrote:
On Tue, Jun 09, 2020 at 02:20:05PM +0800, Xiaoming Ni wrote:
Since the commit 61a47c1ad3a4dc ("sysctl: Remove the sysctl system call"),
sys_sysctl has lost its actual role: any input can only return an error.
Delete the code and return -ENOSYS d
Since the commit 61a47c1ad3a4dc ("sysctl: Remove the sysctl system call"),
sys_sysctl has lost its actual role: any input can only return an error.
Delete the code and return -ENOSYS directly at the function entry
Signed-off-by: Xiaoming Ni
---
kernel/sysctl_bina
Fix build warning:
sound/soc/codecs/max98390.c:781:3: warning: format '%ld' expects
argument of type 'long int', but argument 4 has type 'size_t {aka
const unsigned int}' [-Wformat=]
Signed-off-by: Xiaoming Ni
---
sound/soc/codecs/max983
27f0c9ea..4129dfb 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2853,6 +2853,7 @@ void register_sysctl_empty_subdir(const char *base,
{
register_sysctl_subdir(base, subdir, sysctl_mount_point);
}
+EXPORT_SYMBOL_GPL(register_sysctl_empty_subdir);
#endif /* CONFIG_SYSCTL */
Thanks
Xiaoming Ni
On 2020/5/29 18:26, Greg KH wrote:
On Fri, May 29, 2020 at 07:41:06AM +, Luis Chamberlain wrote:
From: Xiaoming Ni
Move random_table sysctl from kernel/sysctl.c to drivers/char/random.c
and use register_sysctl_subdir() to help remove the clutter out of
kernel/sysctl.c.
Signed-off-by
On 2020/5/29 18:26, Greg KH wrote:
On Fri, May 29, 2020 at 07:41:04AM +, Luis Chamberlain wrote:
From: Xiaoming Ni
Move the firmware config sysctl table to fallback_table.c and use the
new register_sysctl_subdir() helper. This removes the clutter from
kernel/sysctl.c.
Signed-off-by
On 2020/5/29 15:36, Luis Chamberlain wrote:
On Fri, May 29, 2020 at 03:27:22PM +0800, Xiaoming Ni wrote:
On 2020/5/29 15:09, Luis Chamberlain wrote:
On Tue, May 19, 2020 at 11:31:08AM +0800, Xiaoming Ni wrote:
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -3358,6 +3358,25 @@ int __init
On 2020/5/29 15:09, Luis Chamberlain wrote:
On Tue, May 19, 2020 at 11:31:08AM +0800, Xiaoming Ni wrote:
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -3358,6 +3358,25 @@ int __init sysctl_init(void)
kmemleak_not_leak(hdr);
return 0;
}
+
+/*
+ * The sysctl interface is used
On 2020/5/27 22:21, Peter Xu wrote:
On Wed, May 27, 2020 at 02:54:13PM +0800, Xiaoming Ni wrote:
On Tue, Mar 19, 2019 at 11:07:22AM +0800, Peter Xu wrote:
Add a global sysctl knob "vm.unprivileged_userfaultfd" to control
whether userfaultfd is allowed by unprivileged users. When t
alds/linux.git/commit/?id=cefdca0a86be517bc390fc4541e3674b8e7803b0
Thanks
Xiaoming Ni
On 2020/5/20 11:31, Andrew Morton wrote:
On Tue, 19 May 2020 11:31:07 +0800 Xiaoming Ni wrote:
Kernel/sysctl.c
eek!
fs/proc/proc_sysctl.c| 2 +-
include/linux/sched/sysctl.h | 14 +--
include/linux/sysctl.h | 13 ++-
kernel/hung_task.c | 77
On 2020/5/19 12:44, Tetsuo Handa wrote:
On 2020/05/19 12:31, Xiaoming Ni wrote:
Some boundary (.extra1 .extra2) constants (E.g: neg_one two) in
sysctl.c are used in multiple features. Move these variables to
sysctl_vals to avoid adding duplicate variables when cleaning up
sysctls table.
Signed
l/1589517224-123928-1-git-send-email-nixiaom...@huawei.com/
Xiaoming Ni (4):
sysctl: Add register_sysctl_init() interface
sysctl: Move some boundary constants form sysctl.c to sysctl_vals
hung_task: Move hung_task sysctl interface to hung_task.c
watchdog: move watchdog sysctl interface to wat
In order to eliminate the duplicate code for registering the sysctl
interface during the initialization of each feature, add the
register_sysctl_init() interface
Signed-off-by: Xiaoming Ni
Reviewed-by: Kees Cook
---
include/linux/sysctl.h | 2 ++
kernel/sysctl.c| 19
Some boundary (.extra1 .extra2) constants (E.g: neg_one two) in
sysctl.c are used in multiple features. Move these variables to
sysctl_vals to avoid adding duplicate variables when cleaning up
sysctls table.
Signed-off-by: Xiaoming Ni
Reviewed-by: Kees Cook
---
fs/proc/proc_sysctl.c | 2
Move watchdog syscl interface to watchdog.c.
Use register_sysctl() to register the sysctl interface to avoid
merge conflicts when different features modify sysctl.c at the same time.
Signed-off-by: Xiaoming Ni
Reviewed-by: Kees Cook
---
kernel/sysctl.c | 96
Move hung_task sysctl interface to hung_task.c.
Use register_sysctl() to register the sysctl interface to avoid
merge conflicts when different features modify sysctl.c at the same time.
Signed-off-by: Xiaoming Ni
Reviewed-by: Kees Cook
---
include/linux/sched/sysctl.h | 14 +---
kernel
On 2020/5/19 1:16, Luis Chamberlain wrote:
On Mon, May 18, 2020 at 11:59:53AM +0800, Xiaoming Ni wrote:
Kernel/sysctl.c contains more than 190 interface files, and there are a
large number of config macro controls. When modifying the sysctl
interface directly in kernel/sysctl.c, conflicts are
Move watchdog syscl interface to watchdog.c.
Use register_sysctl() to register the sysctl interface to avoid
merge conflicts when different features modify sysctl.c at the same time.
Signed-off-by: Xiaoming Ni
Reviewed-by: Kees Cook
---
kernel/sysctl.c | 96
ion, then do feature code movement
2. Move hung_task sysctl to hung_task.c instead of adding new file
3. Extract multiple common variables instead of only neg_one, and keep
the order of member values in sysctl_vals
4. Add const modification to the variable sixty in watchdog sysctl
V1: htt
Move hung_task sysctl interface to hung_task.c.
Use register_sysctl() to register the sysctl interface to avoid
merge conflicts when different features modify sysctl.c at the same time.
Signed-off-by: Xiaoming Ni
Reviewed-by: Kees Cook
---
include/linux/sched/sysctl.h | 8 +-
kernel
In order to eliminate the duplicate code for registering the sysctl
interface during the initialization of each feature, add the
register_sysctl_init() interface
Signed-off-by: Xiaoming Ni
Reviewed-by: Kees Cook
---
include/linux/sysctl.h | 2 ++
kernel/sysctl.c| 19
Some boundary (.extra1 .extra2) constants (E.g: neg_one two) in
sysctl.c are used in multiple features. Move these variables to
sysctl_vals to avoid adding duplicate variables when cleaning up
sysctls table.
Signed-off-by: Xiaoming Ni
Reviewed-by: Kees Cook
---
fs/proc/proc_sysctl.c | 2
On 2020/5/17 10:43, Kees Cook wrote:
On Sat, May 16, 2020 at 04:55:14PM +0800, Xiaoming Ni wrote:
+/*
+ * This is needed for proc_doulongvec_minmax of sysctl_hung_task_timeout_secs
+ * and hung_task_check_interval_secs
+ */
+static unsigned long hung_task_timeout_max = (LONG_MAX / HZ);
Please
In order to eliminate the duplicate code for registering the sysctl
interface during the initialization of each feature, add the
register_sysctl_init() interface
Signed-off-by: Xiaoming Ni
---
include/linux/sysctl.h | 2 ++
kernel/sysctl.c| 19 +++
2 files changed, 21
. Extract multiple common variables instead of only neg_one, and keep
the order of member values in sysctl_vals
4. Add const modification to the variable sixty in watchdog sysctl
V1: https://lkml.org/lkml/2020/5/15/17
Xiaoming Ni (4):
sysctl: Add register_sysctl_init() interface
sysctl
Move hung_task sysctl interface to hung_task.c.
Use register_sysctl() to register the sysctl interface to avoid
merge conflicts when different features modify sysctl.c at the same time.
Signed-off-by: Xiaoming Ni
---
include/linux/sched/sysctl.h | 8 +-
kernel/hung_task.c | 63
Move watchdog syscl interface to watchdog.c.
Use register_sysctl() to register the sysctl interface to avoid
merge conflicts when different features modify sysctl.c at the same time.
Signed-off-by: Xiaoming Ni
---
kernel/sysctl.c | 96
Some boundary (.extra1 .extra2) constants (E.g: neg_one two) in
sysctl.c are used in multiple features. Move these variables to
sysctl_vals to avoid adding duplicate variables when cleaning up
sysctls table.
Signed-off-by: Xiaoming Ni
---
fs/proc/proc_sysctl.c | 2 +-
include/linux/sysctl.h
On 2020/5/16 10:47, Kees Cook wrote:
On Sat, May 16, 2020 at 10:32:19AM +0800, Xiaoming Ni wrote:
On 2020/5/16 0:05, Kees Cook wrote:
On Fri, May 15, 2020 at 05:06:28PM +0800, Xiaoming Ni wrote:
On 2020/5/15 16:06, Kees Cook wrote:
On Fri, May 15, 2020 at 12:33:42PM +0800, Xiaoming Ni wrote
On 2020/5/16 0:05, Kees Cook wrote:
On Fri, May 15, 2020 at 05:06:28PM +0800, Xiaoming Ni wrote:
On 2020/5/15 16:06, Kees Cook wrote:
On Fri, May 15, 2020 at 12:33:42PM +0800, Xiaoming Ni wrote:
Add the shared variable SYSCTL_NEG_ONE to replace the variable neg_one
used in both
1 - 100 of 142 matches
Mail list logo