12 Oct, 2006

3 commits

  • A simple patch to enable the UBC on SH-4A.

    Signed-off-by: Ryusuke Sakato
    Signed-off-by: Paul Mundt

    Ryusuke Sakato
     
  • Kill off interrupt_table for all of the CPU subtypes, we now
    default in to stepping in to do_IRQ() for _all_ IRQ exceptions
    and counting the spurious ones, rather than simply flipping on
    the ones we cared about. This and enabling the IRQ by default
    automatically has already uncovered a couple of bugs and IRQs
    that weren't being caught, as well as some that are being
    generated far too often (SCI Tx Data Empty, for example).

    The general rationale is to use a marker for interrupt exceptions,
    test for it in the handle_exception() path, and skip out to
    do_IRQ() if it's found. Everything else follows the same behaviour
    of finding the cached EXPEVT value in r2/r2_bank, we just rip out
    the INTEVT read from entry.S entirely (except for in the kGDB NMI
    case, which is another matter).

    Note that while this changes the do_IRQ() semantics regarding r4
    handling, they were fundamentally broken anyways (relying entirely
    on r2_bank for the cached code). With this, we do the INTEVT read
    from do_IRQ() itself (in the CONFIG_CPU_HAS_INTEVT case), or fall
    back on r4 for the muxed IRQ number, which should also be closer
    to what SH-2 and SH-2A want anyways.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • Now that we've started accounting for spurious IRQs, change the
    logic somewhat so that we have a better chance of catching them.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

10 Oct, 2006

1 commit


06 Oct, 2006

7 commits


04 Oct, 2006

1 commit


03 Oct, 2006

5 commits


02 Oct, 2006

6 commits

  • This adds the new kernel_execve function on all architectures that were using
    _syscall3() to implement execve.

    The implementation uses code from the _syscall3 macros provided in the
    unistd.h header file. I don't have cross-compilers for any of these
    architectures, so the patch is untested with the exception of i386.

    Most architectures can probably implement this in a nicer way in assembly or
    by combining it with the sys_execve implementation itself, but this should do
    it for now.

    [bunk@stusta.de: m68knommu build fix]
    [markh@osdl.org: build fix]
    [bero@arklinux.org: build fix]
    [ralf@linux-mips.org: mips fix]
    [schwidefsky@de.ibm.com: s390 fix]
    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: Ralf Baechle
    Signed-off-by: Bernhard Rosenkraenzer
    Signed-off-by: Mark Haverkamp
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     
  • In some places, particularly drivers and __init code, the init utsns is the
    appropriate one to use. This patch replaces those with a the init_utsname
    helper.

    Changes: Removed several uses of init_utsname(). Hope I picked all the
    right ones in net/ipv4/ipconfig.c. These are now changed to
    utsname() (the per-process namespace utsname) in the previous
    patch (2/7)

    [akpm@osdl.org: CIFS fix]
    Signed-off-by: Serge E. Hallyn
    Cc: Kirill Korotaev
    Cc: "Eric W. Biederman"
    Cc: Herbert Poetzl
    Cc: Andrey Savochkin
    Cc: Serge Hallyn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Serge E. Hallyn
     
  • Replace references to system_utsname to the per-process uts namespace
    where appropriate. This includes things like uname.

    Changes: Per Eric Biederman's comments, use the per-process uts namespace
    for ELF_PLATFORM, sunrpc, and parts of net/ipv4/ipconfig.c

    [jdike@addtoit.com: UML fix]
    [clg@fr.ibm.com: cleanup]
    [akpm@osdl.org: build fix]
    Signed-off-by: Serge E. Hallyn
    Cc: Kirill Korotaev
    Cc: "Eric W. Biederman"
    Cc: Herbert Poetzl
    Cc: Andrey Savochkin
    Signed-off-by: Cedric Le Goater
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Serge E. Hallyn
     
  • Move the init_nsproxy definition out of arch/ into kernel/nsproxy.c. This
    avoids all arches having to be updated. Compiles and boots on s390.

    Signed-off-by: Serge E. Hallyn
    Cc: Kirill Korotaev
    Cc: "Eric W. Biederman"
    Cc: Herbert Poetzl
    Cc: Andrey Savochkin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Serge E. Hallyn
     
  • This patch adds a nsproxy structure to the task struct. Later patches will
    move the fs namespace pointer into this structure, and introduce a new utsname
    namespace into the nsproxy.

    The vserver and openvz functionality, then, would be implemented in large part
    by virtualizing/isolating more and more resources into namespaces, each
    contained in the nsproxy.

    [akpm@osdl.org: build fix]
    Signed-off-by: Serge Hallyn
    Cc: Kirill Korotaev
    Cc: "Eric W. Biederman"
    Cc: Herbert Poetzl
    Cc: Andrey Savochkin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Serge E. Hallyn
     
  • cpumask: ensure that the cpu_online_map and cpu_possible_map bitmasks, and
    hence all the macros in that require them, are available to
    modules for all supported combinations of architecture and CONFIG_SMP.

    Signed-off-by: Greg Banks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Greg Banks
     

01 Oct, 2006

1 commit

  • With 2.6.18-rc4-mm2, now wall_jiffies will always be the same as jiffies.
    So we can kill wall_jiffies completely.

    This is just a cleanup and logically should not change any real behavior
    except for one thing: RTC updating code in (old) ppc and xtensa use a
    condition "jiffies - wall_jiffies == 1". This condition is never met so I
    suppose it is just a bug. I just remove that condition only instead of
    kill the whole "if" block.

    [heiko.carstens@de.ibm.com: s390 build fix and cleanup]
    Signed-off-by: Atsushi Nemoto
    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: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     

30 Sep, 2006

3 commits

  • Pass ticks to do_timer() and update_times(), and adjust x86_64 and s390
    timer interrupt handler with this change.

    Currently update_times() calculates ticks by "jiffies - wall_jiffies", but
    callers of do_timer() should know how many ticks to update. Passing ticks
    get rid of this redundant calculation. Also there are another redundancy
    pointed out by Martin Schwidefsky.

    This cleanup make a barrier added by
    5aee405c662ca644980c184774277fc6d0769a84 needless. So this patch removes
    it.

    As a bonus, this cleanup make wall_jiffies can be removed easily, since now
    wall_jiffies is always synced with jiffies. (This patch does not really
    remove wall_jiffies. It would be another cleanup patch)

    Signed-off-by: Atsushi Nemoto
    Cc: Martin Schwidefsky
    Cc: "Eric W. Biederman"
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: john stultz
    Cc: Andi Kleen
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Acked-by: Russell King
    Cc: Ian Molton
    Cc: Mikael Starvik
    Acked-by: David Howells
    Cc: Yoshinori Sato
    Cc: Hirokazu Takata
    Acked-by: 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
    Acked-by: "Luck, Tony"
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     
  • This is an updated version of Eric Biederman's is_init() patch.
    (http://lkml.org/lkml/2006/2/6/280). It applies cleanly to 2.6.18-rc3 and
    replaces a few more instances of ->pid == 1 with is_init().

    Further, is_init() checks pid and thus removes dependency on Eric's other
    patches for now.

    Eric's original description:

    There are a lot of places in the kernel where we test for init
    because we give it special properties. Most significantly init
    must not die. This results in code all over the kernel test
    ->pid == 1.

    Introduce is_init to capture this case.

    With multiple pid spaces for all of the cases affected we are
    looking for only the first process on the system, not some other
    process that has pid == 1.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Sukadev Bhattiprolu
    Cc: Dave Hansen
    Cc: Serge Hallyn
    Cc: Cedric Le Goater
    Cc:
    Acked-by: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sukadev Bhattiprolu
     
  • Make PROT_WRITE imply PROT_READ for a number of architectures which don't
    support write only in hardware.

    While looking at this, I noticed that some architectures which do not
    support write only mappings already take the exact same approach. For
    example, in arch/alpha/mm/fault.c:

    "
    if (cause < 0) {
    if (!(vma->vm_flags & VM_EXEC))
    goto bad_area;
    } else if (!cause) {
    /* Allow reads even for write-only mappings */
    if (!(vma->vm_flags & (VM_READ | VM_WRITE)))
    goto bad_area;
    } else {
    if (!(vma->vm_flags & VM_WRITE))
    goto bad_area;
    }
    "

    Thus, this patch brings other architectures which do not support write only
    mappings in-line and consistent with the rest. I've verified the patch on
    ia64, x86_64 and x86.

    Additional discussion:

    Several architectures, including x86, can not support write-only mappings.
    The pte for x86 reserves a single bit for protection and its two states are
    read only or read/write. Thus, write only is not supported in h/w.

    Currently, if i 'mmap' a page write-only, the first read attempt on that page
    creates a page fault and will SEGV. That check is enforced in
    arch/blah/mm/fault.c. However, if i first write that page it will fault in
    and the pte will be set to read/write. Thus, any subsequent reads to the page
    will succeed. It is this inconsistency in behavior that this patch is
    attempting to address. Furthermore, if the page is swapped out, and then
    brought back the first read will also cause a SEGV. Thus, any arbitrary read
    on a page can potentially result in a SEGV.

    According to the SuSv3 spec, "if the application requests only PROT_WRITE, the
    implementation may also allow read access." Also as mentioned, some
    archtectures, such as alpha, shown above already take the approach that i am
    suggesting.

    The counter-argument to this raised by Arjan, is that the kernel is enforcing
    the write only mapping the best it can given the h/w limitations. This is
    true, however Alan Cox, and myself would argue that the inconsitency in
    behavior, that is applications can sometimes work/sometimes fails is highly
    undesireable. If you read through the thread, i think people, came to an
    agreement on the last patch i posted, as nobody has objected to it...

    Signed-off-by: Jason Baron
    Cc: Russell King
    Cc: "Luck, Tony"
    Cc: Hugh Dickins
    Cc: Roman Zippel
    Cc: Geert Uytterhoeven
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Acked-by: Andi Kleen
    Acked-by: Alan Cox
    Cc: Arjan van de Ven
    Acked-by: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Ian Molton
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jason Baron
     

27 Sep, 2006

13 commits