Re: [PATCH -tip v2 3/9] ftrace/x86: Support SAVE_REGS feature oni386

From: Masami Hiramatsu
Date: Wed Jun 06 2012 - 10:25:07 EST


(2012/06/06 6:51), Andi Kleen wrote:
> Masami Hiramatsu <masami.hiramatsu.pt@xxxxxxxxxxx> writes:
>>
>> + .macro FTRACE_SAVE_ALL
>> + /* eflags is saved on cs */
>> + subl $8, %esp /* skip ip and orig_ax */
>> + pushl %gs
>> + pushl %fs
>
> For pure in kernel use you don't need to save/restore fs/gs
> This is only needed on kernel/user space boundaries.
>
> And for this usage probably also not flags

I see, most of the case, user doesn't really need it.
But in some case, it can be easily imagined that pt_regs
is used for dumping all registers. Suppose that this
ftrace-based kprobe optimization is done transparently,
they may see that the results of dumping registers
are different even if the probe moves just one instruction
ahead. I'd like to avoid this kind of differences.

Thank you,

--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@xxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/