Thread (5 messages) 5 messages, 2 authors, 2021-01-07

Re: [PATCH] proc_sysclt: fix oops caused by incorrect command parameters.

From: Kees Cook <hidden>
Date: 2021-01-07 21:09:18
Also in: lkml

On Thu, Jan 07, 2021 at 02:14:18PM +0800, Xiaoming Ni wrote:
On 2021/1/7 7:46, Kees Cook wrote:
quoted
subject typo: "sysclt" -> "sysctl"

On Thu, Dec 24, 2020 at 03:42:56PM +0800, Xiaoming Ni wrote:
quoted
[...]
+	if (!val)
+		return 0;
+
  	if (strncmp(param, "sysctl", sizeof("sysctl") - 1) == 0) {
  		param += sizeof("sysctl") - 1;
Otherwise, yeah, this is a good test to add. I would make it more
verbose, though:

	if (!val) {
		pr_err("Missing param value! Expected '%s=...value...'\n", param);
		return 0;
	}
Yes, it's better to add log output.
Thank you for your review.
Do I need to send V2 patch based on review comments?
Yes please. :)

-- 
Kees Cook
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help