lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 27 Nov 2012 14:48:39 +0530
From:	"Suzuki K. Poulose" <suzuki@...ibm.com>
To:	Sebastian Andrzej Siewior <bigeasy@...utronix.de>
CC:	oleg@...hat.com, ananth@...ibm.com, srikar@...ux.vnet.ibm.com,
	peterz@...radead.org, benh@...nel.crashing.org, mingo@...e.hu,
	anton@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] powerpc: Move the single step enable code to a generic
 path

On 11/26/2012 11:40 PM, Sebastian Andrzej Siewior wrote:
> On 11/26/2012 12:05 PM, Suzuki K. Poulose wrote:
>> diff --git a/arch/powerpc/include/asm/probes.h
>> b/arch/powerpc/include/asm/probes.h
>> index 5f1e15b..836e9b9 100644
>> --- a/arch/powerpc/include/asm/probes.h
>> +++ b/arch/powerpc/include/asm/probes.h
>> @@ -38,5 +38,34 @@ typedef u32 ppc_opcode_t;
>>   #define is_trap(instr)        (IS_TW(instr) || IS_TWI(instr))
>>   #endif /* CONFIG_PPC64 */
>>
>> +#ifdef CONFIG_PPC_ADV_DEBUG_REGS
>> +#define MSR_SINGLESTEP    (MSR_DE)
>> +#else
>> +#define MSR_SINGLESTEP    (MSR_SE)
>> +#endif
>> +
>> +/* Enable single stepping for the current task */
>> +static inline void enable_single_step(struct pt_regs *regs)
>> +{
>> +
>> +    /*
>> +     * We turn off async exceptions to ensure that the single step will
>> +     * be for the instruction we have the kprobe on, if we dont its
> it is
>
>> +     * possible we'd get the single step reported for an exception
>> handler
>> +     * like Decrementer or External Interrupt
>> +     */
>
> Hmmm. The TRM for E400 says
>
> |5.11.1 e500 Exception Priorities
> |The following is a prioritized listing of e500 exceptions:
> |   4. Critical input
> |   5. Debug interrupt
> |   6. External input
> |   22. Decrementer
>
> The list has been cut down a little. That means the debug interrupt
> comes before external interrupt and before the decrement fires.
>
> And if single step is what wakes you up then DBSR[ICMP] is set. Am I
> missing something or is this FSL only not not book-e
>

You are right. The same priority applies for Book3S as well. The above
code/comment was initially written for kprobe. So I didn't bother to
double check the same, when I moved it to the common place.

I will send a v2 with the required changes.

Thanks for the question !

Cheers
Suzuki

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ