[git pull] x86 fixes - Kernel

This is a discussion on [git pull] x86 fixes - Kernel ; Linus, Please pull the latest x86 fixes git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus Thanks, Ingo ------------------> Hugh Dickins (1): x86: BUILD_IRQ say .text to avoid .data.percpu Jeremy Fitzhardinge (2): x86: call early_cpu_init at the same point xen: don't use sysret for ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: [git pull] x86 fixes

  1. [git pull] x86 fixes

    Linus,

    Please pull the latest x86 fixes git tree from:

    git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus

    Thanks,

    Ingo

    ------------------>
    Hugh Dickins (1):
    x86: BUILD_IRQ say .text to avoid .data.percpu

    Jeremy Fitzhardinge (2):
    x86: call early_cpu_init at the same point
    xen: don't use sysret for sysexit32

    Vegard Nossum (1):
    x86: fix header export, asm-x86/processor-flags.h, CONFIG_* leaks


    arch/x86/kernel/irqinit_64.c | 2 +-
    arch/x86/kernel/setup.c | 5 +----
    arch/x86/xen/xen-asm_64.S | 2 +-
    include/asm-x86/processor-flags.h | 2 ++
    4 files changed, 5 insertions(+), 6 deletions(-)

    diff --git a/arch/x86/kernel/irqinit_64.c b/arch/x86/kernel/irqinit_64.c
    index 0373e88..9414125 100644
    --- a/arch/x86/kernel/irqinit_64.c
    +++ b/arch/x86/kernel/irqinit_64.c
    @@ -43,7 +43,7 @@

    #define BUILD_IRQ(nr) \
    asmlinkage void IRQ_NAME(nr); \
    - asm("\n.p2align\n" \
    + asm("\n.text\n.p2align\n" \
    "IRQ" #nr "_interrupt:\n\t" \
    "push $~(" #nr ") ; " \
    "jmp common_interrupt");
    diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
    index b4aacb9..b520dae 100644
    --- a/arch/x86/kernel/setup.c
    +++ b/arch/x86/kernel/setup.c
    @@ -597,11 +597,11 @@ void __init setup_arch(char **cmdline_p)
    memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
    visws_early_detect();
    pre_setup_arch_hook();
    - early_cpu_init();
    #else
    printk(KERN_INFO "Command line: %s\n", boot_command_line);
    #endif

    + early_cpu_init();
    early_ioremap_init();

    ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev);
    @@ -665,9 +665,6 @@ void __init setup_arch(char **cmdline_p)
    bss_resource.start = virt_to_phys(&__bss_start);
    bss_resource.end = virt_to_phys(&__bss_stop)-1;

    -#ifdef CONFIG_X86_64
    - early_cpu_init();
    -#endif
    strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
    *cmdline_p = command_line;

    diff --git a/arch/x86/xen/xen-asm_64.S b/arch/x86/xen/xen-asm_64.S
    index 4038cbf..7f58304 100644
    --- a/arch/x86/xen/xen-asm_64.S
    +++ b/arch/x86/xen/xen-asm_64.S
    @@ -173,7 +173,7 @@ ENTRY(xen_sysexit)
    pushq $__USER32_CS
    pushq %rdx

    - pushq $VGCF_in_syscall
    + pushq $0
    1: jmp hypercall_iret
    ENDPATCH(xen_sysexit)
    RELOC(xen_sysexit, 1b+1)
    diff --git a/include/asm-x86/processor-flags.h b/include/asm-x86/processor-flags.h
    index 092b39b..eff2ecd 100644
    --- a/include/asm-x86/processor-flags.h
    +++ b/include/asm-x86/processor-flags.h
    @@ -88,10 +88,12 @@
    #define CX86_ARR_BASE 0xc4
    #define CX86_RCR_BASE 0xdc

    +#ifdef __KERNEL__
    #ifdef CONFIG_VM86
    #define X86_VM_MASK X86_EFLAGS_VM
    #else
    #define X86_VM_MASK 0 /* No VM86 support */
    #endif
    +#endif

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

  2. Re: [git pull] x86 fixes



    On Thu, 24 Jul 2008, Ingo Molnar wrote:
    >
    > Hugh Dickins (1):
    > x86: BUILD_IRQ say .text to avoid .data.percpu
    >
    > diff --git a/arch/x86/kernel/irqinit_64.c b/arch/x86/kernel/irqinit_64.c
    > index 0373e88..9414125 100644
    > --- a/arch/x86/kernel/irqinit_64.c
    > +++ b/arch/x86/kernel/irqinit_64.c
    > @@ -43,7 +43,7 @@
    >
    > #define BUILD_IRQ(nr) \
    > asmlinkage void IRQ_NAME(nr); \
    > - asm("\n.p2align\n" \
    > + asm("\n.text\n.p2align\n" \
    > "IRQ" #nr "_interrupt:\n\t" \
    > "push $~(" #nr ") ; " \
    > "jmp common_interrupt");


    I do not think this is a good idea AT ALL.

    You need a ".previous" there too, otherwise any random C code that doesn't
    _happen_ to change segments will now possibly put some random variable in
    the .text segment.

    And yes, dependign on just where the BUILD_IRQ() is, and what is around
    it, and what compiler version we have, this bug may or may not show. But
    it's still _wrong_.

    I pulled it, will fix up by hand.

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

  3. Re: [git pull] x86 fixes

    Linus Torvalds wrote:
    >
    > On Thu, 24 Jul 2008, Ingo Molnar wrote:
    >> Hugh Dickins (1):
    >> x86: BUILD_IRQ say .text to avoid .data.percpu
    >>
    >> diff --git a/arch/x86/kernel/irqinit_64.c b/arch/x86/kernel/irqinit_64.c
    >> index 0373e88..9414125 100644
    >> --- a/arch/x86/kernel/irqinit_64.c
    >> +++ b/arch/x86/kernel/irqinit_64.c
    >> @@ -43,7 +43,7 @@
    >>
    >> #define BUILD_IRQ(nr) \
    >> asmlinkage void IRQ_NAME(nr); \
    >> - asm("\n.p2align\n" \
    >> + asm("\n.text\n.p2align\n" \
    >> "IRQ" #nr "_interrupt:\n\t" \
    >> "push $~(" #nr ") ; " \
    >> "jmp common_interrupt");

    >
    > I do not think this is a good idea AT ALL.
    >
    > You need a ".previous" there too, otherwise any random C code that doesn't
    > _happen_ to change segments will now possibly put some random variable in
    > the .text segment.
    >
    > And yes, dependign on just where the BUILD_IRQ() is, and what is around
    > it, and what compiler version we have, this bug may or may not show. But
    > it's still _wrong_.
    >
    > I pulled it, will fix up by hand.


    You're obviously right here; thanks for taking care of it.

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

+ Reply to Thread