19 Apr, 2016

3 commits

  • This patch converts the initrd table override mechanism to the table
    upgrade mechanism by restricting its usage to the tables released with
    compatibility and more recent revision.

    This use case has been encouraged by the ACPI specification:

    1. OEMID:
    An OEM-supplied string that identifies the OEM.

    2. OEM Table ID:
    An OEM-supplied string that the OEM uses to identify the particular data
    table. This field is particularly useful when defining a definition
    block to distinguish definition block functions. OEM assigns each
    dissimilar table a new OEM Table Id.

    3. OEM Revision:
    An OEM-supplied revision number. Larger numbers are assumed to be newer
    revisions.

    For OEMs, good practices will ensure consistency when assigning OEMID and
    OEM Table ID fields in any table. The intent of these fields is to allow
    for a binary control system that support services can use. Because many
    support function can be automated, it is useful when a tool can
    programatically determine which table release is a compatible and more
    recent revision of a prior table on the same OEMID and OEM Table ID.

    The facility can now be used by the vendors to upgrade wrong tables for bug
    fixing purpose, thus lockdep disabling taint is not suitable for it and it
    should be a default 'y' option to implement the spec encouraged use case.

    Note that, by implementing table upgrade inside of ACPICA itself, it is
    possible to remove acpi_table_initrd_override() and tables can be upgraded
    by acpi_install_table() automatically. Though current ACPICA impelentation
    hasn't implemented this, this patched changes the table flag setting timing
    to allow this to be implemented in ACPICA without changing the code here.

    Documentation of initrd override mechanism is upgraded accordingly.

    Original-by: Octavian Purdila
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     
  • In arch/x86/kernel/setup.c, the #ifdef kept for CONFIG_ACPI actually is
    related to the accessibility of initrd_start/initrd_end, so the stub should
    be provided from this source file and should only be dependent on
    CONFIG_BLK_DEV_INITRD.

    Note that when ACPI=n and BLK_DEV_INITRD=y, early_initrd_acpi_init() is
    still a stub because of the stub prepared for early_acpi_table_init().

    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     
  • This patch moves acpi_os_table_override() and
    acpi_os_physical_table_override() to tables.c.

    Along with the mechanisms, acpi_initrd_initialize_tables() is also moved to
    tables.c to form a static function. The following functions are renamed
    according to this change:
    1. acpi_initrd_override() -> renamed to early_acpi_table_init(), which
    invokes acpi_table_initrd_init()
    2. acpi_os_physical_table_override() -> which invokes
    acpi_table_initrd_override()
    3. acpi_initialize_initrd_tables() -> renamed to acpi_table_initrd_scan()

    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     

18 Apr, 2016

2 commits


17 Apr, 2016

11 commits


16 Apr, 2016

7 commits

  • Pull block fixes from Jens Axboe:
    "A few fixes for the current series. This contains:

    - Two fixes for NVMe:

    One fixes a reset race that can be triggered by repeated
    insert/removal of the module.

    The other fixes an issue on some platforms, where we get probe
    timeouts since legacy interrupts isn't working. This used not to
    be a problem since we had the worker thread poll for completions,
    but since that was killed off, it means those poor souls can't
    successfully probe their NVMe device. Use a proper IRQ check and
    probe (msi-x -> msi ->legacy), like most other drivers to work
    around this. Both from Keith.

    - A loop corruption issue with offset in iters, from Ming Lei.

    - A fix for not having the partition stat per cpu ref count
    initialized before sending out the KOBJ_ADD, which could cause user
    space to access the counter prior to initialization. Also from
    Ming Lei.

    - A fix for using the wrong congestion state, from Kaixu Xia"

    * 'for-linus' of git://git.kernel.dk/linux-block:
    block: loop: fix filesystem corruption in case of aio/dio
    NVMe: Always use MSI/MSI-x interrupts
    NVMe: Fix reset/remove race
    writeback: fix the wrong congested state variable definition
    block: partition: initialize percpuref before sending out KOBJ_ADD

    Linus Torvalds
     
  • Pull libnvdimm fixes from Ross Zwisler:
    "Two fixes:

    - Fix memcpy_from_pmem() to fallback to memcpy() for architectures
    where CONFIG_ARCH_HAS_PMEM_API=n.

    - Add a comment explaining why we write data twice when clearing
    poison in pmem_do_bvec().

    This has passed a boot test on an X86_32 config, which was the
    architecture where issue #1 above was first noticed"

    Dan Williams adds:
    "We're giving this multi-maintainer setup a shot, so expect libnvdimm
    pull requests from either Ross or I going forward"

    * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
    libnvdimm, pmem: clarify the write+clear_poison+write flow
    pmem: fix BUG() error in pmem.h:48 on X86_32

    Linus Torvalds
     
  • Pull MTD fix from Brian Norris:
    "One MTD fix for v4.6-rc4:

    In the v4.4 cycle, we relaxed the requirement for assigning
    mtd->owner, but we didn't remove this error case. It's hit only
    by drivers that are both:

    (a) using nand_scan() directly
    and
    (b) built as modules

    We haven't seen explicit complaints about this (most use cases don't
    fit one or both of the above), but we should definitely not be
    BUG()'ing here"

    * tag 'for-linus-20160415' of git://git.infradead.org/linux-mtd:
    mtd: nand: Drop mtd.owner requirement in nand_scan

    Linus Torvalds
     
  • Pull MMC fixes from Ulf Hansson:
    "Here are a couple of mmc fixes intended for v4.6 rc4.

    Regarding the fix for the regression about mmcblk device indexes. The
    approach taken to solve the problem seems to be good enough. There
    were some discussions around the solution, but it seems like people
    were happy about it in the end.

    MMC core:
    - Restore similar old behaviour when assigning mmcblk device indexes

    MMC host:
    - tegra: Disable UHS-I modes for Tegra124 to fix regression"

    * tag 'mmc-v4.6-rc3' of git://git.linaro.org/people/ulf.hansson/mmc:
    mmc: tegra: Disable UHS-I modes for Tegra124
    mmc: block: Use the mmc host device index as the mmcblk device index

    Linus Torvalds
     
  • Pull drm fixes from Dave Airlie:
    "This contains fixes for exynos, amdgpu, radeon, i915 and qxl.

    It also contains some fixes to the core drm edid parser.

    qxl:
    - fix for a cursor hotspot issue

    radeon:
    - some MST fixes that I've been running locally and make my monitor a
    bit happier

    exynos:
    - fix some regressions and build fixes

    amdgpu:
    - a couple of small fixes

    i915:
    - two DP MST fixes and a couple of other regression fixes

    Nothing too out of the ordinary or surprising at this point"

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    drm/exynos: Use VIDEO_SAMSUNG_S5P_G2D=n as G2D Kconfig dependency
    drm/exynos: fix a warning message
    drm/exynos: mic: fix an error code
    drm/exynos: fimd: fix broken dp_clock control
    drm/exynos: build fbdev code conditionally
    drm/exynos: fix adjusted_mode pointer in exynos_plane_mode_set
    drm/exynos: fix error handling in exynos_drm_subdrv_open
    drm/amd/amdgpu: fix irq domain remove for tonga ih
    drm/i915: fix deadlock on lid open
    drm/radeon: use helper for mst connector dpms.
    drm/radeon/mst: port some MST setup code from DAL.
    drm/amdgpu: add invisible pin size statistic
    drm/edid: Fix DMT 1024x768@43Hz (interlaced) timings
    drm/i915: Exit cherryview_irq_handler() after one pass
    drm/i915: Call intel_dp_mst_resume() before resuming displays
    drm/i915: Fix race condition in intel_dp_destroy_mst_connector()
    drm/edid: Fix parsing of EDID 1.4 Established Timings III descriptor
    drm/edid: Fix EDID Established Timings I and II
    drm/qxl: fix cursor position with non-zero hotspot

    Linus Torvalds
     
  • Pull parisc ftrace fixes from Helge Deller:
    "This is (most likely) the last pull request for v4.6 for the parisc
    architecture.

    It fixes the FTRACE feature for parisc, which is horribly broken since
    quite some time and doesn't even compile. This patch just fixes the
    bare minimum (it actually removes more lines than it adds), so that
    the function tracer works again on 32- and 64bit kernels.

    I've queued up additional patches on top of this patch which e.g. add
    the syscall tracer, but those have to wait for the merge window for
    v4.7."

    * 'parisc-4.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Fix ftrace function tracer

    Linus Torvalds
     
  • The ACPI specification does not specify the state of data after a clear
    poison operation. Potential future libnvdimm bus implementations for
    other architectures also might not specify or disagree on the state of
    data after clear poison. Clarify why we write twice.

    Reported-by: Jeff Moyer
    Reported-by: Vishal Verma
    Signed-off-by: Dan Williams
    Signed-off-by: Ross Zwisler
    Reviewed-by: Johannes Thumshirn
    Reviewed-by: Jeff Moyer
    Reviewed-by: Vishal Verma

    Dan Williams
     

15 Apr, 2016

16 commits

  • Starting from commit e36f620428(block: split bios to max possible length),
    block core starts to split bio in the middle of bvec.

    Unfortunately loop dio/aio doesn't consider this situation, and
    always treat 'iter.iov_offset' as zero. Then filesystem corruption
    is observed.

    This patch figures out the offset of the base bvevc via
    'bio->bi_iter.bi_bvec_done' and fixes the issue by passing the offset
    to iov iterator.

    Fixes: e36f6204288088f (block: split bios to max possible length)
    Cc: Keith Busch
    Cc: Al Viro
    Cc: stable@vger.kernel.org (4.5)
    Signed-off-by: Ming Lei
    Signed-off-by: Jens Axboe

    Ming Lei
     
  • Pull x86 fixes from Ingo Molnar:
    "Misc fixes: a binutils fix, an lguest fix, an mcelog fix and a missing
    documentation fix"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/mce: Avoid using object after free in genpool
    lguest, x86/entry/32: Fix handling of guest syscalls using interrupt gates
    x86/build: Build compressed x86 kernels as PIE
    x86/mm/pkeys: Add missing Documentation

    Linus Torvalds
     
  • Pull mm gup cleanup from Ingo Molnar:
    "This removes the ugly get-user-pages API hack, now that all upstream
    code has been migrated to it"

    ("ugly" is putting it mildly. But it worked.. - Linus)

    * 'mm-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    mm/gup: Remove the macro overload API migration helpers from the get_user*() APIs

    Linus Torvalds
     
  • Pull device mapper fixes from Mike Snitzer:

    - fix a 4.6-rc1 bio-based DM 'struct dm_target_io' leak in an error
    path

    - stable@ fix for DM cache metadata's READ_LOCK macros that were
    incorrectly returning error if the block manager was in read-only
    mode; also cleanup multi-statement macros to use do {} while(0)

    * tag 'dm-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
    dm cache metadata: fix READ_LOCK macros and cleanup WRITE_LOCK macros
    dm: fix dm_target_io leak if clone_bio() returns an error

    Linus Torvalds
     
  • …erry.reding/linux-pwm

    Pull pwm fix from Thierry Reding:
    "A single one-line fix to turn the regmap cache from an RB-tree to a
    flat cache to avoid lockdep and abort issues"

    * tag 'pwm/for-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
    pwm: fsl-ftm: Use flat regmap cache

    Linus Torvalds
     
  • Pull sound fixes from Takashi Iwai:
    "We've had a very calm development cycle, so far. Here are the few
    fixes for HD-audio and USB-audio, all of which are small and easy"

    * tag 'sound-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: hda - Fix inconsistent monitor_present state until repoll
    ALSA: hda - Fix regression of monitor_present flag in eld proc file
    ALSA: usb-audio: Skip volume controls triggers hangup on Dell USB Dock
    ALSA: hda/realtek - Enable the ALC292 dock fixup on the Thinkpad T460s
    ALSA: sscape: Use correct format identifier for size_t
    ALSA: usb-audio: Add a quirk for Plantronics BT300
    ALSA: usb-audio: Add a sample rate quirk for Phoenix Audio TMX320
    ALSA: hda - Bind with i915 only when Intel graphics is present

    Linus Torvalds
     
  • Pull mailbox fixes from Jussi Brar:
    "Misc fixes:

    mailbox-test driver:
    - prevent memory leak and another cosmetic change

    mailbox:
    - change the returned error code

    Xgene driver:
    - return -ENOMEM instead of PTR_ERR for failed devm_kzalloc"

    * 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
    mailbox: Stop using ENOSYS for anything other than unimplemented syscalls
    mailbox: mailbox-test: Prevent memory leak
    mailbox: mailbox-test: Use more consistent format for calling copy_from_user()
    mailbox: xgene-slimpro: Fix wrong test for devm_kzalloc

    Linus Torvalds
     
  • Pull f2fs/fscrypto fixes from Jaegeuk Kim:
    "In addition to f2fs/fscrypto fixes, I've added one patch which
    prevents RCU mode lookup in d_revalidate, as Al mentioned.

    These patches fix f2fs and fscrypto based on -rc3 bug fixes in ext4
    crypto, which have not yet been fully propagated as follows.

    - use of dget_parent and file_dentry to avoid crashes
    - disallow RCU-mode lookup in d_invalidate
    - disallow -ENOMEM in the core data encryption path"

    * tag 'for-linus-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs:
    ext4/fscrypto: avoid RCU lookup in d_revalidate
    fscrypto: don't let data integrity writebacks fail with ENOMEM
    f2fs: use dget_parent and file_dentry in f2fs_file_open
    fscrypto: use dget_parent() in fscrypt_d_revalidate()

    Linus Torvalds
     
  • Pull crypto fixes from Herbert Xu:
    "This fixes an NFS regression caused by the skcipher/hash conversion in
    sunrpc. It also fixes a build problem in certain configurations with
    bcm63xx"

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    hwrng: bcm63xx - fix device tree compilation
    sunrpc: Fix skcipher/shash conversion

    Linus Torvalds
     
  • Pull keys bugfixes from James Morris:
    "Two bugfixes for Keys related code"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
    ASN.1: fix open failure check on headername
    assoc_array: don't call compare_object() on a node

    Linus Torvalds
     
  • The READ_LOCK macro was incorrectly returning -EINVAL if
    dm_bm_is_read_only() was true -- it will always be true once the cache
    metadata transitions to read-only by dm_cache_metadata_set_read_only().

    Wrap READ_LOCK and WRITE_LOCK multi-statement macros in do {} while(0).
    Also, all accesses of the 'cmd' argument passed to these related macros
    are now encapsulated in parenthesis.

    A follow-up patch can be developed to eliminate the use of macros in
    favor of pure C code. Avoiding that now given that this needs to apply
    to stable@.

    Reported-by: Ben Hutchings
    Signed-off-by: Mike Snitzer
    Fixes: d14fcf3dd79 ("dm cache: make sure every metadata function checks fail_io")
    Cc: stable@vger.kernel.org

    Mike Snitzer
     
  • Multiple users have reported device initialization failure due the driver
    not receiving legacy PCI interrupts. This is not unique to any particular
    controller, but has been observed on multiple platforms.

    There have been no issues reported or observed when with message signaled
    interrupts, so this patch attempts to use MSI-x during initialization,
    falling back to MSI. If that fails, legacy would become the default.

    The setup_io_queues error handling had to change as a result: the admin
    queue's msix_entry used to be initialized to the legacy IRQ. The case
    where nr_io_queues is 0 would fail request_irq when setting up the admin
    queue's interrupt since re-enabling MSI-x fails with 0 vectors, leaving
    the admin queue's msix_entry invalid. Instead, return success immediately.

    Reported-by: Tim Muhlemmer
    Reported-by: Jon Derrick
    Signed-off-by: Keith Busch
    Signed-off-by: Jens Axboe

    Keith Busch
     
  • In commit c4004b02f8e5b ("x86: remove the kernel code/data/bss resources
    from /proc/iomem") I was hoping to remove the phyiscal kernel address
    data from /proc/iomem entirely, but that had to be reverted because some
    system programs actually use it.

    This limits all the detailed resource information to properly
    credentialed users instead.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • The PCI config access checked the file capabilities correctly, but used
    the itnernal security capability check rather than the helper function
    that is actually meant for that.

    The security_capable() has unusual return values and is not meant to be
    used elsewhere (the only other use is in the capability checking
    functions that we actually intend people to use, and this odd PCI usage
    really stood out when looking around the capability code.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • A lot of seqfile users seem to be using things like %pK that uses the
    credentials of the current process, but that is actually completely
    wrong for filesystem interfaces.

    The unix semantics for permission checking files is to check permissions
    at _open_ time, not at read or write time, and that is not just a small
    detail: passing off stdin/stdout/stderr to a suid application and making
    the actual IO happen in privileged context is a classic exploit
    technique.

    So if we want to be able to look at permissions at read time, we need to
    use the file open credentials, not the current ones. Normal file
    accesses can just use "f_cred" (or any of the helper functions that do
    that, like file_ns_capable()), but the seqfile interfaces do not have
    any such options.

    It turns out that seq_file _does_ save away the user_ns information of
    the file, though. Since user_ns is just part of the full credential
    information, replace that special case with saving off the cred pointer
    instead, and suddenly seq_file has all the permission information it
    needs.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • This reverts commit c4004b02f8e5b9ce357a0bb1641756cc86962664.

    Sadly, my hope that nobody would actually use the special kernel entries
    in /proc/iomem were dashed by kexec. Which reads /proc/iomem explicitly
    to find the kernel base address. Nasty.

    Anyway, that means we can't do the sane and simple thing and just remove
    the entries, and we'll instead have to mask them out based on permissions.

    Reported-by: Zhengyu Zhang
    Reported-by: Dave Young
    Reported-by: Freeman Zhang
    Reported-by: Emrah Demir
    Reported-by: Baoquan He
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

14 Apr, 2016

1 commit

  • Fix the FTRACE function tracer for 32- and 64-bit kernel.
    The former code was horribly broken.

    Reimplement most coding in assembly and utilize optimizations, e.g. put
    mcount() and ftrace_stub() into one L1 cacheline.

    Signed-off-by: Helge Deller

    Helge Deller