12 May, 2013

1 commit

  • Pull audit changes from Eric Paris:
    "Al used to send pull requests every couple of years but he told me to
    just start pushing them to you directly.

    Our touching outside of core audit code is pretty straight forward. A
    couple of interface changes which hit net/. A simple argument bug
    calling audit functions in namei.c and the removal of some assembly
    branch prediction code on ppc"

    * git://git.infradead.org/users/eparis/audit: (31 commits)
    audit: fix message spacing printing auid
    Revert "audit: move kaudit thread start from auditd registration to kaudit init"
    audit: vfs: fix audit_inode call in O_CREAT case of do_last
    audit: Make testing for a valid loginuid explicit.
    audit: fix event coverage of AUDIT_ANOM_LINK
    audit: use spin_lock in audit_receive_msg to process tty logging
    audit: do not needlessly take a lock in tty_audit_exit
    audit: do not needlessly take a spinlock in copy_signal
    audit: add an option to control logging of passwords with pam_tty_audit
    audit: use spin_lock_irqsave/restore in audit tty code
    helper for some session id stuff
    audit: use a consistent audit helper to log lsm information
    audit: push loginuid and sessionid processing down
    audit: stop pushing loginid, uid, sessionid as arguments
    audit: remove the old depricated kernel interface
    audit: make validity checking generic
    audit: allow checking the type of audit message in the user filter
    audit: fix build break when AUDIT_DEBUG == 2
    audit: remove duplicate export of audit_enabled
    Audit: do not print error when LSMs disabled
    ...

    Linus Torvalds
     

11 May, 2013

1 commit


10 May, 2013

2 commits

  • Signed-off-by: Al Viro

    Al Viro
     
  • Pull removal of GENERIC_GPIO from Grant Likely:
    "GENERIC_GPIO now synonymous with GPIOLIB. There are no longer any
    valid cases for enableing GENERIC_GPIO without GPIOLIB, even though it
    is possible to do so which has been causing confusion and breakage.
    This branch does the work to completely eliminate GENERIC_GPIO."

    * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux:
    gpio: update gpio Chinese documentation
    Remove GENERIC_GPIO config option
    Convert selectors of GENERIC_GPIO to GPIOLIB
    blackfin: force use of gpiolib
    m68k: coldfire: use gpiolib
    mips: pnx833x: remove requirement for GENERIC_GPIO
    openrisc: default GENERIC_GPIO to false
    avr32: default GENERIC_GPIO to false
    xtensa: remove explicit selection of GENERIC_GPIO
    sh: replace CONFIG_GENERIC_GPIO by CONFIG_GPIOLIB
    powerpc: remove redundant GENERIC_GPIO selection
    unicore32: default GENERIC_GPIO to false
    unicore32: remove unneeded select GENERIC_GPIO
    arm: plat-orion: use GPIO driver on CONFIG_GPIOLIB
    arm: remove redundant GENERIC_GPIO selection
    mips: alchemy: require gpiolib
    mips: txx9: change GENERIC_GPIO to GPIOLIB
    mips: loongson: use GPIO driver on CONFIG_GPIOLIB
    mips: remove redundant GENERIC_GPIO select

    Linus Torvalds
     

07 May, 2013

1 commit

  • If hard_irq_disable() is called while interrupts are already soft-disabled
    (which is the most common case) all is already well.

    However you can (and in some cases want) to call it while everything is
    enabled (to make sure you don't get a lazy even, for example before entry
    into KVM guests) and in this case we need to inform the irq tracer that
    the irqs are going off.

    We have to change the inline into a macro to avoid an include circular
    dependency hell hole.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     

06 May, 2013

18 commits

  • We are registering the attribute with permission 0600 but it
    doesn't have a store callback, which causes WARN_ON's during
    boot. Fix the permission.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • The PCI core supports an offset per aperture nowadays but our arch
    code still has a single offset per host bridge representing the
    difference betwen CPU memory addresses and PCI MMIO addresses.

    This is a problem as new machines and hypervisor versions are
    coming out where the 64-bit windows will have a different offset
    (basically mapped 1:1) from the 32-bit windows.

    This fixes it by using separate offsets. In the long run, we probably
    want to get rid of that intermediary struct pci_controller and have
    those directly stored into the pci_host_bridge as they are parsed
    but this will be a more invasive change.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • Some devices don't have a correct node ID and thus can't be
    attached to an iommu.

    The message displayed by the iommu code isn't very useful if
    you don't have a device-tree node as it tries to print the
    device-tree path but not the struct device name.

    Improve this by printing the device name as well.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • We are registering the attribute with permission 0644 but it
    doesn't have a store callback, which causes WARN_ON's during
    boot. Fix the permission.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • Some interrupt controllers refuse to map interrupts marked as
    "protected" by firwmare. Since we try to map everyting in the
    device-tree on some platforms, we end up with a lot of nasty
    WARN's in the boot log for what is a normal situation on those
    machines.

    This defines a specific return code (-EPERM) from the host map()
    callback which cause irqdomain to fail silently.

    MPIC is updated to return this when hitting a protected source
    printing only a single line message for diagnostic purposes.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • The property should be "ibm,power8-pciex", not "ibm,p8-pciex". The latter
    was changed in FW because it was inconsistent with the rest of the nodes.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • When converting to use the new pci_add_resource_offset() we didn't
    properly account for empty resources (0 flags) and add those bogons
    to the PHBs. The result is some annoying messages in the log.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • If OPAL returns an error, propagate it upward rather than spinning
    seconds waiting for a CPU that will never show up

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • Signed-off-by: Nishanth Aravamudan
    Signed-off-by: Benjamin Herrenschmidt

    Nishanth Aravamudan
     
  • Signed-off-by: Nishanth Aravamudan
    Signed-off-by: Benjamin Herrenschmidt

    Nishanth Aravamudan
     
  • Signed-off-by: Nishanth Aravamudan
    Signed-off-by: Benjamin Herrenschmidt

    Nishanth Aravamudan
     
  • Also, make HTM's presence dependent on the .config option.

    Signed-off-by: Nishanth Aravamudan
    Signed-off-by: Benjamin Herrenschmidt

    Nishanth Aravamudan
     
  • On pseries machines the detection for max_bus_speed should be done
    through an OpenFirmware property. This patch adds a function to perform
    this detection and a hook to perform dynamic adding of the function only
    for pseries. This is done by overwriting the weak
    pcibios_root_bridge_prepare function which is called by
    pci_create_root_bus().

    From: Lucas Kannebley Tavares
    Signed-off-by: Kleber Sacilotto de Souza
    Signed-off-by: Benjamin Herrenschmidt

    Kleber Sacilotto de Souza
     
  • The following patch implements a new PAPR change which allows
    the OS to force the use of 32 bit MSIs, regardless of what
    the PCI capabilities indicate. This is required for some
    devices that advertise support for 64 bit MSIs but don't
    actually support them.

    Signed-off-by: Brian King
    Signed-off-by: Benjamin Herrenschmidt

    Brian King
     
  • Make sure that current->thread.reg exists before we deference it in
    flush_hash_page.

    Signed-off-by: Michael Neuling
    Reported-by: John J Miller
    Cc:
    Signed-off-by: Benjamin Herrenschmidt

    Michael Neuling
     
  • Currently, the OPAL exception vectors are registered before the feature
    fixups are processed. This means that the now-firmware-owned vectors
    will likely be overwritten by the kernel.

    This change moves the exception registration code to an early initcall,
    rather than at machine_init time.

    Signed-off-by: Jeremy Kerr
    Signed-off-by: Benjamin Herrenschmidt

    Jeremy Kerr
     
  • POWER8 allows read and write of the DSCR in userspace. We added
    kernel emulation so applications could always use the instructions
    regardless of the CPU type.

    Unfortunately there are two SPRs for the DSCR and we only added
    emulation for the privileged one. Add code to match the non
    privileged one.

    A simple test was created to verify the fix:

    http://ozlabs.org/~anton/junkcode/user_dscr_test.c

    Without the patch we get a SIGILL and it passes with the patch.

    Signed-off-by: Anton Blanchard
    Cc:
    Signed-off-by: Benjamin Herrenschmidt

    Anton Blanchard
     
  • Pull kvm updates from Gleb Natapov:
    "Highlights of the updates are:

    general:
    - new emulated device API
    - legacy device assignment is now optional
    - irqfd interface is more generic and can be shared between arches

    x86:
    - VMCS shadow support and other nested VMX improvements
    - APIC virtualization and Posted Interrupt hardware support
    - Optimize mmio spte zapping

    ppc:
    - BookE: in-kernel MPIC emulation with irqfd support
    - Book3S: in-kernel XICS emulation (incomplete)
    - Book3S: HV: migration fixes
    - BookE: more debug support preparation
    - BookE: e6500 support

    ARM:
    - reworking of Hyp idmaps

    s390:
    - ioeventfd for virtio-ccw

    And many other bug fixes, cleanups and improvements"

    * tag 'kvm-3.10-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (204 commits)
    kvm: Add compat_ioctl for device control API
    KVM: x86: Account for failing enable_irq_window for NMI window request
    KVM: PPC: Book3S: Add API for in-kernel XICS emulation
    kvm/ppc/mpic: fix missing unlock in set_base_addr()
    kvm/ppc: Hold srcu lock when calling kvm_io_bus_read/write
    kvm/ppc/mpic: remove users
    kvm/ppc/mpic: fix mmio region lists when multiple guests used
    kvm/ppc/mpic: remove default routes from documentation
    kvm: KVM_CAP_IOMMU only available with device assignment
    ARM: KVM: iterate over all CPUs for CPU compatibility check
    KVM: ARM: Fix spelling in error message
    ARM: KVM: define KVM_ARM_MAX_VCPUS unconditionally
    KVM: ARM: Fix API documentation for ONE_REG encoding
    ARM: KVM: promote vfp_host pointer to generic host cpu context
    ARM: KVM: add architecture specific hook for capabilities
    ARM: KVM: perform HYP initilization for hotplugged CPUs
    ARM: KVM: switch to a dual-step HYP init code
    ARM: KVM: rework HYP page table freeing
    ARM: KVM: enforce maximum size for identity mapped code
    ARM: KVM: move to a KVM provided HYP idmap
    ...

    Linus Torvalds
     

05 May, 2013

1 commit

  • Pull MMC update from Chris Ball:
    "MMC highlights for 3.10:

    Core:
    - Introduce MMC_CAP2_NO_PRESCAN_POWERUP to allow skipping
    mmc_power_up() at boot/initialization time if it's already
    happened, for performance (faster boot time) reasons.
    - Fix a bit width test failure that resulted in old eMMC cards being
    put into 1-bit mode when 4-bit mode was available.
    - Expose fwrev/hwrev for MMCv4 parts.
    - Improve card removal logic in the case where the card's removed
    slowly; we were missing card removal events if the card retained
    contact with the slot pads for long enough to reply to a CMD13
    while being removed.

    Drivers:
    - davinci_mmc: Support using PIO instead of DMA.
    - dw_mmc: Add support for Exynos4412.
    - mxcmmc: DT support, use slot-gpio API.
    - mxs-mmc: Add broken-cd/cd-inverted/non-removable DT property
    support.
    - sdhci-sirf: New sdhci-pltfm driver for CSR SiRF SoCs:
    SiRFprimaII: unicore ARM Cortex-A9
    SiRFatlas6: unicore ARM Cortex-A9
    SiRFmarco: dual core ARM Cortex-A9 SMP
    - sdhci-tegra: Add support for Tegra114 platforms, use
    mmc_of_parse()"

    * tag 'mmc-updates-for-3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (66 commits)
    mmc: sdhci-tegra: fix MODULE_DEVICE_TABLE
    mmc: core: fix init controller performance regression, updated patch
    mmc: mxcmmc: enable DMA support on mpc512x
    mmc: mxcmmc: constify mxcmci_devtype
    mmc: mxcmmc: use slot-gpio API for write-protect detection
    mmc: mxcmmc: add mpc512x SDHC support
    mmc: mxcmmc: fix race conditions for host->req and host->data access
    mmc: mxcmmc: DT support
    mmc: dw_mmc: let device core setup the default pin configuration
    mmc: mxs-mmc: add broken-cd property
    mmc: mxs-mmc: add non-removable property
    mmc: mxs-mmc: add cd-inverted property
    mmc: core: call pm_runtime_put_noidle in pm_runtime_get_sync failed case
    mmc: mxcmmc: Fix bug when card is present during boot
    mmc: core: fix performance regression initializing MMC host controllers
    Revert "mmc: core: wait while adding MMC host to ensure root mounts successfully"
    mmc: atmel-mci: pio hang on block errors
    mmc: core: Fix bit width test failing on old eMMC cards
    mmc: dw_mmc: Use pr_info instead of printk
    mmc: dw_mmc: Check return value of regulator_enable
    ...

    Linus Torvalds
     

03 May, 2013

1 commit

  • Pull powerpc update from Benjamin Herrenschmidt:
    "The main highlights this time around are:

    - A pile of addition POWER8 bits and nits, such as updated
    performance counter support (Michael Ellerman), new branch history
    buffer support (Anshuman Khandual), base support for the new PCI
    host bridge when not using the hypervisor (Gavin Shan) and other
    random related bits and fixes from various contributors.

    - Some rework of our page table format by Aneesh Kumar which fixes a
    thing or two and paves the way for THP support. THP itself will
    not make it this time around however.

    - More Freescale updates, including Altivec support on the new e6500
    cores, new PCI controller support, and a pile of new boards support
    and updates.

    - The usual batch of trivial cleanups & fixes"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (156 commits)
    powerpc: Fix build error for book3e
    powerpc: Context switch the new EBB SPRs
    powerpc: Turn on the EBB H/FSCR bits
    powerpc: Replace CPU_FTR_BCTAR with CPU_FTR_ARCH_207S
    powerpc: Setup BHRB instructions facility in HFSCR for POWER8
    powerpc: Fix interrupt range check on debug exception
    powerpc: Update tlbie/tlbiel as per ISA doc
    powerpc: Print page size info during boot
    powerpc: print both base and actual page size on hash failure
    powerpc: Fix hpte_decode to use the correct decoding for page sizes
    powerpc: Decode the pte-lp-encoding bits correctly.
    powerpc: Use encode avpn where we need only avpn values
    powerpc: Reduce PTE table memory wastage
    powerpc: Move the pte free routines from common header
    powerpc: Reduce the PTE_INDEX_SIZE
    powerpc: Switch 16GB and 16MB explicit hugepages to a different page table format
    powerpc: New hugepage directory format
    powerpc: Don't truncate pgd_index wrongly
    powerpc: Don't hard code the size of pte page
    powerpc: Save DAR and DSISR in pt_regs on MCE
    ...

    Linus Torvalds
     

02 May, 2013

15 commits

  • This adds the API for userspace to instantiate an XICS device in a VM
    and connect VCPUs to it. The API consists of a new device type for
    the KVM_CREATE_DEVICE ioctl, a new capability KVM_CAP_IRQ_XICS, which
    functions similarly to KVM_CAP_IRQ_MPIC, and the KVM_IRQ_LINE ioctl,
    which is used to assert and deassert interrupt inputs of the XICS.

    The XICS device has one attribute group, KVM_DEV_XICS_GRP_SOURCES.
    Each attribute within this group corresponds to the state of one
    interrupt source. The attribute number is the same as the interrupt
    source number.

    This does not support irq routing or irqfd yet.

    Signed-off-by: Paul Mackerras
    Acked-by: David Gibson
    Signed-off-by: Alexander Graf

    Paul Mackerras
     
  • Add the missing unlock before return from function set_base_addr()
    when disables the mapping.

    Introduced by commit 5df554ad5b7522ea62b0ff9d5be35183494efc21
    (kvm/ppc/mpic: in-kernel MPIC emulation)

    Signed-off-by: Wei Yongjun
    Signed-off-by: Alexander Graf

    Wei Yongjun
     
  • These functions do an srcu_dereference without acquiring the srcu lock
    themselves.

    Signed-off-by: Scott Wood
    Signed-off-by: Alexander Graf

    Scott Wood
     
  • This is an unused (no pun intended) leftover from when this code did
    reference counting.

    Signed-off-by: Scott Wood
    Signed-off-by: Alexander Graf

    Scott Wood
     
  • Keeping a linked list of statically defined objects doesn't work
    very well when we have multiple guests. :-P

    Switch to an array of constant objects. This fixes a hang when
    multiple guests are used.

    Signed-off-by: Scott Wood
    [agraf: remove struct list_head from mem_reg]
    Signed-off-by: Alexander Graf

    Scott Wood
     
  • Pull VFS updates from Al Viro,

    Misc cleanups all over the place, mainly wrt /proc interfaces (switch
    create_proc_entry to proc_create(), get rid of the deprecated
    create_proc_read_entry() in favor of using proc_create_data() and
    seq_file etc).

    7kloc removed.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
    don't bother with deferred freeing of fdtables
    proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
    proc: Make the PROC_I() and PDE() macros internal to procfs
    proc: Supply a function to remove a proc entry by PDE
    take cgroup_open() and cpuset_open() to fs/proc/base.c
    ppc: Clean up scanlog
    ppc: Clean up rtas_flash driver somewhat
    hostap: proc: Use remove_proc_subtree()
    drm: proc: Use remove_proc_subtree()
    drm: proc: Use minor->index to label things, not PDE->name
    drm: Constify drm_proc_list[]
    zoran: Don't print proc_dir_entry data in debug
    reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
    proc: Supply an accessor for getting the data from a PDE's parent
    airo: Use remove_proc_subtree()
    rtl8192u: Don't need to save device proc dir PDE
    rtl8187se: Use a dir under /proc/net/r8180/
    proc: Add proc_mkdir_data()
    proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
    proc: Move PDE_NET() to fs/proc/proc_net.c
    ...

    Linus Torvalds
     
  • We moved the definition of shift_to_mmu_psize and mmu_psize_to_shift
    out of hugetlbpage.c in patch "powerpc: New hugepage directory format".

    These functions are not related to hugetlbpage and we want to use them
    outside hugetlbpage.c We missed a definition for book3e when we moved
    these functions. Add similar functions to mmu-book3e.h

    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Benjamin Herrenschmidt

    Aneesh Kumar K.V
     
  • This context switches the new Event Based Branching (EBB) SPRs. The three new
    SPRs are:
    - Event Based Branch Handler Register (EBBHR)
    - Event Based Branch Return Register (EBBRR)
    - Branch Event Status and Control Register (BESCR)

    Signed-off-by: Michael Ellerman
    Signed-off-by: Matt Evans
    Signed-off-by: Michael Neuling
    Signed-off-by: Benjamin Herrenschmidt

    Michael Ellerman
     
  • This turns Event Based Branching (EBB) on in the Hypervisor Facility Status and
    Control Register (HFSCR) and Facility Status and Control Register (FSCR).

    Signed-off-by: Michael Neuling
    Signed-off-by: Benjamin Herrenschmidt

    Michael Neuling
     
  • We are getting low on cpu feature bits. So rather than add a separate bit for
    every new Power8 feature, add a bit for arch 2.07 server catagory and use that
    instead.

    Hijack the value we had for BCTAR, but swap the value with CFAR so that all the
    ARCH defines are together.

    Note we don't touch CPU_FTR_TM, because it is conditionally enabled if
    the kernel is built with TM support.

    Signed-off-by: Michael Ellerman
    Signed-off-by: Michael Neuling
    Signed-off-by: Benjamin Herrenschmidt

    Michael Ellerman
     
  • Make BHRB instructions available in problem and privileged states.

    Signed-off-by: Anshuman Khandual
    Signed-off-by: Benjamin Herrenschmidt

    Anshuman Khandual
     
  • We do not want to take single step and branch-taken debug exception
    in kernel exception code. But the address range check was not covering
    all kernel exception handlers address range.

    With this patch we defined the interrupt_end label which defines the
    end on kernel exception code. So now we check interrupt_base to
    interrupt_end range for not handling debug exception in kernel
    exception entry.

    Signed-off-by: Bharat Bhushan
    Signed-off-by: Benjamin Herrenschmidt

    Bharat Bhushan
     
  • Clean up the pseries scanlog driver's use of procfs:

    (1) Don't need to save the proc_dir_entry pointer as we have the filename to
    remove with.

    (2) Save the scan log buffer pointer in a static variable (there is only one
    of it) and don't save it in the PDE (which doesn't have a destructor).

    Signed-off-by: David Howells
    cc: Benjamin Herrenschmidt
    cc: Paul Mackerras
    cc: linuxppc-dev@lists.ozlabs.org
    Signed-off-by: Al Viro

    David Howells
     
  • Clean up some of the problems with the rtas_flash driver:

    (1) It shouldn't fiddle with the internals of the procfs filesystem (altering
    pde->count).

    (2) If pid namespaces are in effect, then you can get multiple inodes
    connected to a single pde, thereby rendering the pde->count > 2 test
    useless.

    (3) The pde->count fudging doesn't work for forked, dup'd or cloned file
    descriptors, so add static mutexes and use them to wrap access to the
    driver through read, write and release methods.

    (4) The driver can only handle one device, so allocate most of the data
    previously attached to the pde->data as static variables instead (though
    allocate the validation data buffer with kmalloc).

    (5) We don't need to save the pde pointers as long as we have the filenames
    available for removal.

    (6) Don't try to multiplex what the update file read method does based on the
    filename. Instead provide separate file ops and split the function.

    Whilst we're at it, tabulate the procfile information and loop through it when
    creating or destroying them rather than manually coding each one.

    [Folded fixes from Vasant Hegde ]

    Signed-off-by: David Howells
    cc: Benjamin Herrenschmidt
    cc: Paul Mackerras
    cc: Anton Blanchard
    cc: linuxppc-dev@lists.ozlabs.org
    Signed-off-by: Al Viro

    David Howells
     
  • Supply accessor functions to set attributes in proc_dir_entry structs.

    The following are supplied: proc_set_size() and proc_set_user().

    Signed-off-by: David Howells
    Acked-by: Mauro Carvalho Chehab
    cc: linuxppc-dev@lists.ozlabs.org
    cc: linux-media@vger.kernel.org
    cc: netdev@vger.kernel.org
    cc: linux-wireless@vger.kernel.org
    cc: linux-pci@vger.kernel.org
    cc: netfilter-devel@vger.kernel.org
    cc: alsa-devel@alsa-project.org
    Signed-off-by: Al Viro

    David Howells