1. 15 10月, 2014 1 次提交
    • D
      sparc64: Fix FPU register corruption with AES crypto offload. · f4da3628
      David S. Miller 提交于
      The AES loops in arch/sparc/crypto/aes_glue.c use a scheme where the
      key material is preloaded into the FPU registers, and then we loop
      over and over doing the crypt operation, reusing those pre-cooked key
      registers.
      
      There are intervening blkcipher*() calls between the crypt operation
      calls.  And those might perform memcpy() and thus also try to use the
      FPU.
      
      The sparc64 kernel FPU usage mechanism is designed to allow such
      recursive uses, but with a catch.
      
      There has to be a trap between the two FPU using threads of control.
      
      The mechanism works by, when the FPU is already in use by the kernel,
      allocating a slot for FPU saving at trap time.  Then if, within the
      trap handler, we try to use the FPU registers, the pre-trap FPU
      register state is saved into the slot.  Then at trap return time we
      notice this and restore the pre-trap FPU state.
      
      Over the long term there are various more involved ways we can make
      this work, but for a quick fix let's take advantage of the fact that
      the situation where this happens is very limited.
      
      All sparc64 chips that support the crypto instructiosn also are using
      the Niagara4 memcpy routine, and that routine only uses the FPU for
      large copies where we can't get the source aligned properly to a
      multiple of 8 bytes.
      
      We look to see if the FPU is already in use in this context, and if so
      we use the non-large copy path which only uses integer registers.
      
      Furthermore, we also limit this special logic to when we are doing
      kernel copy, rather than a user copy.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f4da3628
  2. 14 10月, 2014 39 次提交
    • L
      Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux · 2d65a9f4
      Linus Torvalds 提交于
      Pull drm updates from Dave Airlie:
       "This is the main git pull for the drm,
      
        I pretty much froze major pulls at -rc5/6 time, and haven't had much
        fallout, so will probably continue doing that.
      
        Lots of changes all over, big internal header cleanup to make it clear
        drm features are legacy things and what are things that modern KMS
        drivers should be using.  Also big move to use the new generic fences
        in all the TTM drivers.
      
        core:
              atomic prep work,
              vblank rework changes, allows immediate vblank disables
              major header reworking and cleanups to better delinate legacy
              interfaces from what KMS drivers should be using.
              cursor planes locking fixes
      
        ttm:
              move to generic fences (affects all TTM drivers)
              ppc64 caching fixes
      
        radeon:
              userptr support,
              uvd for old asics,
              reset rework for fence changes
              better buffer placement changes,
              dpm feature enablement
              hdmi audio support fixes
      
        intel:
              Cherryview work,
              180 degree rotation,
              skylake prep work,
              execlist command submission
              full ppgtt prep work
              cursor improvements
              edid caching,
              vdd handling improvements
      
        nouveau:
              fence reworking
              kepler memory clock work
              gt21x clock work
              fan control improvements
              hdmi infoframe fixes
              DP audio
      
        ast:
              ppc64 fixes
              caching fix
      
        rcar:
              rcar-du DT support
      
        ipuv3:
              prep work for capture support
      
        msm:
              LVDS support for mdp4, new panel, gpu refactoring
      
        exynos:
              exynos3250 SoC support, drop bad mmap interface,
              mipi dsi changes, and component match support"
      
      * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (640 commits)
        drm/mst: rework payload table allocation to conform better.
        drm/ast: Fix HW cursor image
        drm/radeon/kv: add uvd/vce info to dpm debugfs output
        drm/radeon/ci: add uvd/vce info to dpm debugfs output
        drm/radeon: export reservation_object from dmabuf to ttm
        drm/radeon: cope with foreign fences inside the reservation object
        drm/radeon: cope with foreign fences inside display
        drm/core: use helper to check driver features
        drm/radeon/cik: write gfx ucode version to ucode addr reg
        drm/radeon/si: print full CS when we hit a packet 0
        drm/radeon: remove unecessary includes
        drm/radeon/combios: declare legacy_connector_convert as static
        drm/radeon/atombios: declare connector convert tables as static
        drm/radeon: drop btc_get_max_clock_from_voltage_dependency_table
        drm/radeon/dpm: drop clk/voltage dependency filters for BTC
        drm/radeon/dpm: drop clk/voltage dependency filters for CI
        drm/radeon/dpm: drop clk/voltage dependency filters for SI
        drm/radeon/dpm: drop clk/voltage dependency filters for NI
        drm/radeon: disable audio when we disable hdmi (v2)
        drm/radeon: split audio enable between eg and r600 (v2)
        ...
      2d65a9f4
    • L
      Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild · da92da36
      Linus Torvalds 提交于
      Pull misc kbuild updates from Michal Marek:
       "This is the less critical kbuild stuff for v3.18-rc1:
      
         - make deb-pkg debuginfo fix, ppc64el support and warning fix for
           recent dpkg tools
         - make TAGS fixes
         - new coccinelle patch
         - kbuild documentation improvements"
      
      * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
        deb-pkg: remove obsolete -isp option to dpkg-gencontrol
        coccinelle: misc: semantic patch to delete overly complex return code processing
        deb-pkg: Add support for powerpc little endian
        builddeb: put the dbg files into the correct directory
        scripts/tags.sh: fix DEFINE_HASHTABLE in emacs case
        scripts/tags.sh: remove *PCGFLAGS regular expressions
        scripts/tags.sh: Don't specify kind-spec for emacs' ctags/etags
        Documentation: kbuild: Improve grammar
        Documentation: kbuild: Remove obsolete dtc_cpp section
        Documentation: kbuild: Improve if_changed documentation
        Documentation: kbuild: Remove obsolete include/asm symlink step
      da92da36
    • L
      Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild · f33a3faa
      Linus Torvalds 提交于
      Pull kbuild changes from Michal Marek:
       - fix for handling dependencies of *-objs targets by Masahiro Yamada
       - lots of cleanups in the kbuild machinery, also by Masahiro
       - fixes for the kconfig build to use an UTF-8 capable ncurses library
         if possible and to build on not-so-standard installs
       - some more minor fixes
      
      * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
        kbuild: Do not reference *-n variables in the Makefile
        kbuild: simplify build, clean, modbuiltin shorthands
        kbuild: arm: Do not define "comma" twice
        kbuild: remove obj-n and lib-n handling
        kbuild: remove unnecessary variable initializaions
        kbuild: remove unnecessary "obj- := dummy.o" trick
        kbuild: handle C=... and M=... after entering into build directory
        kbuild: use $(Q) for sub-make target
        kbuild: fake the "Entering directory ..." message more simply
        kconfig/lxdialog: get ncurses CFLAGS with pkg-config
        kconfig: nconfig: fix multi-byte UTF handling
        kconfig: lxdialog: fix spelling
        kbuild: Make scripts executable
        kbuild: remove redundant clean-files from scripts/kconfig/Makefile
        kbuild: refactor script/kconfig/Makefile
        kbuild: handle the dependency of multi-objs hostprogs appropriately
        kbuild: handle multi-objs dependency appropriately
      f33a3faa
    • L
      Merge tag 'fscache-fixes-20141013' of... · 1b5a5f59
      Linus Torvalds 提交于
      Merge tag 'fscache-fixes-20141013' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
      
      Pull fs-cache fixes from David Howells:
       "Two fixes for bugs in CacheFiles and a cleanup in FS-Cache"
      
      * tag 'fscache-fixes-20141013' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
        fs/fscache/object-list.c: use __seq_open_private()
        CacheFiles: Fix incorrect test for in-memory object collision
        CacheFiles: Handle object being killed before being set up
      1b5a5f59
    • L
      Merge tag 'upstream-3.18-rc1-v2' of git://git.infradead.org/linux-ubifs · b11445f8
      Linus Torvalds 提交于
      Pull UBI/UBIFS fixes from Artem Bityutskiy:
       - fix for a theoretical race condition which could lead to a situation
         when UBIFS is unable to mount a file-system (Hujianyang)
       - a few fixes for the ubiblock sybsystem, error path fixes
       - the ubiblock subsystem has had the volume size change handling
         improved
       - a few fixes and nicifications in the fastmap subsystem
      
      * tag 'upstream-3.18-rc1-v2' of git://git.infradead.org/linux-ubifs:
        UBI: Fastmap: Calc fastmap size correctly
        UBIFS: Fix trivial typo in power_cut_emulated()
        UBI: Fix trivial typo in __schedule_ubi_work
        UBI: wl: Rename cancel flag to shutdown
        UBI: ubi_eba_read_leb: Remove in vain variable assignment
        UBIFS: Align the dump messages of SB_NODE
        UBI: Fix livelock in produce_free_peb()
        UBI: return on error in rename_volumes()
        UBI: Improve comment on work_sem
        UBIFS: Remove bogus assert
        UBI: Dispatch update notification if the volume is updated
        UBI: block: Add support for the UBI_VOLUME_UPDATED notification
        UBI: block: Fix block device size setting
        UBI: block: fix dereference on uninitialized dev
        UBI: add missing kmem_cache_free() in process_pool_aeb error path
        UBIFS: fix free log space calculation
        UBIFS: fix a race condition
      b11445f8
    • L
      Merge branch 'CVE-2014-7975' of git://git.kernel.org/pub/scm/linux/kernel/git/luto/linux · 0ef3a56b
      Linus Torvalds 提交于
      Pull do_umount fix from Andy Lutomirski:
       "This fix really ought to be safe.  Inside a mountns owned by a
        non-root user namespace, the namespace root almost always has
        MNT_LOCKED set (if it doesn't, then there's a bug, because rootfs
        could be exposed).  In that case, calling umount on "/" will return
        -EINVAL with or without this patch.
      
        Outside a userns, this patch will have no effect.  may_mount, required
        by umount, already checks
           ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN)
        so an additional capable(CAP_SYS_ADMIN) check will have no effect.
      
        That leaves anything that calls umount on "/" in a non-root userns
        while chrooted.  This is the case that is currently broken (it
        remounts ro, which shouldn't be allowed) and that my patch changes to
        -EPERM.  If anything relies on *that*, I'd be surprised"
      
      * 'CVE-2014-7975' of git://git.kernel.org/pub/scm/linux/kernel/git/luto/linux:
        fs: Add a missing permission check to do_umount
      0ef3a56b
    • L
      Merge branch 'akpm' (patches from Andrew Morton) · dfe2c6dc
      Linus Torvalds 提交于
      Merge second patch-bomb from Andrew Morton:
       - a few hotfixes
       - drivers/dma updates
       - MAINTAINERS updates
       - Quite a lot of lib/ updates
       - checkpatch updates
       - binfmt updates
       - autofs4
       - drivers/rtc/
       - various small tweaks to less used filesystems
       - ipc/ updates
       - kernel/watchdog.c changes
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (135 commits)
        mm: softdirty: enable write notifications on VMAs after VM_SOFTDIRTY cleared
        kernel/param: consolidate __{start,stop}___param[] in <linux/moduleparam.h>
        ia64: remove duplicate declarations of __per_cpu_start[] and __per_cpu_end[]
        frv: remove unused declarations of __start___ex_table and __stop___ex_table
        kvm: ensure hard lockup detection is disabled by default
        kernel/watchdog.c: control hard lockup detection default
        staging: rtl8192u: use %*pEn to escape buffer
        staging: rtl8192e: use %*pEn to escape buffer
        staging: wlan-ng: use %*pEhp to print SN
        lib80211: remove unused print_ssid()
        wireless: hostap: proc: print properly escaped SSID
        wireless: ipw2x00: print SSID via %*pE
        wireless: libertas: print esaped string via %*pE
        lib/vsprintf: add %*pE[achnops] format specifier
        lib / string_helpers: introduce string_escape_mem()
        lib / string_helpers: refactoring the test suite
        lib / string_helpers: move documentation to c-file
        include/linux: remove strict_strto* definitions
        arch/x86/mm/numa.c: fix boot failure when all nodes are hotpluggable
        fs: check bh blocknr earlier when searching lru
        ...
      dfe2c6dc
    • L
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · a45d5728
      Linus Torvalds 提交于
      Pull m68knommu update from Greg Ungerer:
       "The major change is to remove the arch/m68k/platform directory.  The
        coldfire (and other non-mmu m68k platform) code is moved to the
        arch/m68k level, making them consistent with the traditional m68k
        platforms.
      
        A couple of other minor miscellaneous fixes as well"
      
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68k: Fix typo 'COFNIG_MBAR'
        m68knommu: add missing ioport_map() and ioport_unmap()
        m68k/coldfire: remove second asm/mcfclk.h inclusion in m54xx.c
        m68knommu: fix size of address field for 5272 interrupt controller
        m68k: fix crufty 68000 and 68360 intro comments
        m68k: remove the unused arch/m68k/platform directory
        m68k: move non-mmu 68360 platform code
        m68k: move non-mmu 68000 platform code
        m68k: fix crufty ColdFire intro comments
        m68k: move coldfire platform code
      a45d5728
    • L
      Merge tag 'please-pull-sys_bpf' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux · fc2414b4
      Linus Torvalds 提交于
      Pull ia64 update from Tony Luck:
       "Wire up bpf syscall for ia64"
      
      * tag 'please-pull-sys_bpf' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
        [IA64] Enable bpf syscall for ia64
      fc2414b4
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · 31003e3a
      Linus Torvalds 提交于
      Pull UML update from Richard Weinberger:
       "Besides of fixes this contains also support for CONFIG_STACKTRACE by
        Daniel Walter"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        um: net: Eliminate NULL test after alloc_bootmem
        um: Add support for CONFIG_STACKTRACE
        um: ubd: Fix for processes stuck in D state forever
        um: delete unnecessary bootmem struct page array
        um: remove csum_partial_copy_generic_i386 to clean up exception table
      31003e3a
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 1ee07ef6
      Linus Torvalds 提交于
      Pull s390 updates from Martin Schwidefsky:
       "This patch set contains the main portion of the changes for 3.18 in
        regard to the s390 architecture.  It is a bit bigger than usual,
        mainly because of a new driver and the vector extension patches.
      
        The interesting bits are:
         - Quite a bit of work on the tracing front.  Uprobes is enabled and
           the ftrace code is reworked to get some of the lost performance
           back if CONFIG_FTRACE is enabled.
         - To improve boot time with CONFIG_DEBIG_PAGEALLOC, support for the
           IPTE range facility is added.
         - The rwlock code is re-factored to improve writer fairness and to be
           able to use the interlocked-access instructions.
         - The kernel part for the support of the vector extension is added.
         - The device driver to access the CD/DVD on the HMC is added, this
           will hopefully come in handy to improve the installation process.
         - Add support for control-unit initiated reconfiguration.
         - The crypto device driver is enhanced to enable the additional AP
           domains and to allow the new crypto hardware to be used.
         - Bug fixes"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (39 commits)
        s390/ftrace: simplify enabling/disabling of ftrace_graph_caller
        s390/ftrace: remove 31 bit ftrace support
        s390/kdump: add support for vector extension
        s390/disassembler: add vector instructions
        s390: add support for vector extension
        s390/zcrypt: Toleration of new crypto hardware
        s390/idle: consolidate idle functions and definitions
        s390/nohz: use a per-cpu flag for arch_needs_cpu
        s390/vtime: do not reset idle data on CPU hotplug
        s390/dasd: add support for control unit initiated reconfiguration
        s390/dasd: fix infinite loop during format
        s390/mm: make use of ipte range facility
        s390/setup: correct 4-level kernel page table detection
        s390/topology: call set_sched_topology early
        s390/uprobes: architecture backend for uprobes
        s390/uprobes: common library for kprobes and uprobes
        s390/rwlock: use the interlocked-access facility 1 instructions
        s390/rwlock: improve writer fairness
        s390/rwlock: remove interrupt-enabling rwlock variant.
        s390/mm: remove change bit override support
        ...
      1ee07ef6
    • L
      Merge branches 'x86-ras-for-linus', 'x86-uv-for-linus' and... · 77654908
      Linus Torvalds 提交于
      Merge branches 'x86-ras-for-linus', 'x86-uv-for-linus' and 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
      
      Pull x86 ras, uv and vdso fixlets from Ingo Molnar:
       "ras: tone down a kernel message to only occur during initial bootup,
          not during suspend/resume cycles.
      
        uv: a cleanup commit
      
        vdso: a fix to error checking"
      
      * 'x86-ras-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mce: Avoid showing repetitive message from intel_init_thermal()
      
      * 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/apic/uv: Remove unnecessary #ifdef
      
      * 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/vdso: Fix vdso2c's special_pages[] error checking
      77654908
    • L
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2fd7476d
      Linus Torvalds 提交于
      Pull x86 fixes from Ingo Molnar:
       "Misc smaller fixes that missed the v3.17 cycle"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/build: Add arch/x86/purgatory/ make generated files to gitignore
        x86: Fix section conflict for numachip
        x86: Reject x32 executables if x32 ABI not supported
        x86_64, entry: Filter RFLAGS.NT on entry from userspace
        x86, boot, kaslr: Fix nuisance warning on 32-bit builds
      2fd7476d
    • L
      Merge branch 'x86-seccomp-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ba1a96fc
      Linus Torvalds 提交于
      Pull x86 seccomp changes from Ingo Molnar:
       "This tree includes x86 seccomp filter speedups and related preparatory
        work, which touches core seccomp facilities as well.
      
        The main idea is to split seccomp into two phases, to be able to enter
        a simple fast path for syscalls with ptrace side effects.
      
        There's no substantial user-visible (and ABI) effects expected from
        this, except a change in how we emit a better audit record for
        SECCOMP_RET_TRACE events"
      
      * 'x86-seccomp-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86_64, entry: Use split-phase syscall_trace_enter for 64-bit syscalls
        x86_64, entry: Treat regs->ax the same in fastpath and slowpath syscalls
        x86: Split syscall_trace_enter into two phases
        x86, entry: Only call user_exit if TIF_NOHZ
        x86, x32, audit: Fix x32's AUDIT_ARCH wrt audit
        seccomp: Document two-phase seccomp and arch-provided seccomp_data
        seccomp: Allow arch code to provide seccomp_data
        seccomp: Refactor the filter callback and the API
        seccomp,x86,arm,mips,s390: Remove nr parameter from secure_computing
      ba1a96fc
    • L
      Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f1bfbd98
      Linus Torvalds 提交于
      Pull x86 platform updates from Ingo Molnar:
       "The main changes in this tree are:
      
         - fix and update Intel Quark [Galileo] SoC platform support
      
         - update IOSF chipset side band interface and make it available via
           debugfs
      
         - enable HPETs on Soekris net6501 and other e6xx based systems"
      
      * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86: Add cpu_detect_cache_sizes to init_intel() add Quark legacy_cache()
        x86: Quark: Comment setup_arch() to document TLB/PGE bug
        x86/intel/quark: Switch off CR4.PGE so TLB flush uses CR3 instead
        x86/platform/intel/iosf: Add debugfs config option for IOSF
        x86/platform/intel/iosf: Add better description of IOSF driver in config
        x86/platform/intel/iosf: Add Braswell PCI ID
        x86/platform/pmc_atom: Fix warning when CONFIG_DEBUG_FS=n
        x86: HPET force enable for e6xx based systems
        x86/iosf: Add debugfs support
        x86/iosf: Add Kconfig prompt for IOSF_MBI selection
      f1bfbd98
    • L
      Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · df133e8f
      Linus Torvalds 提交于
      Pull x86 mm updates from Ingo Molnar:
       "This tree includes the following changes:
      
         - fix memory hotplug
         - fix hibernation bootup memory layout assumptions
         - fix hyperv numa guest kernel messages
         - remove dead code
         - update documentation"
      
      * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm: Update memory map description to list hypervisor-reserved area
        x86/mm, hibernate: Do not assume the first e820 area to be RAM
        x86/mm/numa: Drop dead code and rename setup_node_data() to setup_alloc_data()
        x86/mm/hotplug: Modify PGD entry when removing memory
        x86/mm/hotplug: Pass sync_global_pgds() a correct argument in remove_pagetable()
        x86: Remove set_pmd_pfn
      df133e8f
    • L
      Merge branch 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e3438330
      Linus Torvalds 提交于
      Pull x86 microcode loading updates from Ingo Molnar:
       "Misc smaller cleanups"
      
      * 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86, microcode, intel: Fix total_size computation
        x86, microcode, intel: Rename apply_microcode and declare it static
        x86, microcode, intel: Fix typos
        x86, microcode, intel: Add missing static declarations
        x86, microcode, amd: Fix missing static declaration
      e3438330
    • L
      Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c7b228ad
      Linus Torvalds 提交于
      Pull x86 FPU updates from Ingo Molnar:
       "x86 FPU handling fixes, cleanups and enhancements from Oleg.
      
        The signal handling race fix and the __restore_xstate_sig() preemption
        fix for eager-mode is marked for -stable as well"
      
      * 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86: copy_thread: Don't nullify ->ptrace_bps twice
        x86, fpu: Shift "fpu_counter = 0" from copy_thread() to arch_dup_task_struct()
        x86, fpu: copy_process: Sanitize fpu->last_cpu initialization
        x86, fpu: copy_process: Avoid fpu_alloc/copy if !used_math()
        x86, fpu: Change __thread_fpu_begin() to use use_eager_fpu()
        x86, fpu: __restore_xstate_sig()->math_state_restore() needs preempt_disable()
        x86, fpu: shift drop_init_fpu() from save_xstate_sig() to handle_signal()
      c7b228ad
    • L
      Merge branch 'x86-cpufeature-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 708d0b41
      Linus Torvalds 提交于
      Pull x86 cpufeature updates from Ingo Molnar:
       "This tree includes the following changes:
      
         - Introduce DISABLED_MASK to list disabled CPU features, to simplify
           CPU feature handling and avoid excessive #ifdefs
      
         - Remove the lightly used cpu_has_pae() primitive"
      
      * 'x86-cpufeature-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86: Add more disabled features
        x86: Introduce disabled-features
        x86: Axe the lightly-used cpu_has_pae
      708d0b41
    • P
      mm: softdirty: enable write notifications on VMAs after VM_SOFTDIRTY cleared · 64e45507
      Peter Feiner 提交于
      For VMAs that don't want write notifications, PTEs created for read faults
      have their write bit set.  If the read fault happens after VM_SOFTDIRTY is
      cleared, then the PTE's softdirty bit will remain clear after subsequent
      writes.
      
      Here's a simple code snippet to demonstrate the bug:
      
        char* m = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE,
                       MAP_ANONYMOUS | MAP_SHARED, -1, 0);
        system("echo 4 > /proc/$PPID/clear_refs"); /* clear VM_SOFTDIRTY */
        assert(*m == '\0');     /* new PTE allows write access */
        assert(!soft_dirty(x));
        *m = 'x';               /* should dirty the page */
        assert(soft_dirty(x));  /* fails */
      
      With this patch, write notifications are enabled when VM_SOFTDIRTY is
      cleared.  Furthermore, to avoid unnecessary faults, write notifications
      are disabled when VM_SOFTDIRTY is set.
      
      As a side effect of enabling and disabling write notifications with
      care, this patch fixes a bug in mprotect where vm_page_prot bits set by
      drivers were zapped on mprotect.  An analogous bug was fixed in mmap by
      commit c9d0bf24 ("mm: uncached vma support with writenotify").
      Signed-off-by: NPeter Feiner <pfeiner@google.com>
      Reported-by: NPeter Feiner <pfeiner@google.com>
      Suggested-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Cc: Pavel Emelyanov <xemul@parallels.com>
      Cc: Jamie Liu <jamieliu@google.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      64e45507
    • G
      kernel/param: consolidate __{start,stop}___param[] in <linux/moduleparam.h> · 63a12d9d
      Geert Uytterhoeven 提交于
      Consolidate the various external const and non-const declarations of
      __start___param[] and __stop___param in <linux/moduleparam.h>.  This
      requires making a few struct kernel_param pointers in kernel/params.c
      const.
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      63a12d9d
    • G
      ia64: remove duplicate declarations of __per_cpu_start[] and __per_cpu_end[] · 4c6327df
      Geert Uytterhoeven 提交于
      They're already provided by <asm/sections.h>.
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4c6327df
    • G
    • U
      kvm: ensure hard lockup detection is disabled by default · 9919e39a
      Ulrich Obergfell 提交于
      Use watchdog_enable_hardlockup_detector() to set hard lockup detection's
      default value to false.  It's risky to run this detection in a guest, as
      false positives are easy to trigger, especially if the host is
      overcommitted.
      Signed-off-by: NUlrich Obergfell <uobergfe@redhat.com>
      Signed-off-by: NAndrew Jones <drjones@redhat.com>
      Signed-off-by: NDon Zickus <dzickus@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9919e39a
    • U
      kernel/watchdog.c: control hard lockup detection default · 6e7458a6
      Ulrich Obergfell 提交于
      In some cases we don't want hard lockup detection enabled by default.
      An example is when running as a guest.  Introduce
      
        watchdog_enable_hardlockup_detector(bool)
      
      allowing those cases to disable hard lockup detection.  This must be
      executed early by the boot processor from e.g.  smp_prepare_boot_cpu, in
      order to allow kernel command line arguments to override it, as well as
      to avoid hard lockup detection being enabled before we've had a chance
      to indicate that it's unwanted.  In summary,
      
        initial boot:					default=enabled
        smp_prepare_boot_cpu
          watchdog_enable_hardlockup_detector(false):	default=disabled
        cmdline has 'nmi_watchdog=1':			default=enabled
      
      The running kernel still has the ability to enable/disable at any time
      with /proc/sys/kernel/nmi_watchdog us usual.  However even when the
      default has been overridden /proc/sys/kernel/nmi_watchdog will initially
      show '1'.  To truly turn it on one must disable/enable it, i.e.
      
        echo 0 > /proc/sys/kernel/nmi_watchdog
        echo 1 > /proc/sys/kernel/nmi_watchdog
      
      This patch will be immediately useful for KVM with the next patch of this
      series.  Other hypervisor guest types may find it useful as well.
      
      [akpm@linux-foundation.org: fix build]
      [dzickus@redhat.com: fix compile issues on sparc]
      Signed-off-by: NUlrich Obergfell <uobergfe@redhat.com>
      Signed-off-by: NAndrew Jones <drjones@redhat.com>
      Signed-off-by: NDon Zickus <dzickus@redhat.com>
      Signed-off-by: NDon Zickus <dzickus@redhat.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6e7458a6
    • A
      staging: rtl8192u: use %*pEn to escape buffer · 8a1db928
      Andy Shevchenko 提交于
      Let's use kernel's native specifier to escape a buffer.
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: "John W . Linville" <linville@tuxdriver.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8a1db928
    • A
      staging: rtl8192e: use %*pEn to escape buffer · 50d5e53d
      Andy Shevchenko 提交于
      Let's use kernel's native specifier to escape a buffer.
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: "John W . Linville" <linville@tuxdriver.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      50d5e53d
    • A
      staging: wlan-ng: use %*pEhp to print SN · 068c11da
      Andy Shevchenko 提交于
      This is a generic specifier to print an escaped buffer by given criteria.
      Let's use it instead of custom approach.
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: "John W . Linville" <linville@tuxdriver.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      068c11da
    • A
      lib80211: remove unused print_ssid() · 5df1415a
      Andy Shevchenko 提交于
      In kernel we have %*pE specifier to print an escaped buffer.  All users
      now switched to that approach.
      
      This fixes a bug as well.  The current implementation wrongly prints
      octal numbers: only two first digits are used in case when 3 are
      required and the rest of the string ends up cut off.
      
      Additionally by default the \f, \v, \a, and \e are escaped to their
      alphabetic representation.  It's safe to do since it is currently used
      for messaging only.
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: "John W . Linville" <linville@tuxdriver.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5df1415a
    • A
      wireless: hostap: proc: print properly escaped SSID · e5ead669
      Andy Shevchenko 提交于
      Instead of substituting non-printable characters by '_' let's print SSID
      properly escaped by using recently added %*pE specifier.
      
      [akpm@linux-foundation.org: fix printk type warning]
      [akpm@linux-foundation.org: remove now-unused local `i']
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: "John W . Linville" <linville@tuxdriver.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e5ead669
    • A
      wireless: ipw2x00: print SSID via %*pE · 4b4890cb
      Andy Shevchenko 提交于
      Instead of custom approach this allows to print escaped strings via
      recently added kernel extension: %*pE.
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: "John W . Linville" <linville@tuxdriver.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4b4890cb
    • A
      wireless: libertas: print esaped string via %*pE · da169607
      Andy Shevchenko 提交于
      Instead of custom approach this allows to print escaped strings via
      recently added kernel extension: %*pE.
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: "John W . Linville" <linville@tuxdriver.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      da169607
    • A
      lib/vsprintf: add %*pE[achnops] format specifier · 71dca95d
      Andy Shevchenko 提交于
      This allows user to print a given buffer as an escaped string.  The
      rules are applied according to an optional mix of flags provided by
      additional format letters.
      
      For example, if the given buffer is:
      
          1b 62 20 5c 43 07 22 90 0d 5d
      
      The result strings would be:
          %*pE            "\eb \C\a"\220\r]"
          %*pEhp          "\x1bb \C\x07"\x90\x0d]"
          %*pEa           "\e\142\040\\\103\a\042\220\r\135"
      
      Please, read Documentation/printk-formats.txt and lib/string_helpers.c
      kernel documentation to get further information.
      
      [akpm@linux-foundation.org: tidy up comment layout, per Joe]
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Suggested-by: NJoe Perches <joe@perches.com>
      Cc: "John W . Linville" <linville@tuxdriver.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      71dca95d
    • A
      lib / string_helpers: introduce string_escape_mem() · c8250381
      Andy Shevchenko 提交于
      This is almost the opposite function to string_unescape().  Nevertheless
      it handles \0 and could be used for any byte buffer.
      
      The documentation is supplied together with the function prototype.
      
      The test cases covers most of the scenarios and would be expanded later
      on.
      
      [akpm@linux-foundation.org: avoid 1k stack consumption]
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: "John W . Linville" <linville@tuxdriver.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Joe Perches <joe@perches.com>
      Cc: Wu Fengguang <fengguang.wu@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c8250381
    • A
      lib / string_helpers: refactoring the test suite · 45ff337a
      Andy Shevchenko 提交于
      This patch prepares test suite for a following update.  It introduces
      test_string_check_buf() helper which checks the result and dumps an error.
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: "John W . Linville" <linville@tuxdriver.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      45ff337a
    • A
      lib / string_helpers: move documentation to c-file · d295634e
      Andy Shevchenko 提交于
      The introduced function string_escape_mem() is a kind of opposite to
      string_unescape.  We have several users of such functionality each of
      them created custom implementation.  The series contains clean up of
      test suite, adding new call, and switching few users to use it via %*pE
      specifier.
      
      Test suite covers all of existing and most of potential use cases.
      
      This patch (of 11):
      
      The documentation of API belongs to c-file.  This patch moves it
      accordingly.
      
      There is no functional change.
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: "John W . Linville" <linville@tuxdriver.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d295634e
    • D
      include/linux: remove strict_strto* definitions · 3db2e9cd
      Daniel Walter 提交于
      Remove obsolete and unused strict_strto* functions
      Signed-off-by: NDaniel Walter <dwalter@google.com>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3db2e9cd
    • X
      arch/x86/mm/numa.c: fix boot failure when all nodes are hotpluggable · bd5cfb89
      Xishi Qiu 提交于
      If all the nodes are marked hotpluggable, alloc node data will fail.
      Because __next_mem_range_rev() will skip the hotpluggable memory
      regions.  numa_clear_kernel_node_hotplug() is called after alloc node
      data.
      
      numa_init()
          ...
          ret = init_func();  // this will mark hotpluggable flag from SRAT
          ...
          memblock_set_bottom_up(false);
          ...
          ret = numa_register_memblks(&numa_meminfo);  // this will alloc node data(pglist_data)
          ...
          numa_clear_kernel_node_hotplug();  // in case all the nodes are hotpluggable
          ...
      
      numa_register_memblks()
          setup_node_data()
              memblock_find_in_range_node()
                  __memblock_find_range_top_down()
                      for_each_mem_range_rev()
                          __next_mem_range_rev()
      
      This patch moves numa_clear_kernel_node_hotplug() into
      numa_register_memblks(), clear kernel node hotpluggable flag before
      alloc node data, then alloc node data won't fail even all the nodes
      are hotpluggable.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NXishi Qiu <qiuxishi@huawei.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Tang Chen <tangchen@cn.fujitsu.com>
      Cc: Gu Zheng <guz.fnst@cn.fujitsu.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bd5cfb89
    • Z
      fs: check bh blocknr earlier when searching lru · 9470dd5d
      Zach Brown 提交于
      It's very common for the buffer heads in the lru to have different block
      numbers.  By comparing the blocknr before the bdev and size we can
      reduce the cost of searching in the very common case where all the
      entries have the same bdev and size.
      
      In quick hot cache cycle counting tests on a single fs workstation this
      cut the cost of a miss by about 20%.
      
      A diff of the disassembly shows the reordering of the bdev and blocknr
      comparisons.  This is in such a tiny loop that skipping one comparison
      is a meaningful portion of the total work being done:
      
           1628:      83 c1 01                add    $0x1,%ecx
           162b:      83 f9 08                cmp    $0x8,%ecx
           162e:      74 60                   je     1690 <__find_get_block+0xa0>
           1630:      89 c8                   mov    %ecx,%eax
           1632:      65 4c 8b 04 c5 00 00    mov    %gs:0x0(,%rax,8),%r8
           1639:      00 00
           163b:      4d 85 c0                test   %r8,%r8
           163e:      4c 89 c3                mov    %r8,%rbx
           1641:      74 e5                   je     1628 <__find_get_block+0x38>
      -    1643:      4d 3b 68 30             cmp    0x30(%r8),%r13
      +    1643:      4d 3b 68 18             cmp    0x18(%r8),%r13
           1647:      75 df                   jne    1628 <__find_get_block+0x38>
      -    1649:      4d 3b 60 18             cmp    0x18(%r8),%r12
      +    1649:      4d 3b 60 30             cmp    0x30(%r8),%r12
           164d:      75 d9                   jne    1628 <__find_get_block+0x38>
           164f:      49 39 50 20             cmp    %rdx,0x20(%r8)
           1653:      75 d3                   jne    1628 <__find_get_block+0x38>
      Signed-off-by: NZach Brown <zab@zabbo.net>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9470dd5d