13 May, 2008

1 commit


12 May, 2008

1 commit

  • Fix compile problem in rtrap.S

    arch/sparc/kernel/built-in.o: In function `ret_trap_userwins_ok':
    arch/sparc/kernel/rtrap.S:(.text+0x1900): undefined reference to
    `PSR_SYCALL'

    Signed-off-by: Robert Reif
    Signed-off-by: David S. Miller

    Robert Reif
     

11 May, 2008

2 commits

  • So, forever, we've had this ptrace_signal_deliver implementation
    which tries to handle all of the nasties that can occur when the
    debugger looks at a process about to take a signal. It's meant
    to address all of these issues inside of the kernel so that the
    debugger need not be mindful of such things.

    Problem is, this doesn't work.

    The idea was that we should do the syscall restart business first, so
    that the debugger captures that state. Otherwise, if the debugger for
    example saves the child's state, makes the child execute something
    else, then restores the saved state, we won't handle the syscall
    restart properly because we lose the "we're in a syscall" state.

    The code here worked for most cases, but if the debugger actually
    passes the signal through to the child unaltered, it's possible that
    we would do a syscall restart when we shouldn't have.

    In particular this breaks the case of debugging a process under a gdb
    which is being debugged by yet another gdb. gdb uses sigsuspend
    to wait for SIGCHLD of the inferior, but if gdb itself is being
    debugged by a top-level gdb we get a ptrace_stop(). The top-level gdb
    does a PTRACE_CONT with SIGCHLD to let the inferior gdb see the
    signal. But ptrace_signal_deliver() assumed the debugger would cancel
    out the signal and therefore did a syscall restart, because the return
    error was ERESTARTNOHAND.

    Fix this by simply making ptrace_signal_deliver() a nop, and providing
    a way for the debugger to control system call restarting properly:

    1) Report a "in syscall" software bit in regs->{tstate,psr}.
    It is set early on in trap entry to a system call and is fully
    visible to the debugger via ptrace() and regsets.

    2) Test this bit right before doing a syscall restart. We have
    to do a final recheck right after get_signal_to_deliver() in
    case the debugger cleared the bit during ptrace_stop().

    3) Clear the bit in trap return so we don't accidently try to set
    that bit in the real register.

    As a result we also get a ptrace_{is,clear}_syscall() for sparc32 just
    like sparc64 has.

    M68K has this same exact bug, and is now the only other user of the
    ptrace_signal_deliver hook. It needs to be fixed in the same exact
    way as sparc.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Forever we had a PTRACE_SUNOS_DETACH which was unconditionally
    recognized, regardless of the personality of the process.

    Unfortunately, this value is what ended up in the GLIBC sys/ptrace.h
    header file on sparc as PTRACE_DETACH and PT_DETACH.

    So continue to recognize this old value. Luckily, it doesn't conflict
    with anything we actually care about.

    Signed-off-by: David S. Miller

    David S. Miller
     

10 May, 2008

1 commit


08 May, 2008

2 commits

  • We need to be more liberal about the alignment of the buffer given to
    us by sigaltstack(). The user should not need to be mindful of all of
    the alignment constraints we have for the stack frame.

    This mirrors how we handle this situation in clone() as well.

    Also, we align the stack even in non-SA_ONSTACK cases so that signals
    due to bad stack alignment can be delivered properly. This makes such
    errors easier to debug and recover from.

    Finally, add the sanity check x86 has to make sure we won't overflow
    the signal stack.

    This fixes glibc testcases nptl/tst-cancel20.c and
    nptl/tst-cancelx20.c

    Signed-off-by: David S. Miller

    David S. Miller
     
  • We clobber %i1 as well as %i0 for these system calls,
    because they give two return values.

    Therefore, on error, we have to restore %i1 properly
    or else the restart explodes since it uses the wrong
    arguments.

    This fixes glibc's nptl/tst-eintr1.c testcase.

    Signed-off-by: David S. Miller

    David S. Miller
     

07 May, 2008

1 commit


02 May, 2008

3 commits


30 Apr, 2008

1 commit


29 Apr, 2008

5 commits


27 Apr, 2008

1 commit

  • Back around the same time we were bootstrapping the first 32-bit sparc
    Linux kernel with a SunOS userland, we made the signal frame match
    that of SunOS.

    By the time we even started putting together a native Linux userland
    for 32-bit Sparc we realized this layout wasn't sufficient for Linux's
    needs.

    Therefore we changed the layout, yet kept support for the old style
    signal frame layout in there. The detection mechanism is that we had
    sys_sigaction() start passing in a negative signal number to indicate
    "new style signal frames please".

    Anyways, no binaries exist in the world that use the old stuff. In
    fact, I bet Jakub Jelinek and myself are the only two people who ever
    had such binaries to be honest.

    So let's get rid of this stuff.

    I added an assertion using WARN_ON_ONCE() that makes sure 32-bit
    applications are passing in that negative signal number still.

    Signed-off-by: David S. Miller

    David S. Miller
     

24 Apr, 2008

1 commit


22 Apr, 2008

2 commits


21 Apr, 2008

1 commit


17 Apr, 2008

1 commit

  • Semaphores are no longer performance-critical, so a generic C
    implementation is better for maintainability, debuggability and
    extensibility. Thanks to Peter Zijlstra for fixing the lockdep
    warning. Thanks to Harvey Harrison for pointing out that the
    unlikely() was unnecessary.

    Signed-off-by: Matthew Wilcox
    Acked-by: Ingo Molnar

    Matthew Wilcox
     

10 Apr, 2008

1 commit

  • 1) ptrace should pass 'current' to task_user_regset_view()

    2) When fetching general registers using a 64-bit view, and
    the target is 32-bit, we have to convert.

    3) Skip the whole register window get/set code block if
    the user isn't asking to access anything in there.

    Otherwise we have problems if the user doesn't have
    an address space setup. Fetching ptrace register is
    still valid at such a time, and ptrace does not try
    to access the register window area of the regset.

    Signed-off-by: David S. Miller

    David S. Miller
     

18 Mar, 2008

2 commits


04 Mar, 2008

2 commits


29 Feb, 2008

2 commits


25 Feb, 2008

1 commit

  • CC [M] arch/sparc/kernel/led.o
    arch/sparc/kernel/led.c: In function 'led_blink':
    arch/sparc/kernel/led.c:35: error: invalid use of undefined type 'struct
    timer_list'
    arch/sparc/kernel/led.c:35: error: 'jiffies' undeclared (first use in
    this function)
    arch/sparc/kernel/led.c:35: error: (Each undeclared identifier is
    reported only once
    arch/sparc/kernel/led.c:35: error: for each function it appears in.)
    arch/sparc/kernel/led.c:36: error: 'avenrun' undeclared (first use in
    this function)
    arch/sparc/kernel/led.c:36: error: 'FSHIFT' undeclared (first use in
    this function)
    arch/sparc/kernel/led.c:36: error: 'HZ' undeclared (first use in this
    function)
    arch/sparc/kernel/led.c:37: error: invalid use of undefined type 'struct
    timer_list'
    arch/sparc/kernel/led.c:39: error: invalid use of undefined type 'struct
    timer_list'
    arch/sparc/kernel/led.c:40: error: invalid use of undefined type 'struct
    timer_list'
    arch/sparc/kernel/led.c:42: error: implicit declaration of function
    'add_timer'
    arch/sparc/kernel/led.c: In function 'led_write_proc':
    arch/sparc/kernel/led.c:70: error: implicit declaration of function
    'copy_from_user'
    arch/sparc/kernel/led.c:84: error: implicit declaration of function
    'del_timer_sync'
    arch/sparc/kernel/led.c: In function 'led_init':
    arch/sparc/kernel/led.c:109: error: implicit declaration of function
    'init_timer'
    arch/sparc/kernel/led.c:110: error: invalid use of undefined type
    'struct timer_list'
    make[1]: *** [arch/sparc/kernel/led.o] Error 1

    Based upon original patch by Robert Reif.

    Signed-off-by: David S. Miller

    David S. Miller
     

19 Feb, 2008

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    [SPARC64]: Add regs_return_value().
    [SPARC64]: Kill pcic_present().
    [SPARC]: Kill 'prom_palette'.
    [ATYFB]: Kill 'prom_palette' sparc code.
    [SPARC64]: Kill 'prom_keyboard'.
    [SPARC]: Kill extern decl of 'panic_setup'.
    [SPARC64]: Delete 'boot_flags'.
    [SPARC64]: Kill unused function 'kernel_enter_debugger'.
    [SPARC64] arch/sparc64/kernel/unaligned.c: Use time_* macros
    [SPARC64]: Always register a PROM based early console.
    [SPARC64]: Update defconfig.
    [SPARC64]: Add -mtune=ultrasparc3 if possible.
    [SPARC64]: Remove Makefile code for ancient gcc and binutils.
    [SPARC64]: Remove DEBUG_BOOTMEM.
    [SPARC64]: Use shorter "get_zeroed_page" call.
    [SPARC]: Use shorter form of "get_zeroed_page".
    [SPARC]: video/cg14.c and video/sbuslib.c build fixes

    Linus Torvalds
     
  • The idea of this thing is we could save/restore the firmware's
    palette when breaking in and out of the firmware prompt.

    Only one driver implemented this (atyfb) and it's value is
    questionable. If you're just debugging you don't really
    care that the characters end up being purple or whatever.

    And we can provide better debugging and firmware command
    facilities with minimal in-kernel console I/O drivers.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This was made static in kernel/panic.c a long time ago.

    Signed-off-by: David S. Miller

    David S. Miller
     

14 Feb, 2008

1 commit

  • Commit d3d74453c34f8fd87674a8cf5b8a327c68f22e99 ("hrtimer: fixup the
    HRTIMER_CB_IRQSAFE_NO_SOFTIRQ fallback") broke several archs, and since
    only Russell bothered to merge the fix, and Greg to ACK his arch, I'm
    sending this for merger.

    I have confirmation that the Alpha bit results in a booting kernel.
    That leaves: blackfin, frv, sh and sparc untested.

    The deadlock in question was found by Russell:

    IRQ handle
    -> timer_tick() - xtime seqlock held for write
    -> update_process_times()
    -> run_local_timers()
    -> hrtimer_run_queues()
    -> hrtimer_get_softirq_time() - tries to get a read lock

    Now, Thomas assures me the fix is trivial, only do_timer() needs to be
    done under the xtime_lock, and update_process_times() can savely be
    removed from under it.

    Signed-off-by: Peter Zijlstra
    Acked-by: Greg Ungerer
    CC: Richard Henderson
    CC: Bryan Wu
    CC: David Howells
    CC: Paul Mundt
    CC: William Irwin
    Acked-by: Ingo Molnar
    Acked-by: Ivan Kokshaysky
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

13 Feb, 2008

1 commit


10 Feb, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: (24 commits)
    [SPARC]: Add solaris/sunos binary support to feature removal schedule.
    [SPARC]: Merge asm-sparc{,64}/a.out.h
    [SPARC]: Merge asm-sparc{,64}/fb.h
    [SPARC]: Merge asm-sparc{,64}/errno.h
    [SPARC]: Merge asm-sparc{,64}/emergency-restart.h
    [SPARC]: Merge asm-sparc{,64}/div64.h
    [SPARC]: Merge asm-sparc{,64}/device.h
    [SPARC]: Merge asm-sparc{,64}/current.h
    [SPARC]: Merge asm-sparc{,64}/cputime.h
    [SPARC]: Merge asm-sparc{,64}/cache.h
    [SPARC]: Merge asm-sparc{,64}/byteorder.h
    [SPARC]: Merge asm-sparc{,64}/bugs.h
    [SPARC]: Merge asm-sparc{,64}/bug.h
    [SPARC]: Kill BSD errno translation table and header files.
    [SPARC]: Merge asm-sparc{,64}/bpp.h
    [SPARC]: Merge include/asm-sparc{,64}/auxvec.h
    [SPARC]: Merge include/asm-sparc{,64}/of_device.h
    [SPARC]: Merge include/asm-sparc{,64}/prom.h
    [SPARC]: Remove of_platform_device_create
    [SPARC64]: Add kretprobe support.
    ...

    Linus Torvalds
     

09 Feb, 2008

3 commits