15 Sep, 2010

1 commit

  • compat_alloc_user_space() expects the caller to independently call
    access_ok() to verify the returned area. A missing call could
    introduce problems on some architectures.

    This patch incorporates the access_ok() check into
    compat_alloc_user_space() and also adds a sanity check on the length.
    The existing compat_alloc_user_space() implementations are renamed
    arch_compat_alloc_user_space() and are used as part of the
    implementation of the new global function.

    This patch assumes NULL will cause __get_user()/__put_user() to either
    fail or access userspace on all architectures. This should be
    followed by checking the return value of compat_access_user_space()
    for NULL in the callers, at which time the access_ok() in the callers
    can also be removed.

    Reported-by: Ben Hawkes
    Signed-off-by: H. Peter Anvin
    Acked-by: Benjamin Herrenschmidt
    Acked-by: Chris Metcalf
    Acked-by: David S. Miller
    Acked-by: Ingo Molnar
    Acked-by: Thomas Gleixner
    Acked-by: Tony Luck
    Cc: Andrew Morton
    Cc: Arnd Bergmann
    Cc: Fenghua Yu
    Cc: H. Peter Anvin
    Cc: Heiko Carstens
    Cc: Helge Deller
    Cc: James Bottomley
    Cc: Kyle McMartin
    Cc: Martin Schwidefsky
    Cc: Paul Mackerras
    Cc: Ralf Baechle
    Cc:

    H. Peter Anvin
     

24 Aug, 2010

2 commits

  • The tlb flushing code uses the mm_users field of the mm_struct to
    decide if each page table entry needs to be flushed individually with
    IPTE or if a global flush for the mm_struct is sufficient after all page
    table updates have been done. The comment for mm_users says "How many
    users with user space?" but the /proc code increases mm_users after it
    found the process structure by pid without creating a new user process.
    Which makes mm_users useless for the decision between the two tlb
    flusing methods. The current code can be confused to not flush tlb
    entries by a concurrent access to /proc files if e.g. a fork is in
    progres. The solution for this problem is to make the tlb flushing
    logic independent from the mm_users field.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • fix this build error:
    arch/s390/kernel/process.c:272: error: conflicting types for 'sys_execve'
    arch/s390/kernel/entry.h:45: error: previous declaration of 'sys_execve' was here
    make[1]: *** [arch/s390/kernel/process.o] Error 1
    make: *** [arch/s390/kernel] Error 2

    introduced by d7627467b7a8dd6944885290a03a07ceb28c10eb

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     

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
     

15 Aug, 2010

2 commits


14 Aug, 2010

1 commit

  • Mark arguments to certain system calls as being const where they should be but
    aren't. The list includes:

    (*) The filename arguments of various stat syscalls, execve(), various utimes
    syscalls and some mount syscalls.

    (*) The filename arguments of some syscall helpers relating to the above.

    (*) The buffer argument of various write syscalls.

    Signed-off-by: David Howells
    Acked-by: David S. Miller
    Signed-off-by: Linus Torvalds

    David Howells
     

13 Aug, 2010

3 commits


11 Aug, 2010

5 commits

  • * 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block: (149 commits)
    block: make sure that REQ_* types are seen even with CONFIG_BLOCK=n
    xen-blkfront: fix missing out label
    blkdev: fix blkdev_issue_zeroout return value
    block: update request stacking methods to support discards
    block: fix missing export of blk_types.h
    writeback: fix bad _bh spinlock nesting
    drbd: revert "delay probes", feature is being re-implemented differently
    drbd: Initialize all members of sync_conf to their defaults [Bugz 315]
    drbd: Disable delay probes for the upcomming release
    writeback: cleanup bdi_register
    writeback: add new tracepoints
    writeback: remove unnecessary init_timer call
    writeback: optimize periodic bdi thread wakeups
    writeback: prevent unnecessary bdi threads wakeups
    writeback: move bdi threads exiting logic to the forker thread
    writeback: restructure bdi forker loop a little
    writeback: move last_active to bdi
    writeback: do not remove bdi from bdi_list
    writeback: simplify bdi code a little
    writeback: do not lose wake-ups in bdi threads
    ...

    Fixed up pretty trivial conflicts in drivers/block/virtio_blk.c and
    drivers/scsi/scsi_error.c as per Jens.

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (68 commits)
    U6715 16550A serial driver support
    Char: nozomi, set tty->driver_data appropriately
    Char: nozomi, fix tty->count counting
    serial: max3107: Fix gpiolib support
    hsu: call PCI pm hooks in suspend/resume function
    hsu: some code cleanup
    hsu: add a periodic timer to check dma rx channel
    hsu: driver for Medfield High Speed UART device
    mxser: remove unnesesary NULL check
    serial: add support for OX16PCI958 card
    serial: 68328serial.c: remove dead (ALMA_ANS | DRAGONIXVZ | M68EZ328ADS)
    timbuart: use __devinit and __devexit macros for probe and remove
    serial: MMIO32 support for 8250_early.c
    serial: mcf: don't take spinlocks in already protected functions
    serial: general fixes in the serial_rs485 structure
    serial: fix missing bit coverage of ASYNC_FLAGS
    serial: "altera_uart: simplify altera_uart_console_putc()" checkpatch fixes
    serial: crisv10: formatting of pointers in printk()
    vt: Fix warning: statement with no effect due to vt_kern.h
    tty_io: remove casts from void*
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
    [S390] dasd: tunable missing interrupt handler
    [S390] dasd: allocate fallback cqr for reserve/release
    [S390] topology: use default MC domain initializer
    [S390] initrd: change default load address
    [S390] cmm, smsgiucv_app: convert sender to uppercase
    [S390] cmm: add missing __init/__exit annotations
    [S390] cio: use all available paths for some internal I/O
    [S390] ccwreq: add ability to use all paths
    [S390] cio: ccw_device_online_store return -EINVAL in case of missing driver
    [S390] cio: Log the response from the unit check handler
    [S390] cio: CHSC SIOSL Support

    Linus Torvalds
     
  • This patch is against the 2.6.34 source.

    Paraphrased from the 1989 BSD patch by David Borman @ cray.com:

    These are the changes needed for the kernel to support
    LINEMODE in the server.

    There is a new bit in the termios local flag word, EXTPROC.
    When this bit is set, several aspects of the terminal driver
    are disabled. Input line editing, character echo, and mapping
    of signals are all disabled. This allows the telnetd to turn
    off these functions when in linemode, but still keep track of
    what state the user wants the terminal to be in.

    New ioctl:
    TIOCSIG Generate a signal to processes in the
    current process group of the pty.

    There is a new mode for packet driver, the TIOCPKT_IOCTL bit.
    When packet mode is turned on in the pty, and the EXTPROC bit
    is set, then whenever the state of the pty is changed, the
    next read on the master side of the pty will have the TIOCPKT_IOCTL
    bit set. This allows the process on the server side of the pty
    to know when the state of the terminal has changed; it can then
    issue the appropriate ioctl to retrieve the new state.

    Since the original BSD patches accompanied the source code for telnet
    I've left that reference here, but obviously the feature is useful for
    any remote terminal protocol, including ssh.

    The corresponding feature has existed in the BSD tty driver since 1989.
    For historical reference, a good copy of the relevant files can be found
    here:

    http://anonsvn.mit.edu/viewvc/krb5/trunk/src/appl/telnet/?pathrev=17741

    Signed-off-by: Howard Chu
    Cc: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    hyc@symas.com
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (96 commits)
    no need for list_for_each_entry_safe()/resetting with superblock list
    Fix sget() race with failing mount
    vfs: don't hold s_umount over close_bdev_exclusive() call
    sysv: do not mark superblock dirty on remount
    sysv: do not mark superblock dirty on mount
    btrfs: remove junk sb_dirt change
    BFS: clean up the superblock usage
    AFFS: wait for sb synchronization when needed
    AFFS: clean up dirty flag usage
    cifs: truncate fallout
    mbcache: fix shrinker function return value
    mbcache: Remove unused features
    add f_flags to struct statfs(64)
    pass a struct path to vfs_statfs
    update VFS documentation for method changes.
    All filesystems that need invalidate_inode_buffers() are doing that explicitly
    convert remaining ->clear_inode() to ->evict_inode()
    Make ->drop_inode() just return whether inode needs to be dropped
    fs/inode.c:clear_inode() is gone
    fs/inode.c:evict() doesn't care about delete vs. non-delete paths now
    ...

    Fix up trivial conflicts in fs/nilfs2/super.c

    Linus Torvalds
     

10 Aug, 2010

8 commits

  • Provide an INIT_MM_CONTEXT intializer macro which can be used to
    statically initialize mm_struct:mm_context of init_mm. This way we can
    get rid of code which will do the initialization at run time (on s390).

    In addition the current code can be found at a place where it is not
    expected. So let's have a common initializer which architectures
    can use if needed.

    This is based on a patch from Suzuki Poulose.

    Signed-off-by: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Suzuki Poulose
    Cc: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • Add a flags field to help glibc implementing statvfs(3) efficiently.

    We copy the flag values from glibc, and add a new ST_VALID flag to
    denote that f_flags is implemented.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • ... and since we never hash its inodes, default
    ->drop_inode() will work just fine.

    Signed-off-by: Al Viro

    Al Viro
     
  • Use default MC sched domain initializer, since performance meassurements
    finally showed that this is indeed better.
    Besides the fact that the powersavings flags functions didn't make too
    much sense, but were unused anyway.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • Change default load address of the initrd in case of IPL from reader.
    The new load address is directly behind the kernel image.
    This way we can see immediatly if there are any problems with the code
    which tries to rescue the initrd in case the bootmem bitmap would
    overlap with the initrd.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • The sender kernel parameter contains a z/VM user ID where
    alphabetic characters must be specified in uppercase.

    Allow users to specify lowercase characters and convert the
    sender string to uppercase at module initialization.

    Signed-off-by: Hendrik Brueckner
    Signed-off-by: Martin Schwidefsky

    Hendrik Brueckner
     
  • Add missing __init and __exit annoations for module init and exit
    functions. This will save us huge amounts of memory... sort of.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • A Linux interface for the CHSC command
    store-I/O-operation-status-and-initiate-logging (SIOSL).
    Model-dependent logging within the channel subsystem can be invoked
    via a helper function or a writable subchannel device attribute.

    Signed-off-by: Michael Ernst
    Signed-off-by: Martin Schwidefsky

    Michael Ernst
     

08 Aug, 2010

1 commit


07 Aug, 2010

2 commits

  • …x/kernel/git/tip/linux-2.6-tip

    * 'timers-timekeeping-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    um: Fix read_persistent_clock fallout
    kgdb: Do not access xtime directly
    powerpc: Clean up obsolete code relating to decrementer and timebase
    powerpc: Rework VDSO gettimeofday to prevent time going backwards
    clocksource: Add __clocksource_updatefreq_hz/khz methods
    x86: Convert common clocksources to use clocksource_register_hz/khz
    timekeeping: Make xtime and wall_to_monotonic static
    hrtimer: Cleanup direct access to wall_to_monotonic
    um: Convert to use read_persistent_clock
    timkeeping: Fix update_vsyscall to provide wall_to_monotonic offset
    powerpc: Cleanup xtime usage
    powerpc: Simplify update_vsyscall
    time: Kill off CONFIG_GENERIC_TIME
    time: Implement timespec_add
    x86: Fix vtime/file timestamp inconsistencies

    Trivial conflicts in Documentation/feature-removal-schedule.txt

    Much less trivial conflicts in arch/powerpc/kernel/time.c resolved as
    per Thomas' earlier merge commit 47916be4e28c ("Merge branch
    'powerpc.cherry-picks' into timers/clocksource")

    Linus Torvalds
     
  • …git/tip/linux-2.6-tip

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (162 commits)
    tracing/kprobes: unregister_trace_probe needs to be called under mutex
    perf: expose event__process function
    perf events: Fix mmap offset determination
    perf, powerpc: fsl_emb: Restore setting perf_sample_data.period
    perf, powerpc: Convert the FSL driver to use local64_t
    perf tools: Don't keep unreferenced maps when unmaps are detected
    perf session: Invalidate last_match when removing threads from rb_tree
    perf session: Free the ref_reloc_sym memory at the right place
    x86,mmiotrace: Add support for tracing STOS instruction
    perf, sched migration: Librarize task states and event headers helpers
    perf, sched migration: Librarize the GUI class
    perf, sched migration: Make the GUI class client agnostic
    perf, sched migration: Make it vertically scrollable
    perf, sched migration: Parameterize cpu height and spacing
    perf, sched migration: Fix key bindings
    perf, sched migration: Ignore unhandled task states
    perf, sched migration: Handle ignored migrate out events
    perf: New migration tool overview
    tracing: Drop cpparg() macro
    perf: Use tracepoint_synchronize_unregister() to flush any pending tracepoint call
    ...

    Fix up trivial conflicts in Makefile and drivers/cpufreq/cpufreq.c

    Linus Torvalds
     

06 Aug, 2010

1 commit

  • * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
    modpost: support objects with more than 64k sections
    trivial: fix a typo in a filename
    frv: clean up arch/frv/Makefile
    kbuild: allow assignment to {A,C}FLAGS_KERNEL on the command line
    kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line
    Kbuild: Add option to set -femit-struct-debug-baseonly
    Makefile: "make kernelrelease" should show the correct full kernel version
    Makefile.build: make KBUILD_SYMTYPES work again

    Linus Torvalds
     

05 Aug, 2010

4 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (39 commits)
    random: Reorder struct entropy_store to remove padding on 64bits
    padata: update API documentation
    padata: Remove padata_get_cpumask
    crypto: pcrypt - Update pcrypt cpumask according to the padata cpumask notifier
    crypto: pcrypt - Rename pcrypt_instance
    padata: Pass the padata cpumasks to the cpumask_change_notifier chain
    padata: Rearrange set_cpumask functions
    padata: Rename padata_alloc functions
    crypto: pcrypt - Dont calulate a callback cpu on empty callback cpumask
    padata: Check for valid cpumasks
    padata: Allocate cpumask dependend recources in any case
    padata: Fix cpu index counting
    crypto: geode_aes - Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
    pcrypt: Added sysfs interface to pcrypt
    padata: Added sysfs primitives to padata subsystem
    padata: Make two separate cpumasks
    padata: update documentation
    padata: simplify serialization mechanism
    padata: make padata_do_parallel to return zero on success
    padata: Handle empty padata cpumasks
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (276 commits)
    [SCSI] zfcp: Trigger logging in the FCP channel on qdio error conditions
    [SCSI] zfcp: Introduce experimental support for DIF/DIX
    [SCSI] zfcp: Enable data division support for FCP devices
    [SCSI] zfcp: Prevent access on uninitialized memory.
    [SCSI] zfcp: Post events through FC transport class
    [SCSI] zfcp: Cleanup QDIO attachment and improve processing.
    [SCSI] zfcp: Cleanup function parameters for sbal value.
    [SCSI] zfcp: Use correct width for timer_interval field
    [SCSI] zfcp: Remove SCSI device when removing unit
    [SCSI] zfcp: Use memdup_user and kstrdup
    [SCSI] zfcp: Fix retry after failed "open port" erp action
    [SCSI] zfcp: Fail erp after timeout
    [SCSI] zfcp: Use forced_reopen in terminate_rport_io callback
    [SCSI] zfcp: Register SCSI devices after successful fc_remote_port_add
    [SCSI] zfcp: Do not try "forced close" when port is already closed
    [SCSI] zfcp: Do not unblock rport from REOPEN_PORT_FORCED
    [SCSI] sd: add support for runtime PM
    [SCSI] implement runtime Power Management
    [SCSI] convert to the new PM framework
    [SCSI] Unify SAM_ and SAM_STAT_ macros
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1443 commits)
    phy/marvell: add 88ec048 support
    igb: Program MDICNFG register prior to PHY init
    e1000e: correct MAC-PHY interconnect register offset for 82579
    hso: Add new product ID
    can: Add driver for esd CAN-USB/2 device
    l2tp: fix export of header file for userspace
    can-raw: Fix skb_orphan_try handling
    Revert "net: remove zap_completion_queue"
    net: cleanup inclusion
    phy/marvell: add 88e1121 interface mode support
    u32: negative offset fix
    net: Fix a typo from "dev" to "ndev"
    igb: Use irq_synchronize per vector when using MSI-X
    ixgbevf: fix null pointer dereference due to filter being set for VLAN 0
    e1000e: Fix irq_synchronize in MSI-X case
    e1000e: register pm_qos request on hardware activation
    ip_fragment: fix subtracting PPPOE_SES_HLEN from mtu twice
    net: Add getsockopt support for TCP thin-streams
    cxgb4: update driver version
    cxgb4: add new PCI IDs
    ...

    Manually fix up conflicts in:
    - drivers/net/e1000e/netdev.c: due to pm_qos registration
    infrastructure changes
    - drivers/net/phy/marvell.c: conflict between adding 88ec048 support
    and cleaning up the IDs
    - drivers/net/wireless/ipw2x00/ipw2100.c: trivial ipw2100_pm_qos_req
    conflict (registration change vs marking it static)

    Linus Torvalds
     
  • * 'kvm-updates/2.6.36' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (198 commits)
    KVM: VMX: Fix host GDT.LIMIT corruption
    KVM: MMU: using __xchg_spte more smarter
    KVM: MMU: cleanup spte set and accssed/dirty tracking
    KVM: MMU: don't atomicly set spte if it's not present
    KVM: MMU: fix page dirty tracking lost while sync page
    KVM: MMU: fix broken page accessed tracking with ept enabled
    KVM: MMU: add missing reserved bits check in speculative path
    KVM: MMU: fix mmu notifier invalidate handler for huge spte
    KVM: x86 emulator: fix xchg instruction emulation
    KVM: x86: Call mask notifiers from pic
    KVM: x86: never re-execute instruction with enabled tdp
    KVM: Document KVM_GET_SUPPORTED_CPUID2 ioctl
    KVM: x86: emulator: inc/dec can have lock prefix
    KVM: MMU: Eliminate redundant temporaries in FNAME(fetch)
    KVM: MMU: Validate all gptes during fetch, not just those used for new pages
    KVM: MMU: Simplify spte fetch() function
    KVM: MMU: Add gpte_valid() helper
    KVM: MMU: Add validate_direct_spte() helper
    KVM: MMU: Add drop_large_spte() helper
    KVM: MMU: Use __set_spte to link shadow pages
    ...

    Linus Torvalds
     

04 Aug, 2010

1 commit


03 Aug, 2010

1 commit

  • It is now possible to assign options to AS, CC and LD
    on the command line - which is only used when building modules.

    {A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
    in the arch makefiles, thus users had no way to specify
    additional options to AS, CC, LD when building modules
    without overriding the original value.

    Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
    that is used by arch specific files and free up
    {A,C,LD}FLAGS_MODULE so they can be assigned on
    the command line.

    All arch Makefiles that used the old variables has been updated.

    Note: Previously we had a MODFLAGS variable for both
    AS and CC. But in favour of consistency this was dropped.
    So in some cases arch Makefile has one assignmnet replaced by
    two assignmnets.

    Note2: MODFLAGS was not documented and is dropped
    without any notice. I do not expect much/any breakage
    from this.

    Signed-off-by: Sam Ravnborg
    Cc: Denys Vlasenko
    Cc: Haavard Skinnemoen
    Cc: Mike Frysinger
    Cc: Tony Luck
    Cc: Geert Uytterhoeven
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: Chen Liqin
    Acked-by: Mike Frysinger [blackfin]
    Acked-by: Haavard Skinnemoen [avr32]
    Signed-off-by: Michal Marek

    Sam Ravnborg
     

02 Aug, 2010

1 commit


01 Aug, 2010

6 commits