1. 02 11月, 2011 14 次提交
  2. 15 9月, 2011 3 次提交
  3. 26 7月, 2011 4 次提交
  4. 21 7月, 2011 1 次提交
  5. 23 3月, 2011 1 次提交
    • P
      uml: kernels on {i386,x86_64} produce bad coredumps · 13e165ba
      Paul Pluzhnikov 提交于
      One of our users reported that when a user-level program SIGSEGVs under
      UML kernel, the resulting core dump is not very usable.
      
      I have reproduced that with the latest kernel:
      
        make ARCH=um defconfig; make ARCH=um
      
      Run the resulting kernel, then "inside" run this program:
      
      #include <pthread.h>
      
      void *fn(void *p)
      {
       abort();
      }
      
      int main()
      {
       pthread_t tid;
       pthread_create(&tid, 0, fn, 0);
       pthread_join(tid, 0);
       return 0;
      }
      
      Analyze the coredump with GDB. Here is what you'll see:
      
      sudo gdb -q -ex 'set solib-absolute-prefix ../root_fs' -ex 'file ../root_fs/var/tmp/mt-abort' -ex 'core ../root_fs/var/tmp/core.762'
      Reading symbols from /usr/local/google/root_fs/var/tmp/mt-abort...done.
      [New Thread 763]
      [New Thread 762]
      Core was generated by `./mt-abort'.
      Program terminated with signal 6, Aborted.
      #0  0x0000000040255250 in raise () from ../root_fs/lib64/libc.so.6
      (gdb) info thread
        2 Thread 762  0x0000000000000000 in ?? ()
      * 1 Thread 763  0x0000000040255250 in raise () from ../root_fs/lib64/libc.so.6
      
      Note that thread#2 looks funny.
      
      (gdb) thread 2
      [Switching to thread 2 (Thread 762)]#0  0x0000000000000000 in ?? ()
      (gdb) info reg
      rax            0x0      0
      rbx            0x0      0
      rcx            0x0      0
      rdx            0x0      0
      rsi            0x0      0
      rdi            0x0      0
      rbp            0x0      0x0
      rsp            0x0      0x0
      r8             0x0      0
      r9             0x0      0
      r10            0x0      0
      r11            0x0      0
      r12            0x0      0
      r13            0x0      0
      r14            0x0      0
      r15            0x0      0
      rip            0x0      0
      eflags         0x0      [ ]
      cs             0x0      0
      ss             0x0      0
      ds             0x0      0
      es             0x0      0
      fs             0x0      0
      gs             0x0      0
      
      Examining the core shows that NT_PRSTATUS notes for all threads other than
      the one that crashed are zeroed out.
      
      I believe this is happening because neither ELF_CORE_COPY_TASK_REGS nor
      task_pt_regs are defined under ARCH=um, and so elf_core_copy_task_regs()
      becomes a no-op.
      
      Attached patch fixes this for SUBARCH={x86_64,i386}.
      Signed-off-by: NPaul Pluzhnikov <ppluzhnikov@google.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Acked-by: NWANG Cong <xiyou.wangcong@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      13e165ba
  6. 28 10月, 2010 2 次提交
  7. 21 4月, 2010 1 次提交
    • J
      UML: Fix compiler warning due to missing task_struct declaration · 4cb3ca7c
      Jan Kiszka 提交于
      We can't pull in linux/sched.h due to circular dependency, so just
      forward-declare the struct.
      
      This fixes the following warning:
      
        CC      arch/um/sys-i386/elfcore.o
      In file included from /data/linux-2.6/include/linux/elf.h:8,
                       from /data/linux-2.6/arch/um/sys-i386/elfcore.c:2:
      arch/um/sys-i386/asm/elf.h:78: warning: ‘struct task_struct’ declared inside parameter list
      arch/um/sys-i386/asm/elf.h:78: warning: its scope is only this definition or declaration, which is probably not what you want
      
      I guess not many people build against i386 hosts anymore, so this
      remained widely unnoticed.
      Signed-off-by: NJan Kiszka <jan.kiszka@web.de>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      4cb3ca7c
  8. 20 4月, 2010 2 次提交
  9. 13 3月, 2010 1 次提交
    • C
      improve sys_newuname() for compat architectures · e28cbf22
      Christoph Hellwig 提交于
      On an architecture that supports 32-bit compat we need to override the
      reported machine in uname with the 32-bit value.  Instead of doing this
      separately in every architecture introduce a COMPAT_UTS_MACHINE define in
      <asm/compat.h> and apply it directly in sys_newuname().
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: James Morris <jmorris@namei.org>
      Cc: Andreas Schwab <schwab@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e28cbf22
  10. 18 1月, 2010 1 次提交
    • L
      x86: Fix breakage of UML from the changes in the rwsem system · 4126faf0
      Linus Torvalds 提交于
      The patches 5d0b7235 and
      bafaecd1 broke the UML build:
      
      On Sun, 17 Jan 2010, Ingo Molnar wrote:
      >
      > FYI, -tip testing found that these changes break the UML build:
      >
      > kernel/built-in.o: In function `__up_read':
      > /home/mingo/tip/arch/x86/include/asm/rwsem.h:192: undefined reference to `call_rwsem_wake'
      > kernel/built-in.o: In function `__up_write':
      > /home/mingo/tip/arch/x86/include/asm/rwsem.h:210: undefined reference to `call_rwsem_wake'
      > kernel/built-in.o: In function `__downgrade_write':
      > /home/mingo/tip/arch/x86/include/asm/rwsem.h:228: undefined reference to `call_rwsem_downgrade_wake'
      > kernel/built-in.o: In function `__down_read':
      > /home/mingo/tip/arch/x86/include/asm/rwsem.h:112: undefined reference to `call_rwsem_down_read_failed'
      > kernel/built-in.o: In function `__down_write_nested':
      > /home/mingo/tip/arch/x86/include/asm/rwsem.h:154: undefined reference to `call_rwsem_down_write_failed'
      > collect2: ld returned 1 exit status
      
      Add lib/rwsem_64.o to the UML subarch objects to fix.
      
      LKML-Reference: <alpine.LFD.2.00.1001171023440.13231@localhost.localdomain>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      4126faf0
  11. 16 12月, 2009 1 次提交
  12. 17 6月, 2009 2 次提交
  13. 12 6月, 2009 1 次提交
  14. 01 4月, 2009 1 次提交
  15. 23 10月, 2008 5 次提交