1. 24 11月, 2017 3 次提交
    • C
      s390/debug: use pK for kernel pointers · 860ec7c6
      Christian Borntraeger 提交于
      the s390 debug feature (/sys/kernel/debug/s390dbf/) shows the kernel
      pointer of the calling function even for kptr_restrict == 2. Let us
      use pK instead of p.
      
      This hides the kernel addresses for kptr_restrict == 2:
      
      root@host $ echo 2 >  /proc/sys/kernel/kptr_restrict
      root@host $ tail -n1  /sys/kernel/debug/s390dbf/cio_msg/sprintf
      00 01511461280:386645 2 - 00 0000000000000000  snsid: device 0.0.3f68: rc=0 3990/e9 3390/0c
      
      root@host $ echo 1 >  /proc/sys/kernel/kptr_restrict
      root@host $ tail -n1  /sys/kernel/debug/s390dbf/cio_msg/sprintf
      00 01511461280:386645 2 - 00 000000000071171c  snsid: device 0.0.3f68: rc=0 3990/e9 3390/0c
      
      root@host $ echo 0 >  /proc/sys/kernel/kptr_restrict
      root@host $ tail -n1  /sys/kernel/debug/s390dbf/cio_msg/sprintf
      00 01511461280:386645 2 - 00 000000000071171c  snsid: device 0.0.3f68: rc=0 3990/e9 3390/0c
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Acked-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      860ec7c6
    • M
      s390: fix alloc_pgste check in init_new_context again · 53c4ab70
      Martin Schwidefsky 提交于
      git commit badb8bb9 "fix alloc_pgste check in init_new_context" fixed
      the problem of 'current->mm == NULL' in init_new_context back in 2011.
      
      git commit 3eabaee9 "KVM: s390: allow sie enablement for multi-
      threaded programs" completely removed the check against alloc_pgste.
      
      git commit 23fefe11 "s390/kvm: avoid global config of vm.alloc_pgste=1"
      re-added a check against the alloc_pgste flag but without the required
      check for current->mm != NULL.
      
      For execve() called by a kernel thread init_new_context() reads from
      ((struct mm_struct *) NULL)->context.alloc_pgste to decide between
      2K vs 4K page tables. If the bit happens to be set for the init process
      it will be created with large page tables. This decision is inherited by
      all the children of init, this waste quite some memory.
      
      Re-add the check for 'current->mm != NULL'.
      
      Fixes: 23fefe11 ("s390/kvm: avoid global config of vm.alloc_pgste=1")
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      53c4ab70
    • V
      s390/disassembler: correct disassembly lines alignment · 26f4e759
      Vasily Gorbik 提交于
      176.718956 Krnl Code: 00000000004d38b0: a54c0018        llihh   %r4,24
      176.718956 	   00000000004d38b4: b9080014        agr     %r1,%r4
                 ^
      Using a tab to align disassembly lines which follow the first line with
      "Krnl Code: " doesn't always work, e.g. if there is a prefix (timestamp
      or syslog prefix) which is not 8 chars aligned. Go back to alignment
      with spaces.
      
      Fixes: b192571d ("s390/disassembler: increase show_code buffer size")
      Signed-off-by: NVasily Gorbik <gor@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      26f4e759
  2. 20 11月, 2017 7 次提交
    • H
      s390/zcrypt: Fix wrong comparison leading to strange load balancing · 0b088267
      Harald Freudenberger 提交于
      The function to decide if one zcrypt queue is better than
      another one compared two pointers instead of comparing the
      values where the pointers refer to. So within the same
      zcrypt card when load of each queue was equal just one queue
      was used. This effect only appears on relatively lite load,
      typically with one thread applications.
      
      This patch fixes the wrong comparison and now the counters
      show that requests are balanced equally over all available
      queues within the cards.
      
      There is no performance improvement coming with this fix.
      As long as the queue depth for an APQN queue is not touched,
      processing is not faster when requests are spread over
      queues within the same card hardware. So this fix only
      beautifies the lszcrypt counter printouts.
      Signed-off-by: NHarald Freudenberger <freude@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      0b088267
    • H
      s390/disassembler: remove confusing code · de35089c
      Heiko Carstens 提交于
      When searching the opcode offset table within find_insn() the check
      "entry->opcode == 0" was intended to clarify that 1-byte opcodes, the
      first one being 0, are special.
      
      However there is no mnemonic for an illegal opcode starting with 0.
      Therefore there is also no opcode offset table entry that matches,
      which again means that the check never is true. Therefore just remove
      the confusing check, and add a comment which hopefully explains how
      this works.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      de35089c
    • H
      s390: rework __switch_to() to allow larger task_struct offsets · 3241d3eb
      Heiko Carstens 提交于
      If GCC_PLUGIN_RANDSTRUCT is enabled the members of task_struct will be
      shuffled around. The offsets of the "pid" and "stack" members within
      task_struct may not necessarily fit into 12 bits anymore, which causes
      compile errors within __switch_to, since instructions are used, which
      only have a 12 bit displacement field.
      
      Therefore rework __switch_to, to allow for larger offsets.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      3241d3eb
    • T
      s390/topology: fix compile error in file arch/s390/kernel/smp.c · 38389ec8
      Thomas Richter 提交于
      Commit 1887aa07
      ("s390/topology: add detection of dedicated vs shared CPUs")
      introduced following compiler error when CONFIG_SCHED_TOPOLOGY is not set.
      
       CC      arch/s390/kernel/smp.o
      ...
      arch/s390/kernel/smp.c: In function ‘smp_start_secondary’:
      arch/s390/kernel/smp.c:812:6: error: implicit declaration of function
      	‘topology_cpu_dedicated’; did you mean ‘topology_cpu_init’?
      
      This patch fixes the compiler error by adding function
      topology_cpu_dedicated() to return false when this config option is
      not defined.
      Signed-off-by: NThomas Richter <tmricht@linux.vnet.ibm.com>
      Reviewed-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      38389ec8
    • L
      Merge tag 'ntb-4.15' of git://github.com/jonmason/ntb · c8a0739b
      Linus Torvalds 提交于
      Pull ntb updates from Jon Mason:
       "Support for the switchtec ntb and related changes. Also, a couple of
        bug fixes"
      
      [ The timing isn't great. I had asked people to send me pull requests
        before my family vacation, and this code has not even been in
        linux-next as far as I can tell. But Logan Gunthorpe pleaded for its
        inclusion because the Switchtec driver has apparently been around for
        a while, just never in linux-next - Linus ]
      
      * tag 'ntb-4.15' of git://github.com/jonmason/ntb:
        ntb: intel: remove b2b memory window workaround for Skylake NTB
        NTB: make idt_89hpes_cfg const
        NTB: switchtec_ntb: Update switchtec documentation with notes for NTB
        NTB: switchtec_ntb: Add memory window support
        NTB: switchtec_ntb: Implement scratchpad registers
        NTB: switchtec_ntb: Implement doorbell registers
        NTB: switchtec_ntb: Add link management
        NTB: switchtec_ntb: Add skeleton NTB driver
        NTB: switchtec_ntb: Initialize hardware for doorbells and messages
        NTB: switchtec_ntb: Initialize hardware for memory windows
        NTB: switchtec_ntb: Introduce initial NTB driver
        NTB: Add check and comment for link up to mw_count() and mw_get_align()
        NTB: Ensure ntb_mw_get_align() is only called when the link is up
        NTB: switchtec: Add link event notifier callback
        NTB: switchtec: Add NTB hardware register definitions
        NTB: switchtec: Export class symbol for use in upper layer driver
        NTB: switchtec: Move structure definitions into a common header
        ntb: update maintainer list for Intel NTB driver
      c8a0739b
    • R
      ima: do not update security.ima if appraisal status is not INTEGRITY_PASS · 020aae3e
      Roberto Sassu 提交于
      Commit b65a9cfc ("Untangling ima mess, part 2: deal with counters")
      moved the call of ima_file_check() from may_open() to do_filp_open() at a
      point where the file descriptor is already opened.
      
      This breaks the assumption made by IMA that file descriptors being closed
      belong to files whose access was granted by ima_file_check(). The
      consequence is that security.ima and security.evm are updated with good
      values, regardless of the current appraisal status.
      
      For example, if a file does not have security.ima, IMA will create it after
      opening the file for writing, even if access is denied. Access to the file
      will be allowed afterwards.
      
      Avoid this issue by checking the appraisal status before updating
      security.ima.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NRoberto Sassu <roberto.sassu@huawei.com>
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      Signed-off-by: NJames Morris <james.l.morris@oracle.com>
      020aae3e
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide · ed30b147
      Linus Torvalds 提交于
      Pull small IDE cleanup from David Miller.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
        PNP: ide: constify pnp_device_id
      ed30b147
  3. 19 11月, 2017 22 次提交
  4. 18 11月, 2017 8 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 1deab8ce
      Linus Torvalds 提交于
      Pull sparc updates from David Miller:
      
       1) Add missing cmpxchg64() for 32-bit sparc.
      
       2) Timer conversions from Allen Pais and Kees Cook.
      
       3) vDSO support, from Nagarathnam Muthusamy.
      
       4) Fix sparc64 huge page table walks based upon bug report by Al Viro,
          from Nitin Gupta.
      
       5) Optimized fls() for T4 and above, from Vijay Kumar.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc64: Fix page table walk for PUD hugepages
        sparc64: Convert timers to user timer_setup()
        sparc64: convert mdesc_handle.refcnt from atomic_t to refcount_t
        sparc/led: Convert timers to use timer_setup()
        sparc64: Use sparc optimized fls and __fls for T4 and above
        sparc64: SPARC optimized __fls function
        sparc64: SPARC optimized fls function
        sparc64: Define SPARC default __fls function
        sparc64: Define SPARC default fls function
        vDSO for sparc
        sparc32: Add cmpxchg64().
        sbus: char: Move D7S_MINOR to include/linux/miscdevice.h
        sparc: time: Remove unneeded linux/miscdevice.h include
        sparc64: mmu_context: Add missing include files
      1deab8ce
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 81700247
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Revert regression inducing change to the IPSEC template resolver,
          from Steffen Klassert.
      
       2) Peeloffs can cause the wrong sk to be waken up in SCTP, fix from Xin
          Long.
      
       3) Min packet MTU size is wrong in cpsw driver, from Grygorii Strashko.
      
       4) Fix build failure in netfilter ctnetlink, from Arnd Bergmann.
      
       5) ISDN hisax driver checks pnp_irq() for errors incorrectly, from
          Arvind Yadav.
      
       6) Fix fealnx driver build failure on MIPS, from Huacai Chen.
      
       7) Fix into leak in SCTP, the scope_id of socket addresses is not
          always filled in. From Eric W. Biederman.
      
       8) MTU inheritance between physical function and representor fix in nfp
          driver, from Dirk van der Merwe.
      
       9) Fix memory leak in rsi driver, from Colin Ian King.
      
      10) Fix expiration and generation ID handling of cached ipv4 redirect
          routes, from Xin Long.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (40 commits)
        net: usb: hso.c: remove unneeded DRIVER_LICENSE #define
        ibmvnic: fix dma_mapping_error call
        ipvlan: NULL pointer dereference panic in ipvlan_port_destroy
        route: also update fnhe_genid when updating a route cache
        route: update fnhe_expires for redirect when the fnhe exists
        sctp: set frag_point in sctp_setsockopt_maxseg correctly
        rsi: fix memory leak on buf and usb_reg_buf
        net/netlabel: Add list_next_rcu() in rcu_dereference().
        nfp: remove false positive offloads in flower vxlan
        nfp: register flower reprs for egress dev offload
        nfp: inherit the max_mtu from the PF netdev
        nfp: fix vlan receive MAC statistics typo
        nfp: fix flower offload metadata flag usage
        virto_net: remove empty file 'virtio_net.'
        net/sctp: Always set scope_id in sctp_inet6_skb_msgname
        fealnx: Fix building error on MIPS
        isdn: hisax: Fix pnp_irq's error checking for setup_teles3
        isdn: hisax: Fix pnp_irq's error checking for setup_sedlbauer_isapnp
        isdn: hisax: Fix pnp_irq's error checking for setup_niccy
        isdn: hisax: Fix pnp_irq's error checking for setup_ix1micro
        ...
      81700247
    • L
      Merge tag 'hwlock-v4.15' of git://github.com/andersson/remoteproc · 27eabfaa
      Linus Torvalds 提交于
      Pull hwspinlock update from Bjorn Andersson:
       "This changes the HWSPINLOCK core Kconfig option to bool, to aid when
        other core code depends on it"
      
      * tag 'hwlock-v4.15' of git://github.com/andersson/remoteproc:
        hwspinlock: Change hwspinlock to a bool
      27eabfaa
    • L
      Merge tag 'rproc-v4.15' of git://github.com/andersson/remoteproc · 4f88bd23
      Linus Torvalds 提交于
      Pull remoteproc updates from Bjorn Andersson:
       "This adds an interface for configuring Qualcomm's "secure SMMU" and
        adds support for booting the modem Hexagon on MSM8996.
      
        Two new debugfs entries are added in the remoteproc core to introspect
        the list of memory carveouts and the loaded resource table"
      
      * tag 'rproc-v4.15' of git://github.com/andersson/remoteproc:
        remoteproc: qcom: Fix error handling paths in order to avoid memory leaks
        remoteproc: qcom: Drop pr_err in q6v5_xfer_mem_ownership()
        remoteproc: debug: add carveouts list dump feature
        remoteproc: debug: add resource table dump feature
        remoteproc: qcom: Add support for mss remoteproc on msm8996
        remoteproc: qcom: Make secure world call for mem ownership switch
        remoteproc: qcom: refactor mss fw image loading sequence
        firmware: scm: Add new SCM call API for switching memory ownership
      4f88bd23
    • L
      Merge tag 'rpmsg-v4.15' of git://github.com/andersson/remoteproc · bedf5719
      Linus Torvalds 提交于
      Pull rpmsg updates from Bjorn Andersson:
      
       - turn RPMSG_VIRTIO into a user selectable config
      
       - fix few bugs in GLINK
      
       - provide the support for specifying initial buffer sizes for GLINK
         channels.
      
      * tag 'rpmsg-v4.15' of git://github.com/andersson/remoteproc:
        rpmsg: glink: The mbox client knows_txdone
        rpmsg: glink: Add missing MODULE_LICENSE
        rpmsg: glink: Use best fit intent during tx
        rpmsg: glink: Add support to preallocate intents
        dt-bindings: soc: qcom: Support GLINK intents
        rpmsg: glink: Initialize the "intent_req_comp" completion variable
        rpmsg: Allow RPMSG_VIRTIO to be enabled via menuconfig or defconfig
      bedf5719
    • L
      Merge tag 'hwmon-for-linus-v4.15-take2' of... · d9ef1ccf
      Linus Torvalds 提交于
      Merge tag 'hwmon-for-linus-v4.15-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull more hwmon updates/fixes from Guenter Roeck:
      
       - minor bug fix in k10temp driver
      
       - take advantage of added NULL check in i2c_unregister_device()
      
      * tag 'hwmon-for-linus-v4.15-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (w83793) Remove duplicate NULL check
        hwmon: (w83792d) Remove duplicate NULL check
        hwmon: (w83791d) Remove duplicate NULL check
        hwmon: (w83781d) Remove duplicate NULL check
        hwmon: (k10temp) Correct model name for Ryzen 1600X
      d9ef1ccf
    • L
      Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · fc35c196
      Linus Torvalds 提交于
      Pull clk updates from Stephen Boyd:
       "We have two changes to the core framework this time around.
      
        The first being a large change that introduces runtime PM support to
        the clk framework. Now we properly call runtime PM operations on the
        device providing a clk when the clk is in use. This helps on SoCs
        where the clks provided by a device need something to be powered on
        before using the clks, like power domains or regulators. It also helps
        power those things down when clks aren't in use.
      
        The other core change is a devm API addition for clk providers so we
        can get rid of a bunch of clk driver remove functions that are just
        doing of_clk_del_provider().
      
        Outside of the core, we have the usual addition of clk drivers and
        smattering of non-critical fixes to existing drivers. The biggest diff
        is support for Mediatek MT2712 and MT7622 SoCs, but those patches
        really just add a bunch of data.
      
        By the way, we're trying something new here where we build the tree up
        with topic branches. We plan to work this into our workflow so that we
        don't step on each other's toes, and so the fixes branch can be merged
        on an as-needed basis.
      
        Summary:
      
        Core:
         - runtime PM support for clk providers
         - devm API for of_clk_add_hw_provider()
      
        New Drivers:
         - Mediatek MT2712 and MT7622
         - Renesas R-Car V3M SoC
      
        Updates:
         - runtime PM support for Samsung exynos5433/exynos4412 providers
         - removal of clkdev aliases on Samsung SoCs
         - convert clk-gpio to use gpio descriptors
         - various driver cleanups to match kernel coding style
         - Amlogic Video Processing Unit VPU and VAPB clks
         - sigma-delta modulation for Allwinner audio PLLs
         - Allwinner A83t Display clks
         - support for the second display unit clock on Renesas RZ/G1E
         - suspend/resume support for Renesas R-Car Gen3 CPG/MSSR
         - new clock ids for Rockchip rk3188 and rk3368 SoCs
         - various 'const' markings on clk_ops structures
         - RPM clk support on Qualcomm MSM8996/MSM8660 SoCs"
      
      * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (137 commits)
        clk: stm32h7: fix test of clock config
        clk: pxa: fix building on older compilers
        clk: sunxi-ng: a83t: Fix i2c buses bits
        clk: ti: dra7-atl-clock: fix child-node lookups
        clk: qcom: common: fix legacy board-clock registration
        clk: uniphier: fix DAPLL2 clock rate of Pro5
        clk: uniphier: fix parent of miodmac clock data
        clk: hi3798cv200: correct parent mux clock for 'clk_sdio0_ciu'
        clk: hisilicon: Delete an error message for a failed memory allocation in hisi_register_clkgate_sep()
        clk: hi3660: fix incorrect uart3 clock freqency
        clk: kona-setup: Delete error messages for failed memory allocations
        ARC: clk: fix spelling mistake: "configurarion" -> "configuration"
        clk: cdce925: remove redundant check for non-null parent_name
        clk: versatile: Improve sizeof() usage
        clk: versatile: Delete error messages for failed memory allocations
        clk: ux500: Improve sizeof() usage
        clk: ux500: Delete error messages for failed memory allocations
        clk: spear: Delete error messages for failed memory allocations
        clk: ti: Delete error messages for failed memory allocations
        clk: mmp: Adjust checks for NULL pointers
        ...
      fc35c196
    • L
      Merge tag 'kbuild-misc-v4.15' of... · 2ce079f0
      Linus Torvalds 提交于
      Merge tag 'kbuild-misc-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild misc updates from Masahiro Yamada:
      
       - Clean up and fix RPM package build
      
       - Fix a warning in DEB package build
      
       - Improve coccicheck script
      
       - Improve some semantic patches
      
      * tag 'kbuild-misc-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        docs: dev-tools: coccinelle: delete out of date wiki reference
        coccinelle: orplus: reorganize to improve performance
        coccinelle: use exists to improve efficiency
        builddeb: Pass the kernel:debarch substvar to dpkg-genchanges
        Coccinelle: use false positive annotation
        coccinelle: fix verbose message about .cocci file being run
        coccinelle: grep Options and Requires fields more precisely
        Coccinelle: make DEBUG_FILE option more useful
        coccinelle: api: detect identical chip data arrays
        coccinelle: Improve setup_timer.cocci matching
        Coccinelle: setup_timer: improve messages from setup_timer
        kbuild: rpm-pkg: do not force -jN in submake
        kbuild: rpm-pkg: keep spec file until make mrproper
        kbuild: rpm-pkg: fix jobserver unavailable warning
        kbuild: rpm-pkg: replace $RPM_BUILD_ROOT with %{buildroot}
        kbuild: rpm-pkg: fix build error when CONFIG_MODULES is disabled
        kbuild: rpm-pkg: refactor mkspec with here doc
        kbuild: rpm-pkg: clean up mkspec
        kbuild: rpm-pkg: install vmlinux.bz2 unconditionally
        kbuild: rpm-pkg: remove ppc64 specific image handling
      2ce079f0