[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180219220219.lrnt2y6pcb7qyx4q@treble>
Date: Mon, 19 Feb 2018 16:02:19 -0600
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Borislav Petkov <bp@...en8.de>
Cc: X86 ML <x86@...nel.org>, Peter Zijlstra <peterz@...radead.org>,
Andy Lutomirski <luto@...capital.net>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/5] x86/dumpstack: Improve opcodes dumping in the Code:
section
On Mon, Feb 19, 2018 at 09:28:24PM +0100, Borislav Petkov wrote:
> bool in_task_stack(unsigned long *stack, struct task_struct *task,
> @@ -358,8 +362,8 @@ void die(const char *str, struct pt_regs *regs, long err)
>
> static int __init code_bytes_setup(char *s)
> {
> - ssize_t ret;
> unsigned long val;
> + ssize_t ret;
>
> if (!s)
> return -EINVAL;
> @@ -372,35 +376,37 @@ static int __init code_bytes_setup(char *s)
> if (code_bytes > 8192)
> code_bytes = 8192;
>
> + if (code_bytes > OPCODE_BUFSIZE) {
> + u8 *new_buf = kzalloc(code_bytes, GFP_KERNEL);
> + if (!new_buf)
> + return -EINVAL;
S/EINVAL/ENOMEM/ ?
Otherwise the code looks good to me, and I like the new feature.
--
Josh
Powered by blists - more mailing lists