1. 10 10月, 2012 1 次提交
  2. 22 5月, 2012 1 次提交
  3. 02 11月, 2011 2 次提交
  4. 26 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. 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
  7. 16 12月, 2009 1 次提交
  8. 17 6月, 2009 1 次提交
  9. 23 10月, 2008 2 次提交
  10. 16 10月, 2008 1 次提交
  11. 06 2月, 2008 1 次提交
    • J
      uml: header untangling · 8192ab42
      Jeff Dike 提交于
      Untangle UML headers somewhat and add some includes where they were
      needed explicitly, but gotten accidentally via some other header.
      
      arch/um/include/um_uaccess.h loses asm/fixmap.h because it uses no
      fixmap stuff and gains elf.h, because it needs FIXADDR_USER_*, and
      archsetjmp.h, because it needs jmp_buf.
      
      pmd_alloc_one is uninlined because it needs mm_struct, and that's
      inconvenient to provide in asm-um/pgtable-3level.h.
      
      elf_core_copy_fpregs is also uninlined from elf-i386.h and
      elf-x86_64.h, which duplicated the code anyway, to
      arch/um/kernel/process.c, so that the reference to current_thread
      doesn't pull sched.h or anything related into asm/elf.h.
      
      arch/um/sys-i386/ldt.c, arch/um/kernel/tlb.c and
      arch/um/kernel/skas/uaccess.c got sched.h because they dereference
      task_structs.  Its includes of linux and asm headers got turned from
      "" to <>.
      
      arch/um/sys-i386/bug.c gets asm/errno.h because it needs errno
      constants.
      
      asm/elf-i386 gets asm/user.h because it needs user_regs_struct.
      
      asm/fixmap.h gets page.h because it needs PAGE_SIZE and PAGE_MASK and
      system.h for BUG_ON.
      
      asm/pgtable doesn't need sched.h.
      
      asm/processor-generic.h defined mm_segment_t, but didn't use it.  So,
      that definition is moved to uaccess.h, which defines a bunch of
      mm_segment_t-related stuff.  thread_info.h uses mm_segment_t, and
      includes uaccess.h, which causes a recursion.  So, the definition is
      placed above the include of thread_info. in uaccess.h.  thread_info.h
      also gets page.h because it needs PAGE_SIZE.
      
      ObCheckpatchViolationJustification - I'm not adding a typedef; I'm
      moving mm_segment_t from one place to another.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8192ab42
  12. 17 10月, 2007 3 次提交
  13. 11 9月, 2007 1 次提交
  14. 31 8月, 2007 1 次提交
  15. 21 5月, 2005 1 次提交
    • J
      [PATCH] uml: small fixes left over from rc4 · ba9950c8
      Jeff Dike 提交于
      Some changes that I sent in didn't make 2.6.12-rc4 for some reason.  This
      adds them back.  We have
      	an x86_64 definition of TOP_ADDR
      	a reimplementation of the x86_64 csum_partial_copy_from_user
      	some syntax fixes in arch/um/kernel/ptrace.c
      	removal of a CFLAGS definition in the x86_64 Makefile
      	some include changes in the x86_64 ptrace.c and user-offsets.h
      	a syntax fix in elf-x86_64.h
      Also moved an include in the i386 and x86_64 Makefiles to make the symlinks
      work, and some small fixes from Al Viro.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: <viro@parcelfarce.linux.theplanet.co.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ba9950c8
  16. 06 5月, 2005 1 次提交
  17. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4