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
     

26 Jun, 2006

1 commit


29 Apr, 2006

1 commit


26 Apr, 2006

1 commit


11 Apr, 2006

2 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
     

29 Mar, 2006

1 commit


28 Mar, 2006

1 commit


27 Mar, 2006

5 commits

  • The test_bit() routines are defined to work on a pointer to unsigned long.
    But thread_info.flags is __u32 (unsigned int) on sh and it is passed to flag
    set/clear/test wrappers in include/linux/thread_info.h. So the compiler will
    print warnings.

    This patch changes to unsigned long instead.

    Signed-off-by: Akinobu Mita
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • - remove __{,test_and_}{set,clear,change}_bit() and test_bit()
    - remove find_{next,first}{,_zero}_bit()
    - remove generic_ffs()
    - remove generic_hweight{32,16,8}()
    - remove sched_find_first_bit()
    - 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()
    - remove generic_fls()
    - remove generic_fls64()

    Signed-off-by: Akinobu Mita
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    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
     
  • Add blkcnt_t as the type of inode.i_blocks. This enables you to make the size
    of blkcnt_t either 4 bytes or 8 bytes on 32 bits architecture with CONFIG_LSF.

    - CONFIG_LSF
    Add new configuration parameter.
    - blkcnt_t
    On h8300, i386, mips, powerpc, s390 and sh that define sector_t,
    blkcnt_t is defined as u64 if CONFIG_LSF is enabled; otherwise it is
    defined as unsigned long.
    On other architectures, it is defined as unsigned long.
    - inode.i_blocks
    Change the type from sector_t to blkcnt_t.

    Signed-off-by: Takashi Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Takashi Sato
     
  • This patch series fixes the following problems on 32 bits architecture.

    o stat64 returns the lower 32 bits of blocks, although userland st_blocks
    has 64 bits, because i_blocks has only 32 bits. The ioctl with FIOQSIZE has
    the same problem.

    o As Dave Kleikamp said, making >2TB file on JFS results in writing an
    invalid block number to disk inode. The cause is the same as above too.

    o In generic quota code dquot_transfer(), the file usage is calculated from
    i_blocks via inode_get_bytes(). If the file is over 2TB, the change of
    usage is less than expected. The cause is the same as above too.

    o As Trond Myklebust said, statfs64's entries related to blocks are invalid
    on statfs64 for a network filesystem which has more than 2^32-1 blocks with
    CONFIG_LBD disabled. [PATCH 3/3]

    We made patches to fix problems that occur when handling a large filesystem
    and a large file. It was discussed on the mails titled "stat64 for over 2TB
    file returned invalid st_blocks".

    Signed-off-by: Takashi Sato
    Cc: Dave Kleikamp
    Cc: Jan Kara
    Cc: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Takashi Sato
     

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
     

24 Mar, 2006

1 commit


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
     

15 Feb, 2006

1 commit

  • Currently, copy-on-write may change the physical address of a page even if the
    user requested that the page is pinned in memory (either by mlock or by
    get_user_pages). This happens if the process forks meanwhile, and the parent
    writes to that page. As a result, the page is orphaned: in case of
    get_user_pages, the application will never see any data hardware DMA's into
    this page after the COW. In case of mlock'd memory, the parent is not getting
    the realtime/security benefits of mlock.

    In particular, this affects the Infiniband modules which do DMA from and into
    user pages all the time.

    This patch adds madvise options to control whether memory range is inherited
    across fork. Useful e.g. for when hardware is doing DMA from/into these
    pages. Could also be useful to an application wanting to speed up its forks
    by cutting large areas out of consideration.

    Signed-off-by: Michael S. Tsirkin
    Acked-by: Hugh Dickins
    Cc: Michael Kerrisk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael S. Tsirkin
     

02 Feb, 2006

6 commits


17 Jan, 2006

6 commits

  • This builds on some of the clock framework code to support a simple system
    timer interface.

    Signed-off-by: Paul Mundt
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mundt
     
  • This adds a relatively simplistic clock framework for sh. The initial goal
    behind this is to clean up the arch/sh/kernel/time.c mess and to get the CPU
    subtype-specific frequency setting and calculation code moved somewhere more
    sensible.

    This only deals with the core clocks at the moment, though it's trivial for
    other drivers to define their own clocks as desired.

    Signed-off-by: Paul Mundt
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mundt
     
  • This introduces a few changes in the way that the I/O routines are defined on
    SH, specifically so that things like the iomap API properly wrap through the
    machvec for board-specific quirks.

    In addition to this, the old p3_ioremap() work is converted to a more generic
    __ioremap() that will map through the PMB if it's available, or fall back on
    page tables for everything else.

    An alpha-like IO_CONCAT is also added so we can start to clean up the
    board-specific io.h mess, which will be handled in board update patches..

    Signed-off-by: Paul Mundt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mundt
     
  • This moves the various IRQ controller drivers into a new subdirectory, and
    also extends the INTC2 IRQ handler to also deal with SH7760 and SH7780
    interrupts, rather than just ST-40.

    The old CONFIG_SH_GENERIC has also been removed from the IRQ definitions, as
    new ports are expected to be based off of CONFIG_SH_UNKNOWN. Since there are
    plenty of incompatible machvecs, CONFIG_SH_GENERIC doesn't make sense anymore.

    Signed-off-by: Paul Mundt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mundt
     
  • This adds kexec() support for SH.

    Signed-off-by: kogiidena
    Signed-off-by: Paul Mundt
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    kogiidena
     
  • This extends the current SH DMA API somewhat to support a proper virtual
    channel abstraction, and also works to represent this through the driver model
    by giving each DMAC its own platform device.

    There's also a few other minor changes to support a few new CPU subtypes, and
    make TEI generation for the SH DMAC configurable.

    Signed-off-by: Paul Mundt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mundt
     

13 Jan, 2006

4 commits


11 Jan, 2006

1 commit


10 Jan, 2006

2 commits


09 Jan, 2006

1 commit

  • Most of the architectures have the same asm/futex.h. This consolidates them
    into asm-generic, with the arches including it from their own asm/futex.h.

    In the case of UML, this reverts the old broken futex.h and goes back to using
    the same one as almost everyone else.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike