1. 31 7月, 2018 1 次提交
    • J
      KVM: s390: Add huge page enablement control · a4499382
      Janosch Frank 提交于
      General KVM huge page support on s390 has to be enabled via the
      kvm.hpage module parameter. Either nested or hpage can be enabled, as
      we currently do not support vSIE for huge backed guests. Once the vSIE
      support is added we will either drop the parameter or enable it as
      default.
      
      For a guest the feature has to be enabled through the new
      KVM_CAP_S390_HPAGE_1M capability and the hpage module
      parameter. Enabling it means that cmm can't be enabled for the vm and
      disables pfmf and storage key interpretation.
      
      This is due to the fact that in some cases, in upcoming patches, we
      have to split huge pages in the guest mapping to be able to set more
      granular memory protection on 4k pages. These split pages have fake
      page tables that are not visible to the Linux memory management which
      subsequently will not manage its PGSTEs, while the SIE will. Disabling
      these features lets us manage PGSTE data in a consistent matter and
      solve that problem.
      Signed-off-by: NJanosch Frank <frankja@linux.ibm.com>
      Reviewed-by: NDavid Hildenbrand <david@redhat.com>
      a4499382
  2. 24 6月, 2018 1 次提交
  3. 23 6月, 2018 4 次提交
  4. 22 6月, 2018 2 次提交
  5. 21 6月, 2018 1 次提交
  6. 18 6月, 2018 1 次提交
  7. 16 6月, 2018 12 次提交
  8. 15 6月, 2018 5 次提交
  9. 14 6月, 2018 2 次提交
    • C
      dma-mapping: move all DMA mapping code to kernel/dma · cf65a0f6
      Christoph Hellwig 提交于
      Currently the code is split over various files with dma- prefixes in the
      lib/ and drives/base directories, and the number of files keeps growing.
      Move them into a single directory to keep the code together and remove
      the file name prefixes.  To match the irq infrastructure this directory
      is placed under the kernel/ directory.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      cf65a0f6
    • L
      Kbuild: rename CC_STACKPROTECTOR[_STRONG] config variables · 050e9baa
      Linus Torvalds 提交于
      The changes to automatically test for working stack protector compiler
      support in the Kconfig files removed the special STACKPROTECTOR_AUTO
      option that picked the strongest stack protector that the compiler
      supported.
      
      That was all a nice cleanup - it makes no sense to have the AUTO case
      now that the Kconfig phase can just determine the compiler support
      directly.
      
      HOWEVER.
      
      It also meant that doing "make oldconfig" would now _disable_ the strong
      stackprotector if you had AUTO enabled, because in a legacy config file,
      the sane stack protector configuration would look like
      
        CONFIG_HAVE_CC_STACKPROTECTOR=y
        # CONFIG_CC_STACKPROTECTOR_NONE is not set
        # CONFIG_CC_STACKPROTECTOR_REGULAR is not set
        # CONFIG_CC_STACKPROTECTOR_STRONG is not set
        CONFIG_CC_STACKPROTECTOR_AUTO=y
      
      and when you ran this through "make oldconfig" with the Kbuild changes,
      it would ask you about the regular CONFIG_CC_STACKPROTECTOR (that had
      been renamed from CONFIG_CC_STACKPROTECTOR_REGULAR to just
      CONFIG_CC_STACKPROTECTOR), but it would think that the STRONG version
      used to be disabled (because it was really enabled by AUTO), and would
      disable it in the new config, resulting in:
      
        CONFIG_HAVE_CC_STACKPROTECTOR=y
        CONFIG_CC_HAS_STACKPROTECTOR_NONE=y
        CONFIG_CC_STACKPROTECTOR=y
        # CONFIG_CC_STACKPROTECTOR_STRONG is not set
        CONFIG_CC_HAS_SANE_STACKPROTECTOR=y
      
      That's dangerously subtle - people could suddenly find themselves with
      the weaker stack protector setup without even realizing.
      
      The solution here is to just rename not just the old RECULAR stack
      protector option, but also the strong one.  This does that by just
      removing the CC_ prefix entirely for the user choices, because it really
      is not about the compiler support (the compiler support now instead
      automatially impacts _visibility_ of the options to users).
      
      This results in "make oldconfig" actually asking the user for their
      choice, so that we don't have any silent subtle security model changes.
      The end result would generally look like this:
      
        CONFIG_HAVE_CC_STACKPROTECTOR=y
        CONFIG_CC_HAS_STACKPROTECTOR_NONE=y
        CONFIG_STACKPROTECTOR=y
        CONFIG_STACKPROTECTOR_STRONG=y
        CONFIG_CC_HAS_SANE_STACKPROTECTOR=y
      
      where the "CC_" versions really are about internal compiler
      infrastructure, not the user selections.
      Acked-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      050e9baa
  10. 11 6月, 2018 1 次提交
  11. 09 6月, 2018 1 次提交
    • A
      vfio/mdev: Check globally for duplicate devices · 002fe996
      Alex Williamson 提交于
      When we create an mdev device, we check for duplicates against the
      parent device and return -EEXIST if found, but the mdev device
      namespace is global since we'll link all devices from the bus.  We do
      catch this later in sysfs_do_create_link_sd() to return -EEXIST, but
      with it comes a kernel warning and stack trace for trying to create
      duplicate sysfs links, which makes it an undesirable response.
      
      Therefore we should really be looking for duplicates across all mdev
      parent devices, or as implemented here, against our mdev device list.
      Using mdev_list to prevent duplicates means that we can remove
      mdev_parent.lock, but in order not to serialize mdev device creation
      and removal globally, we add mdev_device.active which allows UUIDs to
      be reserved such that we can drop the mdev_list_lock before the mdev
      device is fully in place.
      
      Two behavioral notes; first, mdev_parent.lock had the side-effect of
      serializing mdev create and remove ops per parent device.  This was
      an implementation detail, not an intentional guarantee provided to
      the mdev vendor drivers.  Vendor drivers can trivially provide this
      serialization internally if necessary.  Second, review comments note
      the new -EAGAIN behavior when the device, and in particular the remove
      attribute, becomes visible in sysfs.  If a remove is triggered prior
      to completion of mdev_device_create() the user will see a -EAGAIN
      error.  While the errno is different, receiving an error during this
      period is not, the previous implementation returned -ENODEV for the
      same condition.  Furthermore, the consistency to the user is improved
      in the case where mdev_device_remove_ops() returns error.  Previously
      concurrent calls to mdev_device_remove() could see the device
      disappear with -ENODEV and return in the case of error.  Now a user
      would see -EAGAIN while the device is in this transitory state.
      Reviewed-by: NKirti Wankhede <kwankhede@nvidia.com>
      Reviewed-by: NCornelia Huck <cohuck@redhat.com>
      Acked-by: NHalil Pasic <pasic@linux.ibm.com>
      Acked-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      002fe996
  12. 08 6月, 2018 9 次提交