04 Jun, 2011

1 commit

  • While testing the patchset at

    http://lkml.kernel.org/r/1306873314-32523-1-git-send-email-bp@alien8.de

    with binutils 2.16.1 from hell, kernel build fails with the following
    error:

    arch/x86/ia32/ia32entry.S: Assembler messages:
    arch/x86/ia32/ia32entry.S:139: Error: too many positional arguments
    make[2]: *** [arch/x86/ia32/ia32entry.o] Error 1
    make[1]: *** [arch/x86/ia32] Error 2
    make[1]: *** Waiting for unfinished jobs....
    make: *** [arch/x86] Error 2
    make: *** Waiting for unfinished jobs....

    due to spaces between the operators of the __USER32_CS define. Fix it so
    that gas 2.16 can swallow it too.

    Signed-off-by: Borislav Petkov
    Link: http://lkml.kernel.org/r/1307131642-32595-1-git-send-email-bp@alien8.de
    Signed-off-by: H. Peter Anvin

    Borislav Petkov
     

18 Feb, 2011

1 commit


20 Oct, 2010

1 commit

  • gas prior to (perhaps) 2.16.90 has problems with passing non-
    parenthesized expressions containing spaces to macros. Spaces, however,
    get inserted by cpp between any macro expanding to a number and a
    subsequent + or -. For the +, current x86 gas then removes the space
    again (future gas may not do so), but for the - the space gets retained
    and is then considered a separator between macro arguments.

    Fix the respective definitions for both the - and + cases, so that they
    neither contain spaces nor make cpp insert any (the latter by adding
    seemingly redundant parentheses).

    Signed-off-by: Jan Beulich
    LKML-Reference:
    Cc: Alexander van Heukelum
    Signed-off-by: H. Peter Anvin

    Jan Beulich
     

10 Feb, 2009

1 commit

  • Impact: stack protector for x86_32

    Implement stack protector for x86_32. GDT entry 28 is used for it.
    It's set to point to stack_canary-20 and have the length of 24 bytes.
    CONFIG_CC_STACKPROTECTOR turns off CONFIG_X86_32_LAZY_GS and sets %gs
    to the stack canary segment on entry. As %gs is otherwise unused by
    the kernel, the canary can be anywhere. It's defined as a percpu
    variable.

    x86_32 exception handlers take register frame on stack directly as
    struct pt_regs. With -fstack-protector turned on, gcc copies the
    whole structure after the stack canary and (of course) doesn't copy
    back on return thus losing all changed. For now, -fno-stack-protector
    is added to all files which contain those functions. We definitely
    need something better.

    Signed-off-by: Tejun Heo
    Signed-off-by: Ingo Molnar

    Tejun Heo
     

23 Oct, 2008

2 commits