18 Aug, 2010

1 commit

  • Make do_execve() take a const filename pointer so that kernel_execve() compiles
    correctly on ARM:

    arch/arm/kernel/sys_arm.c:88: warning: passing argument 1 of 'do_execve' discards qualifiers from pointer target type

    This also requires the argv and envp arguments to be consted twice, once for
    the pointer array and once for the strings the array points to. This is
    because do_execve() passes a pointer to the filename (now const) to
    copy_strings_kernel(). A simpler alternative would be to cast the filename
    pointer in do_execve() when it's passed to copy_strings_kernel().

    do_execve() may not change any of the strings it is passed as part of the argv
    or envp lists as they are some of them in .rodata, so marking these strings as
    const should be fine.

    Further kernel_execve() and sys_execve() need to be changed to match.

    This has been test built on x86_64, frv, arm and mips.

    Signed-off-by: David Howells
    Tested-by: Ralf Baechle
    Acked-by: Russell King
    Signed-off-by: Linus Torvalds

    David Howells
     

04 Mar, 2010

1 commit

  • To avoid potential problems with an empty /dev open /dev/console
    from rootfs instead of waiting to mount our root filesystem and
    mounting it there. This effectively guarantees that there will
    be a device node, and it won't be on a filesystem that we will
    ever unmount, so there are no issues with leaving /dev/console
    open and pinning the filesystem.

    This is actually more effective than automatically mounting
    devtmpfs on /dev because it removes removes the occasionally
    problematic assumption that /dev/console exists from the boot
    code.

    With this patch I was able to throw busybox on my /boot partition
    (which has no /dev directory) and boot into userspace without
    problems.

    The only possible negative consequence I can think of is that
    someone out there deliberately used did not use a character device
    that is major 5 minor 2 for /dev/console. Does anyone know of a
    situation in which that could make sense?

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Al Viro

    Eric W. Biederman
     

21 Nov, 2007

1 commit

  • Add appropriate freezer annotations to handle_initrd(), so that it's possible
    to resume from disk from an initrd.

    http://bugzilla.kernel.org/show_bug.cgi?id=9345

    Signed-off-by: Rafael J. Wysocki
    Cc: Pavel Machek
    Cc: Nigel Cunningham
    Cc: Ingo Molnar
    Cc: Chris Friedhoff
    Signed-off-by: Len Brown

    Rafael J. Wysocki
     

20 Sep, 2007

1 commit

  • Commit 831441862956fffa17b9801db37e6ea1650b0f69 (Freezer: make kernel
    threads nonfreezable by default) breaks freezing when attempting to resume
    from an initrd, because the init (which is freezeable) spins while waiting
    for another thread to run /linuxrc, but doesn't check whether it has been
    told to enter the refrigerator. The original patch replaced a call to
    try_to_freeze() with a call to yield(). I believe a simple reversion is
    wrong because if !CONFIG_PM_SLEEP, try_to_freeze() is a noop. It should
    still yield.

    Signed-off-by: Nigel Cunningham
    Acked-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nigel Cunningham
     

18 Jul, 2007

1 commit

  • Currently, the freezer treats all tasks as freezable, except for the kernel
    threads that explicitly set the PF_NOFREEZE flag for themselves. This
    approach is problematic, since it requires every kernel thread to either
    set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't
    care for the freezing of tasks at all.

    It seems better to only require the kernel threads that want to or need to
    be frozen to use some freezer-related code and to remove any
    freezer-related code from the other (nonfreezable) kernel threads, which is
    done in this patch.

    The patch causes all kernel threads to be nonfreezable by default (ie. to
    have PF_NOFREEZE set by default) and introduces the set_freezable()
    function that should be called by the freezable kernel threads in order to
    unset PF_NOFREEZE. It also makes all of the currently freezable kernel
    threads call set_freezable(), so it shouldn't cause any (intentional)
    change of behaviour to appear. Additionally, it updates documentation to
    describe the freezing of tasks more accurately.

    [akpm@linux-foundation.org: build fixes]
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Nigel Cunningham
    Cc: Pavel Machek
    Cc: Oleg Nesterov
    Cc: Gautham R Shenoy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

08 May, 2007

1 commit


08 Dec, 2006

1 commit


02 Oct, 2006

1 commit

  • The use of execve() in the kernel is dubious, since it relies on the
    __KERNEL_SYSCALLS__ mechanism that stores the result in a global errno
    variable. As a first step of getting rid of this, change all users to a
    global kernel_execve function that returns a proper error code.

    This function is a terrible hack, and a later patch removes it again after the
    kernel syscalls are gone.

    Signed-off-by: Arnd Bergmann
    Cc: Andi Kleen
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Russell King
    Cc: Ian Molton
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Hirokazu Takata
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Richard Curnow
    Cc: William Lee Irwin III
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Cc: Miles Bader
    Cc: Chris Zankel
    Cc: "Luck, Tony"
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     

27 Jun, 2006

1 commit


23 Mar, 2006

1 commit

  • This patch introduces a user space interface for swsusp.

    The interface is based on a special character device, called the snapshot
    device, that allows user space processes to perform suspend and resume-related
    operations with the help of some ioctls and the read()/write() functions.
     Additionally it allows these processes to allocate free swap pages from a
    selected swap partition, called the resume partition, so that they know which
    sectors of the resume partition are available to them.

    The interface uses the same low-level system memory snapshot-handling
    functions that are used by the built-it swap-writing/reading code of swsusp.

    The interface documentation is included in the patch.

    The patch assumes that the major and minor numbers of the snapshot device will
    be 10 (ie. misc device) and 231, the registration of which has already been
    requested.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

30 Jun, 2005

1 commit

  • On system boot up, there was an failure reported to boot.msg:

    Trying to move old root to /initrd ... failed

    According to initrd(4) man page, step #7 of BOOT-UP OPERATION
    is described as below:
    7. If the normal root file has directory /initrd, device
    /dev/ram0 is moved from / to /initrd. Otherwise if
    directory /initrd does not exist device /dev/ram0 is
    unmounted.

    We got service calls from customers concerning about this failure message
    at boot time. Many systems do not have /initrd and thus the message can be
    changed in the case of non-existing /initrd so that it does not sound like
    a failure of the system.

    Signed-off-by: Jay Lan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jay Lan
     

26 Jun, 2005

1 commit


17 Apr, 2005

1 commit

  • 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!

    Linus Torvalds