RE: [PATCH]IA64 trap code 16 bytes atomic copy on montecito, take 2

From: Chen, Kenneth W <kenneth.w.chen_at_intel.com>
Date: 2006-11-02 18:45:20
Mao, Bibo wrote on Wednesday, November 01, 2006 7:12 PM
> @@ -463,7 +469,10 @@ void __kprobes arch_arm_kprobe(struct kp
> 
> 	flush_icache_range((unsigned long)p->ainsn.insn,
> 			(unsigned long)p->ainsn.insn + sizeof(kprobe_opcode_t));
> -	memcpy((char *)arm_addr, &p->opcode, sizeof(kprobe_opcode_t));
> +	if (ATOMIC_UPDATE)
> +		kprobe_update_bundle((void *)arm_addr, (void *)&p->opcode);
> +	else
> +		memcpy((char *)arm_addr, &p->opcode, sizeof(kprobe_opcode_t));
> 	flush_icache_range(arm_addr, arm_addr + sizeof(kprobe_opcode_t));
> }

Now comments on the code: why memcpy in the else statement?  In the earlier
part of the patch, you already reject kprobe address on slot 1 if CPU doesn't
have 16-byte memory operation.  Why do you allow memcpy here? Will the "else"
condition ever be executed?
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Nov 02 18:45:40 2006

This archive was generated by hypermail 2.1.8 : 2006-11-02 18:45:54 EST