[PATCH v3] ARM: kprobes: Add test cases for stack consuming instructions

Jon Medhurst (Tixy) tixy at linaro.org
Wed Dec 10 05:49:40 PST 2014


On Wed, 2014-12-10 at 21:18 +0800, Wang Nan wrote:
[...]
> Well, I'm just working on a patch which introducing a TEST_INTOFF and disable interrupts
> for "MRS" testcase. Do you think it is inappropriate?

That's what I started to do, implementing in a similar way to
DONT_TEST_IN_ITBLOCK, and thought the same ints off feature could be
used for the stack consuming instructions checks as well.

Then I realised that for the MRS case it's no use turning ints off for a
single iteration of a test, because the next iteration could see
different results, so that would mean turning interrupts off for all
iterations, which we can't do.

Also, the FIQ flag may not be under our control if Linux isn't running
in secure mode, and I was worried that in such cases we could see the
value of the flag change if secure mode code chose to do so. (Though
perhaps non-secure mode will always read FIQ flag as zero in such a
case?)

So in the end I thought the only robust way of writing the tests would
be to ignore the values of the A and F flags.

-- 
Tixy





More information about the linux-arm-kernel mailing list