Re: [PATCH v3] powerpc/uprobes: Validation for prefixed instruction

2021-03-04 Thread Ravi Bangoria
On 3/4/21 4:21 PM, Christophe Leroy wrote: Le 04/03/2021 à 11:13, Ravi Bangoria a écrit : On 3/4/21 1:02 PM, Christophe Leroy wrote: Le 04/03/2021 à 06:05, Ravi Bangoria a écrit : As per ISA 3.1, prefixed instruction should not cross 64-byte boundary. So don't allow Uprobe on such

Re: [PATCH v3] powerpc/uprobes: Validation for prefixed instruction

2021-03-04 Thread Christophe Leroy
Le 04/03/2021 à 11:13, Ravi Bangoria a écrit : On 3/4/21 1:02 PM, Christophe Leroy wrote: Le 04/03/2021 à 06:05, Ravi Bangoria a écrit : As per ISA 3.1, prefixed instruction should not cross 64-byte boundary. So don't allow Uprobe on such prefixed instruction. There are two ways probed

Re: [PATCH v3] powerpc/uprobes: Validation for prefixed instruction

2021-03-04 Thread Ravi Bangoria
On 3/4/21 1:02 PM, Christophe Leroy wrote: Le 04/03/2021 à 06:05, Ravi Bangoria a écrit : As per ISA 3.1, prefixed instruction should not cross 64-byte boundary. So don't allow Uprobe on such prefixed instruction. There are two ways probed instruction is changed in mapped pages. First,

Re: [PATCH v3] powerpc/uprobes: Validation for prefixed instruction

2021-03-03 Thread Ravi Bangoria
@@ -41,6 +41,14 @@ int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, if (addr & 0x03) return -EINVAL; + if (!IS_ENABLED(CONFIG_PPC64) || !cpu_has_feature(CPU_FTR_ARCH_31)) + return 0; Sorry, I missed this last time, but I think we can drop

Re: [PATCH v3] powerpc/uprobes: Validation for prefixed instruction

2021-03-03 Thread Christophe Leroy
Le 04/03/2021 à 06:05, Ravi Bangoria a écrit : As per ISA 3.1, prefixed instruction should not cross 64-byte boundary. So don't allow Uprobe on such prefixed instruction. There are two ways probed instruction is changed in mapped pages. First, when Uprobe is activated, it searches for all

Re: [PATCH v3] powerpc/uprobes: Validation for prefixed instruction

2021-03-03 Thread Naveen N. Rao
On 2021/03/04 10:35AM, Ravi Bangoria wrote: > As per ISA 3.1, prefixed instruction should not cross 64-byte > boundary. So don't allow Uprobe on such prefixed instruction. > > There are two ways probed instruction is changed in mapped pages. > First, when Uprobe is activated, it searches for all

[PATCH v3] powerpc/uprobes: Validation for prefixed instruction

2021-03-03 Thread Ravi Bangoria
As per ISA 3.1, prefixed instruction should not cross 64-byte boundary. So don't allow Uprobe on such prefixed instruction. There are two ways probed instruction is changed in mapped pages. First, when Uprobe is activated, it searches for all the relevant pages and replace instruction in them. In