12 Oct, 2006

1 commit

  • There's nothing arch-specific about check_signature(), so move it to
    . Use a cross between the Alpha and i386 implementations as
    the generic one.

    Signed-off-by: Matthew Wilcox
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthew Wilcox
     

08 Oct, 2006

1 commit


04 Oct, 2006

1 commit


02 Oct, 2006

1 commit

  • The last in-kernel user of errno is gone, so we should remove the definition
    and everything referring to it. This also removes the now-unused lib/execve.c
    file that was introduced earlier.

    Also remove every trace of __KERNEL_SYSCALLS__ that still remained in the
    kernel.

    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
     

01 Oct, 2006

3 commits

  • Now that ptep_establish has a definition in PAE i386 3-level paging code, the
    only paging model which is insane enough to have multi-word hardware PTEs
    which are not efficient to set atomically, we can remove the ghost of
    set_pte_atomic from other architectures which falesly duplicated it, and
    remove all knowledge of it from the generic pgtable code.

    set_pte_atomic is now a private pte operator which is specific to i386

    Signed-off-by: Zachary Amsden
    Cc: Rusty Russell
    Cc: Jeremy Fitzhardinge
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zachary Amsden
     
  • Remove a few unused defines and remove obsolete information from comments.

    Signed-off-by: Roman Zippel
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     
  • On systems running with virtual cpus there is optimization potential in
    regard to spinlocks and rw-locks. If the virtual cpu that has taken a lock
    is known to a cpu that wants to acquire the same lock it is beneficial to
    yield the timeslice of the virtual cpu in favour of the cpu that has the
    lock (directed yield).

    With CONFIG_PREEMPT="n" this can be implemented by the architecture without
    common code changes. Powerpc already does this.

    With CONFIG_PREEMPT="y" the lock loops are coded with _raw_spin_trylock,
    _raw_read_trylock and _raw_write_trylock in kernel/spinlock.c. If the lock
    could not be taken cpu_relax is called. A directed yield is not possible
    because cpu_relax doesn't know anything about the lock. To be able to
    yield the lock in favour of the current lock holder variants of cpu_relax
    for spinlocks and rw-locks are needed. The new _raw_spin_relax,
    _raw_read_relax and _raw_write_relax primitives differ from cpu_relax
    insofar that they have an argument: a pointer to the lock structure.

    Signed-off-by: Martin Schwidefsky
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Haavard Skinnemoen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Martin Schwidefsky
     

27 Sep, 2006

3 commits


26 Sep, 2006

1 commit

  • One of the changes necessary for shared page tables is to standardize the
    pxx_page macros. pte_page and pmd_page have always returned the struct
    page associated with their entry, while pte_page_kernel and pmd_page_kernel
    have returned the kernel virtual address. pud_page and pgd_page, on the
    other hand, return the kernel virtual address.

    Shared page tables needs pud_page and pgd_page to return the actual page
    structures. There are very few actual users of these functions, so it is
    simple to standardize their usage.

    Since this is basic cleanup, I am submitting these changes as a standalone
    patch. Per Hugh Dickins' comments about it, I am also changing the
    pxx_page_kernel macros to pxx_page_vaddr to clarify their meaning.

    Signed-off-by: Dave McCracken
    Cc: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave McCracken
     

21 Sep, 2006

1 commit

  • > asm-m32r/page.h requires asm-generic/memory_model.h, which does not exist
    > asm-m32r/ptrace.h requires asm/m32r.h, which does not exist
    > asm-m32r/signal.h requires linux/linkage.h, which does not exist
    > asm-m32r/unistd.h requires asm/syscall.h, which does not exist
    > asm-m32r/user.h requires asm/processor.h, which does not exist

    Signed-off-by: Hirokazu Takata
    Signed-off-by: David Woodhouse

    David Woodhouse
     

15 Jul, 2006

1 commit

  • set_wmb should not be used in the kernel because it just confuses the
    code more and has no benefit. Since it is not currently used in the
    kernel this patch removes it so that new code does not include it.

    All archs define set_wmb(var, value) to do { var = value; wmb(); }
    while(0) except ia64 and sparc which use a mb() instead. But this is
    still moot since it is not used anyway.

    Hasn't been tested on any archs but x86 and x86_64 (and only compiled
    tested)

    Signed-off-by: Steven Rostedt
    Signed-off-by: Linus Torvalds

    Steven Rostedt
     

05 Jul, 2006

1 commit

  • * git://git.infradead.org/hdrinstall-2.6:
    Remove export of include/linux/isdn/tpam.h
    Remove and from userspace export
    Restrict headers exported to userspace for SPARC and SPARC64
    Add empty Kbuild files for 'make headers_install' in remaining arches.
    Add Kbuild file for Alpha 'make headers_install'
    Add Kbuild file for SPARC 'make headers_install'
    Add Kbuild file for IA64 'make headers_install'
    Add Kbuild file for S390 'make headers_install'
    Add Kbuild file for i386 'make headers_install'
    Add Kbuild file for x86_64 'make headers_install'
    Add Kbuild file for PowerPC 'make headers_install'
    Add generic Kbuild files for 'make headers_install'
    Basic implementation of 'make headers_check'
    Basic implementation of 'make headers_install'

    Linus Torvalds
     

04 Jul, 2006

1 commit


03 Jul, 2006

1 commit


30 Jun, 2006

2 commits

  • This patch implements an API whereby an application can determine the
    label of its peer's Unix datagram sockets via the auxiliary data mechanism of
    recvmsg.

    Patch purpose:

    This patch enables a security-aware application to retrieve the
    security context of the peer of a Unix datagram socket. The application
    can then use this security context to determine the security context for
    processing on behalf of the peer who sent the packet.

    Patch design and implementation:

    The design and implementation is very similar to the UDP case for INET
    sockets. Basically we build upon the existing Unix domain socket API for
    retrieving user credentials. Linux offers the API for obtaining user
    credentials via ancillary messages (i.e., out of band/control messages
    that are bundled together with a normal message). To retrieve the security
    context, the application first indicates to the kernel such desire by
    setting the SO_PASSSEC option via getsockopt. Then the application
    retrieves the security context using the auxiliary data mechanism.

    An example server application for Unix datagram socket should look like this:

    toggle = 1;
    toggle_len = sizeof(toggle);

    setsockopt(sockfd, SOL_SOCKET, SO_PASSSEC, &toggle, &toggle_len);
    recvmsg(sockfd, &msg_hdr, 0);
    if (msg_hdr.msg_controllen > sizeof(struct cmsghdr)) {
    cmsg_hdr = CMSG_FIRSTHDR(&msg_hdr);
    if (cmsg_hdr->cmsg_len cmsg_level == SOL_SOCKET &&
    cmsg_hdr->cmsg_type == SCM_SECURITY) {
    memcpy(&scontext, CMSG_DATA(cmsg_hdr), sizeof(scontext));
    }
    }

    sock_setsockopt is enhanced with a new socket option SOCK_PASSSEC to allow
    a server socket to receive security context of the peer.

    Testing:

    We have tested the patch by setting up Unix datagram client and server
    applications. We verified that the server can retrieve the security context
    using the auxiliary data mechanism of recvmsg.

    Signed-off-by: Catherine Zhang
    Acked-by: Acked-by: James Morris
    Signed-off-by: David S. Miller

    Catherine Zhang
     
  • Add ->retrigger() irq op to consolidate hw_irq_resend() implementations.
    (Most architectures had it defined to NOP anyway.)

    NOTE: ia64 needs testing. i386 and x86_64 tested.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

27 Jun, 2006

1 commit

  • acquired (aquired)
    contiguous (contigious)
    successful (succesful, succesfull)
    surprise (suprise)
    whether (weather)
    some other misspellings

    Signed-off-by: Andreas Mohr
    Signed-off-by: Adrian Bunk

    Andreas Mohr
     

23 Jun, 2006

1 commit

  • VGA_MAP_MEM translates to ioremap() on some architectures. It makes sense
    to do this to vga_vram_base, because we're going to access memory between
    vga_vram_base and vga_vram_end.

    But it doesn't really make sense to map starting at vga_vram_end, because
    we aren't going to access memory starting there. On ia64, which always has
    to be different, ioremapping vga_vram_end gives you something completely
    incompatible with ioremapped vga_vram_start, so vga_vram_size ends up being
    nonsense.

    As a bonus, we often know the size up front, so we can use ioremap()
    correctly, rather than giving it a zero size.

    Signed-off-by: Bjorn Helgaas
    Cc: "Antonino A. Daplas"
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     

18 Jun, 2006

1 commit


29 Apr, 2006

1 commit


26 Apr, 2006

1 commit


20 Apr, 2006

4 commits

  • - Remove unnecessary push/pop's of the switch_to() macro
    for performance tuning.
    - Cosmetic updates: change __inline__ to inline, etc.

    Signed-off-by: Hirokazu Takata
    Cc: NIIBE Yutaka
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hirokazu Takata
     
  • Here is a patch to support a reboot function for M3A-2170(Mappi-III)
    evaluation board.

    Signed-off-by: Hayato Fujiwara
    Signed-off-by: Hirokazu Takata
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hirokazu Takata
     
  • This patch updates include/asm-m32r/semaphore.h for good readability and
    maintainability.

    Signed-off-by: Hirokazu Takata
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hirokazu Takata
     
  • This modification is required to fix debugging function for m32r targets
    with !CONFIG_ISA_DSP_LEVEL2, by unifying 'struct pt_regs' and 'struct
    sigcontext' size for all M32R ISA.

    Some m32r processor core with !CONFIG_ISA_DSP_LEVEL2 configuration has only
    single accumulator a0 (ex. VDEC2 core, M32102 core, etc.), the others with
    CONFIG_ISA_DSP_LEVEL2 has two accumulators, a0 and a1.

    This means there are two variations of thread context. So far, we reduced
    and changed stackframe size at a syscall for their context size. However,
    this causes a problem that a GDB for processors with CONFIG_ISA_DSP_LEVEL2
    cannot be used for processors with !CONFIG_ISA_DSP_LEVEL2.

    From the viewpoint of GDB support, we should reduce such variation of
    stackframe size for simplicity.

    In this patch, dummy members are added to 'struct pt_regs' and 'struct
    sigcontext' to adjust their size for !CONFIG_ISA_DSP_LEVEL2.

    This modification is also a one step for a GDB update in future.
    Currently, on the m32r, GDB can access process's context by using ptrace
    functions in a simple way of register by register access. By unifying
    stackframe size, we have a possibility to make use of ptrace functions of
    not only a single register access but also block register access,
    PTRACE_{GETREGS,PUTREGS}.

    However, for this purpose, we might have to modify stackframe structure
    some more; for example, PSW (processor status word) register should be
    pre-processed before pushing to stack at a syscall, and so on. In this
    case, we must update carefully both kernel and GDB at a time...

    Signed-off-by: Hayato Fujiwara
    Signed-off-by: Hirokazu Takata
    Cc: Kei Sakamoto
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hirokazu Takata
     

11 Apr, 2006

5 commits

  • __NR_sys_kexec_load should be __NR_kexec_load. Mainly affects users of the
    _syscallN() macros, and glibc is already checking for __NR_kexec_load.

    Cc: Ulrich Drepper
    Cc: "Eric W. Biederman"
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Hirokazu Takata
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Current implementations define NODES_SHIFT in include/asm-xxx/numnodes.h for
    each arch. Its definition is sometimes configurable. Indeed, ia64 defines 5
    NODES_SHIFT values in the current git tree. But it looks a bit messy.

    SGI-SN2(ia64) system requires 1024 nodes, and the number of nodes already has
    been changeable by config. Suitable node's number may be changed in the
    future even if it is other architecture. So, I wrote configurable node's
    number.

    This patch set defines just default value for each arch which needs multi
    nodes except ia64. But, it is easy to change to configurable if necessary.

    On ia64 the number of nodes can be already configured in generic ia64 and SN2
    config. But, NODES_SHIFT is defined for DIG64 and HP'S machine too. So, I
    changed it so that all platforms can be configured via CONFIG_NODES_SHIFT. It
    would be simpler.

    See also: http://marc.theaimsgroup.com/?l=linux-kernel&m=114358010523896&w=2

    Signed-off-by: Yasunori Goto
    Cc: Hirokazu Takata
    Cc: "Luck, Tony"
    Cc: Andi Kleen
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Cc: Kyle McMartin
    Cc: Russell King
    Cc: Ralf Baechle
    Cc: Jack Steiner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yasunori Goto
     
  • Remove unused prepare_to_switch() macros.

    Signed-off-by: Hirokazu Takata
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Miles Bader
    Cc: Chris Zankel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hirokazu Takata
     
  • Update {get,put}_user macros for m32r kernel.
    - Modify get_user to use __get_user_asm macro, instead of __get_user_x macro.
    - Remove arch/m32r/lib/{get,put}user.S.
    - Some cosmetic updates.

    I would like to thank NIIBE Yutaka for his reporting about the m32r kernel's
    security problem in {get,put}_user macros.

    There were no address checking for user space access in {get,put}_user macros.
    ;-)

    Signed-off-by: Hirokazu Takata
    Cc: NIIBE Yutaka
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hirokazu Takata
     
  • This patch fixes a boot problem of the m32r SMP kernel 2.6.16-rc1-mm3 or
    later.

    In this patch, cpu_possible_map is statically initialized, and cpu_present_map
    is also copied from cpu_possible_map in smp_prepare_cpus(), because the m32r
    architecture has not supported CPU hotplug yet.

    Signed-off-by: Hayato Fujiwara
    Signed-off-by: Hirokazu Takata
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hirokazu Takata
     

28 Mar, 2006

2 commits

  • Just about every architecture defines some macros to do operations on pfns.
    They're all virtually identical. This patch consolidates all of them.

    One minor glitch is that at least i386 uses them in a very skeletal header
    file. To keep away from #include dependency hell, I stuck the new
    definitions in a new, isolated header.

    Of all of the implementations, sh64 is the only one that varied by a bit.
    It used some masks to ensure that any sign-extension got ripped away before
    the arithmetic is done. This has been posted to that sh64 maintainers and
    the development list.

    Compiles on x86, x86_64, ia64 and ppc64.

    Signed-off-by: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • m32r can use generic funcs.

    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: Hirokazu Takata
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     

27 Mar, 2006

2 commits

  • - remove __{,test_and_}{set,clear,change}_bit() and test_bit()
    - remove ffz()
    - remove find_{next,first}{,_zero}_bit()
    - remove __ffs()
    - remove generic_fls()
    - remove generic_fls64()
    - remove sched_find_first_bit()
    - remove generic_ffs()
    - remove generic_hweight{32,16,8}()
    - remove ext2_{set,clear,test,find_first_zero,find_next_zero}_bit()
    - remove ext2_{set,clear}_bit_atomic()
    - remove minix_{test,set,test_and_clear,test,find_first_zero}_bit()

    Signed-off-by: Akinobu Mita
    Cc: Hirokazu Takata
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Bitmap functions for the minix filesystem and the ext2 filesystem except
    ext2_set_bit_atomic() and ext2_clear_bit_atomic() do not require the atomic
    guarantees.

    But these are defined by using atomic bit operations on several architectures.
    (cris, frv, h8300, ia64, m32r, m68k, m68knommu, mips, s390, sh, sh64, sparc,
    sparc64, v850, and xtensa)

    This patch switches to non atomic bit operation.

    Signed-off-by: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

26 Mar, 2006

1 commit

  • Implement the half-closed devices notifiation, by adding a new POLLRDHUP
    (and its alias EPOLLRDHUP) bit to the existing poll/select sets. Since the
    existing POLLHUP handling, that does not report correctly half-closed
    devices, was feared to be changed, this implementation leaves the current
    POLLHUP reporting unchanged and simply add a new bit that is set in the few
    places where it makes sense. The same thing was discussed and conceptually
    agreed quite some time ago:

    http://lkml.org/lkml/2003/7/12/116

    Since this new event bit is added to the existing Linux poll infrastruture,
    even the existing poll/select system calls will be able to use it. As far
    as the existing POLLHUP handling, the patch leaves it as is. The
    pollrdhup-2.6.16.rc5-0.10.diff defines the POLLRDHUP for all the existing
    archs and sets the bit in the six relevant files. The other attached diff
    is the simple change required to sys/epoll.h to add the EPOLLRDHUP
    definition.

    There is "a stupid program" to test POLLRDHUP delivery here:

    http://www.xmailserver.org/pollrdhup-test.c

    It tests poll(2), but since the delivery is same epoll(2) will work equally.

    Signed-off-by: Davide Libenzi
    Cc: "David S. Miller"
    Cc: Michael Kerrisk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davide Libenzi
     

25 Feb, 2006

1 commit

  • Fix and update for gcc-4.0.

    - arch/m32r/kernel/signal.c:
    Change type of the 8th parameter of sys_rt_sigsuspend() from
    'struct pt_regs' to 'struct pt_regs *'.
    This functions make use of the 'regs' parameter to return status value,
    but gcc-4.0 optimizes and removes it as a dead code.
    Functions, sys_sigaltstack() and sys_rt_sigreturn(), have also modified.

    - arch/m32r/lib/usercopy.c, include/asm-m32r/uaccess.h:
    Add early-clobber constraints('&') to output values of asm statements;
    these constraints seems to be required for gcc-4.0 register assignment.

    Signed-off-by: Hayato Fujiwara
    Signed-off-by: Hirokazu Takata
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hirokazu Takata
     

21 Feb, 2006

1 commit

  • This patch fixes a bug of include/asm-m32r/system.h:__cmpxchg_u32().

    static __inline__ unsigned long
    __cmpxchg_u32(volatile unsigned int *p, unsigned int old, unsigned int new);

    In __cmpxchg_u32(), the "old" value must not be changed to the previous "*p"
    value. But the former code modifies the previous "*p" value.

    A deadlock at _atomic_dec_and_lock sometimes happened due to this bug.

    Signed-off-by: Hayato Fujiwara
    Signed-off-by: Hirokazu Takata
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hirokazu Takata
     

16 Feb, 2006

1 commit

  • Make new MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK consistent across all
    arches. The idea is to make it possible to use them portably even before
    distros include them in libc headers.

    Move common flags to asm-generic/mman.h

    Signed-off-by: Michael S. Tsirkin
    Cc: Roland Dreier
    Cc: Badari Pulavarty
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael S. Tsirkin