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
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/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
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 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
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
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
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
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/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
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 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
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
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
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
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
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
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
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:
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/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
---
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
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.
-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
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
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.
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
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.
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
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
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.
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
://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
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
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
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 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
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
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
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_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
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
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
: 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
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
--
: 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
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
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
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/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
;)
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
On 2019/7/17 19:15, Vasily Averin wrote:
> On 7/16/19 5:07 PM, Xiaoming Ni wrote:
>> On 2019/7/16 18:20, Vasily Averin wrote:
>>> On 7/16/19 5:00 AM, Xiaoming Ni wrote:
>>>> On 2019/7/15 13:38, Vasily Averin wrote:
>>>>> On 7/14/19 5:45 AM, Xiao
blocking_notifier_chain_cond_register() does not consider
system_booting state, which is the only difference between this
function and blocking_notifier_cain_register(). This can be a bug
and is a piece of duplicate code.
Delete blocking_notifier_chain_cond_register()
Signed-off-by: Xiaoming Ni
title.
Xiaoming Ni (3):
kernel/notifier.c: intercepting duplicate registrations to avoid
infinite loops
kernel/notifier.c: remove notifier_chain_cond_register()
kernel/notifier.c: remove blocking_notifier_chain_cond_register()
include/linux/notifier.h | 4
kernel/notifier.c
The only difference between notifier_chain_cond_register() and
notifier_chain_register() is the lack of warning hints for duplicate
registrations.
Consider using notifier_chain_register() instead of
notifier_chain_cond_register() to avoid duplicate code
Signed-off-by: Xiaoming Ni
---
kernel
the system is configured with softlockup_panic and the same
hook is repeatedly registered on the panic_notifier_list, it
will cause a loop panic.
Add a check in notifier_chain_register(),
Intercepting duplicate registrations to avoid infinite loops
Signed-off-by: Xiaoming Ni
Reviewed-by: Vasily Av
Using kzalloc() to allocate memory in function con_init(), but not
checking the return value, there is a risk of null pointer references
oops.
Signed-off-by: Xiaoming Ni
---
drivers/tty/vt/vt.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/drivers/tty/vt/vt.c b/drivers
On 2019/9/19 14:36, Greg KH wrote:
> On Thu, Sep 19, 2019 at 10:58:06AM +0800, Xiaoming Ni wrote:
>> Registering the same notifier to a hook repeatedly can cause the hook
>> list to form a ring or lose other members of the list.
>>
>> case1: An infinite loop in notifier
o the success branch of the
function jffs2_parse_options() and free jffs2_sb_info in the failure branch
make the code easier to understand.
Signed-off-by: Xiaoming Ni
---
fs/jffs2/super.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
On 2019/9/20 19:43, Al Viro wrote:
> On Fri, Sep 20, 2019 at 02:54:38PM +0800, Xiaoming Ni wrote:
>> Use kzalloc() to allocate memory in jffs2_fill_super().
>> Freeing memory when jffs2_parse_options() fails will cause
>> use-after-free and double-free in jffs2_kill_sb()
&
On 2019/9/20 20:54, Al Viro wrote:
> On Fri, Sep 20, 2019 at 01:45:33PM +0100, Al Viro wrote:
>> On Fri, Sep 20, 2019 at 08:21:53PM +0800, Xiaoming Ni wrote:
>>>
>>>
>>> On 2019/9/20 19:43, Al Viro wrote:
>>>> On Fri, Sep 20, 2019 at 02:54:38PM
On 2019/9/23 11:50, Nicolas Pitre wrote:
> On Sat, 21 Sep 2019, Xiaoming Ni wrote:
>
>> @ Nicolas Pitre
>> Can I make a v2 patch based on your advice ?
>> Or you will submit a patch for "GFP_WONTFAIL" yourself ?
>
> Here's a patch implementi
On 2019/9/20 14:04, Greg KH wrote:
> On Thu, Sep 19, 2019 at 10:56:15PM -0400, Nicolas Pitre wrote:
>> On Thu, 19 Sep 2019, Greg KH wrote:
>>
>>> On Thu, Sep 19, 2019 at 05:18:15PM +0800, Xiaoming Ni wrote:
>>>> Using kzalloc() to allocate memory in function c
According to the comment of tty_port_destroy():
When a port was initialized using tty_port_init, one has to destroy
the port by tty_port_destroy();
tty_port_init() is called in gsm_dlci_alloc()
so tty_port_destroy() needs to be called in gsm_dlci_free()
Signed-off-by: Xiaoming Ni
On 2019/7/15 13:38, Vasily Averin wrote:
> On 7/14/19 5:45 AM, Xiaoming Ni wrote:
>> On 2019/7/12 22:07, gre...@linuxfoundation.org wrote:
>>> On Fri, Jul 12, 2019 at 09:11:57PM +0800, Xiaoming Ni wrote:
>>>> On 2019/7/11 21:57, Vasily Averin wrote:
>>>
On 2019/7/16 18:20, Vasily Averin wrote:
> On 7/16/19 5:00 AM, Xiaoming Ni wrote:
>> On 2019/7/15 13:38, Vasily Averin wrote:
>>> On 7/14/19 5:45 AM, Xiaoming Ni wrote:
>>>> On 2019/7/12 22:07, gre...@linuxfoundation.org wrote:
>>>>> On Fri, Jul 12
On 2019/7/11 21:57, Vasily Averin wrote:
> On 7/11/19 4:55 AM, Nixiaoming wrote:
>> On Wed, July 10, 2019 1:49 PM Vasily Averin wrote:
>>> On 7/10/19 6:09 AM, Xiaoming Ni wrote:
>>>> Registering the same notifier to a hook repeatedly can cause the hook
>>
On 2019/7/12 22:07, gre...@linuxfoundation.org wrote:
> On Fri, Jul 12, 2019 at 09:11:57PM +0800, Xiaoming Ni wrote:
>> On 2019/7/11 21:57, Vasily Averin wrote:
>>> On 7/11/19 4:55 AM, Nixiaoming wrote:
>>>> On Wed, July 10, 2019 1:49 PM Vasily Averin wrote:
>>
module parameters, create
/sys/module/phram/parameters/phram interface, and create multi-device
support.
Signed-off-by: Xiaoming Ni
---
drivers/mtd/devices/phram.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
index
The only difference between notifier_chain_cond_register() and
notifier_chain_register() is the lack of warning hints for duplicate
registrations.
Consider using notifier_chain_register() instead of
notifier_chain_cond_register() to avoid duplicate code
Signed-off-by: Xiaoming Ni
---
kernel
er_chain_register
v2:
* Add a check in notifier_chain_register() to avoid duplicate registration
* remove notifier_chain_cond_register() to avoid duplicate code
* remove blocking_notifier_chain_cond_register() to avoid duplicate code
v3:
* Add a cover letter.
Xiaoming Ni (3):
kernel/
blocking_notifier_chain_cond_register() does not consider
system_booting state, which is the only difference between this
function and blocking_notifier_cain_register(). This can be a bug
and is a piece of duplicate code.
Delete blocking_notifier_chain_cond_register()
Signed-off-by: Xiaoming Ni
the system is configured with softlockup_panic and the same
hook is repeatedly registered on the panic_notifier_list, it
will cause a loop panic.
Add a check in notifier_chain_register() to avoid duplicate registration
Signed-off-by: Xiaoming Ni
---
kernel/notifier.c | 5 -
1 file changed, 4 i
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
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
alds/linux.git/commit/?id=cefdca0a86be517bc390fc4541e3674b8e7803b0
Thanks
Xiaoming Ni
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
_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,
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
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
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
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
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
#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/
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
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
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
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/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 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 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
.rst):
Preferentially use register_sysctl_table() to add a new sysctl
interface, centralize feature codes, and avoid directly modifying
kernel/sysctl.c ?
In addition, is it necessary to transfer the architecture-related sysctl
interface to arch/xxx/kernel/sysctl.c ?
Thanks
Xiaoming Ni
Remove duplicate semicolons at the end of line in
include/trace/events/iocost.h
Signed-off-by: Xiaoming Ni
---
include/trace/events/iocost.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/trace/events/iocost.h b/include/trace/events/iocost.h
index 7ecaa65b..91297eb
Remove duplicate semicolons at the end of line in fs/io_uring.c
Signed-off-by: Xiaoming Ni
---
fs/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 381d50b..8c543f7 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -5379,7 +5379,7
1 - 100 of 142 matches
Mail list logo