Re: [PATCH 2/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-02 Thread Masami Hiramatsu
On Wed, 2 Dec 2020 20:21:35 +0530 Srikar Dronamraju wrote: > * Masami Hiramatsu [2020-12-02 17:51:16]: > > > Since the insn.prefixes.nbytes can be bigger than the size of > > insn.prefixes.bytes[] when a same prefix is repeated, we have to > > check whether the insn.prefixes.bytes[i] != 0 and i

Re: [PATCH 2/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-02 Thread Masami Hiramatsu
On Wed, 2 Dec 2020 11:04:41 -0800 Kees Cook wrote: > On Wed, Dec 02, 2020 at 05:51:16PM +0900, Masami Hiramatsu wrote: > > Since the insn.prefixes.nbytes can be bigger than the size of > > insn.prefixes.bytes[] when a same prefix is repeated, we have to > > check whether the insn.prefixes.bytes[i

Re: [PATCH 2/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-02 Thread Kees Cook
On Wed, Dec 02, 2020 at 05:51:16PM +0900, Masami Hiramatsu wrote: > Since the insn.prefixes.nbytes can be bigger than the size of > insn.prefixes.bytes[] when a same prefix is repeated, we have to > check whether the insn.prefixes.bytes[i] != 0 and i < 4 instead > of insn.prefixes.nbytes. > > Fixe

Re: [PATCH 2/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-02 Thread Srikar Dronamraju
* Masami Hiramatsu [2020-12-02 17:51:16]: > Since the insn.prefixes.nbytes can be bigger than the size of > insn.prefixes.bytes[] when a same prefix is repeated, we have to > check whether the insn.prefixes.bytes[i] != 0 and i < 4 instead > of insn.prefixes.nbytes. > > Fixes: 2b1444983508 ("upro

[PATCH 2/3] x86/uprobes: Fix not using prefixes.nbytes for loop over prefixes.bytes

2020-12-02 Thread Masami Hiramatsu
Since the insn.prefixes.nbytes can be bigger than the size of insn.prefixes.bytes[] when a same prefix is repeated, we have to check whether the insn.prefixes.bytes[i] != 0 and i < 4 instead of insn.prefixes.nbytes. Fixes: 2b1444983508 ("uprobes, mm, x86: Add the ability to install and remove upr