1. 02 7月, 2018 3 次提交
  2. 29 6月, 2018 1 次提交
    • L
      Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL · a11e1d43
      Linus Torvalds 提交于
      The poll() changes were not well thought out, and completely
      unexplained.  They also caused a huge performance regression, because
      "->poll()" was no longer a trivial file operation that just called down
      to the underlying file operations, but instead did at least two indirect
      calls.
      
      Indirect calls are sadly slow now with the Spectre mitigation, but the
      performance problem could at least be largely mitigated by changing the
      "->get_poll_head()" operation to just have a per-file-descriptor pointer
      to the poll head instead.  That gets rid of one of the new indirections.
      
      But that doesn't fix the new complexity that is completely unwarranted
      for the regular case.  The (undocumented) reason for the poll() changes
      was some alleged AIO poll race fixing, but we don't make the common case
      slower and more complex for some uncommon special case, so this all
      really needs way more explanations and most likely a fundamental
      redesign.
      
      [ This revert is a revert of about 30 different commits, not reverted
        individually because that would just be unnecessarily messy  - Linus ]
      
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a11e1d43
  3. 27 6月, 2018 2 次提交
  4. 25 6月, 2018 1 次提交
  5. 24 6月, 2018 1 次提交
  6. 23 6月, 2018 4 次提交
  7. 22 6月, 2018 2 次提交
  8. 21 6月, 2018 1 次提交
  9. 18 6月, 2018 2 次提交
  10. 16 6月, 2018 12 次提交
  11. 15 6月, 2018 5 次提交
  12. 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
  13. 11 6月, 2018 1 次提交
  14. 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
  15. 08 6月, 2018 2 次提交