Re: [patch 03/18] Dont leak NT bit into next task




On Feb 21 2007 11:00, Giuseppe Bilotta wrote:
On Wednesday 21 February 2007 02:49, Greg KH wrote:

/* frame pointer must be last for get_wchan */
-#define SAVE_CONTEXT "pushq %%rbp ; movq %%rsi,%%rbp\n\t"
-#define RESTORE_CONTEXT "movq %%rbp,%%rsi ; popq %%rbp\n\t"
+#define SAVE_CONTEXT "pushf ; pushq %%rbp ; movq %%rsi,%%rbp\n\t"
+#define RESTORE_CONTEXT "movq %%rbp,%%rsi ; popq %%rbp ; popf\t"

No idea if this is a problem or not, but you forgot a \n after popf.

It is on the edge. RESTORE_CONTEXT will not be passed any
arguments, so it is the only thing in a single line, and hence
the implicit \n of the source file applies after \t.
But yes, it may be dangerous. Better is an explicit \n or semicolon
after popf.


Jan
--
-
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/



Relevant Pages

  • Re: [patch 03/18] Dont leak NT bit into next task
    ... Giuseppe Bilotta wrote: ... No idea if this is a problem or not, but you forgot a \n after popf. ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: [patch 03/18] Dont leak NT bit into next task
    ... No idea if this is a problem or not, but you forgot a \n after popf. ... Reported by Steven M. Christey. ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: [PATCH] lis3lv02d: add axes knowledge of HP Pavilion dv5 models
    ... On Tue, Feb 10, 2009 at 9:29 PM, Giuseppe Bilotta ... Giuseppe "Oblomov" Bilotta ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: [PATCH] lis3lv02d: add axes knowledge of HP Pavilion dv5 models
    ... On Mon, Feb 9, 2009 at 12:45 PM, Giuseppe Bilotta ... With that patch I still get the same range of fluctuations. ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: [rfc patch] i386: dont save eflags on task switch
    ... between is another _4_ cycles, and putting a "popfl" in between is about another 48 cycles. ... popf, although I don't have hard numbers to back this up on hand. ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)