1. 26 Jul, 2017 14 commits
    • Prabhakar Lad's avatar
      media: platform: davinci: return -EINVAL for VPFE_CMD_S_CCDC_RAW_PARAMS ioctl · da05d52d
      Prabhakar Lad authored
      this patch makes sure VPFE_CMD_S_CCDC_RAW_PARAMS ioctl no longer works
      for vpfe_capture driver with a minimal patch suitable for backporting.
      
      - This ioctl was never in public api and was only defined in kernel header.
      - The function set_params constantly mixes up pointers and phys_addr_t
        numbers.
      - This is part of a 'VPFE_CMD_S_CCDC_RAW_PARAMS' ioctl command that is
        described as an 'experimental ioctl that will change in future kernels'.
      - The code to allocate the table never gets called after we copy_from_user
        the user input over the kernel settings, and then compare them
        for inequality.
      - We then go on to use an address provided by user space as both the
        __user pointer for input and pass it through phys_to_virt to come up
        with a kernel pointer to copy the data to. This looks like a trivially
        exploitable root hole.
      
      Due to these reasons we make sure this ioctl now returns -EINVAL and backport
      this patch as far as possible.
      
      Fixes: 5f15fbb6 ("V4L/DVB (12251): v4l: dm644x ccdc module for vpfe capture driver")
      Signed-off-by: default avatarLad, Prabhakar <prabhakar.csengg@gmail.com>
      Cc: <stable@vger.kernel.org>      # for v3.7 and up
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      da05d52d
    • Stanimir Varbanov's avatar
      media: venus: don't abuse dma_alloc for non-DMA allocations · 377a22d3
      Stanimir Varbanov authored
      In venus_boot(), we pass a pointer to a phys_addr_t
      into dmam_alloc_coherent, which the compiler warns about:
      
      platform/qcom/venus/firmware.c: In function 'venus_boot':
      platform/qcom/venus/firmware.c:63:49: error: passing argument 3 of 'dmam_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]
      
      To avoid the error refactor venus_boot function by discard
      dma_alloc_coherent invocation because we don't want to map the
      memory for the device.  Something more, the usage of
      DMA mapping API is actually wrong and the current
      implementation relies on several bugs in DMA mapping code.
      When these bugs are fixed that will break firmware loading,
      so fix this now to avoid future troubles.
      
      The meaning of venus_boot is to copy the content of the
      firmware buffer into reserved (and memblock removed)
      block of memory and pass that physical address to the
      trusted zone for authentication and mapping through iommu
      form the secure world. After iommu mapping is done the iova
      is passed as ane entry point to the remote processor.
      
      After this change memory-region property is parsed manually
      and the physical address is memremap to CPU, call mdt_load to
      load firmware segments into proper places and unmap
      reserved memory.
      
      Fixes: af2c3834 ("[media] media: venus: adding core part and helper functions")
      Signed-off-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
      Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      377a22d3
    • Rob Clark's avatar
      media: venus: hfi: fix error handling in hfi_sys_init_done() · 3e7caae5
      Rob Clark authored
      Not entirely sure what triggers it, but with venus build as kernel
      module and in initrd, we hit this crash:
      
        Unable to handle kernel paging request at virtual address ffff80003c039000
        pgd = ffff00000a14f000
        [ffff80003c039000] *pgd=00000000bd9f7003, *pud=00000000bd9f6003, *pmd=00000000bd9f0003, *pte=0000000000000000
        Internal error: Oops: 96000007 [#1] SMP
        Modules linked in: qcom_wcnss_pil(E+) crc32_ce(E) qcom_common(E) venus_core(E+) remoteproc(E) snd_soc_msm8916_digital(E) virtio_ring(E) cdc_ether(E) snd_soc_lpass_apq8016(E) snd_soc_lpass_cpu(E) snd_soc_apq8016_sbc(E) snd_soc_lpass_platform(E) v4l2_mem2mem(E) virtio(E) snd_soc_core(E) ac97_bus(E) snd_pcm_dmaengine(E) snd_seq(E) leds_gpio(E) videobuf2_v4l2(E) videobuf2_core(E) snd_seq_device(E) snd_pcm(E) videodev(E) media(E) nvmem_qfprom(E) msm(E) snd_timer(E) snd(E) soundcore(E) spi_qup(E) mdt_loader(E) qcom_tsens(E) qcom_spmi_temp_alarm(E) nvmem_core(E) msm_rng(E) uas(E) usb_storage(E) dm9601(E) usbnet(E) mii(E) mmc_block(E) adv7511(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) fb_sys_fops(E) qcom_spmi_vadc(E) qcom_vadc_common(PE) industrialio(E) pinctrl_spmi_mpp(E)
         pinctrl_spmi_gpio(E) rtc_pm8xxx(E) clk_smd_rpm(E) sdhci_msm(E) sdhci_pltfm(E) qcom_smd_regulator(E) drm(E) smd_rpm(E) qcom_spmi_pmic(E) regmap_spmi(E) ci_hdrc_msm(E) ci_hdrc(E) usb3503(E) extcon_usb_gpio(E) phy_msm_usb(E) udc_core(E) qcom_hwspinlock(E) extcon_core(E) ehci_msm(E) i2c_qup(E) sdhci(E) mmc_core(E) spmi_pmic_arb(E) spmi(E) qcom_smd(E) smsm(E) rpmsg_core(E) smp2p(E) smem(E) hwspinlock_core(E) gpio_keys(E)
        CPU: 2 PID: 551 Comm: irq/150-venus Tainted: P            E   4.12.0+ #1625
        Hardware name: qualcomm dragonboard410c/dragonboard410c, BIOS 2017.07-rc2-00144-ga97bdbdf72-dirty 07/08/2017
        task: ffff800037338000 task.stack: ffff800038e00000
        PC is at hfi_sys_init_done+0x64/0x140 [venus_core]
        LR is at hfi_process_msg_packet+0xcc/0x1e8 [venus_core]
        pc : [<ffff00000118b384>] lr : [<ffff00000118c11c>] pstate: 20400145
        sp : ffff800038e03c60
        x29: ffff800038e03c60 x28: 0000000000000000
        x27: 00000000000df018 x26: ffff00000118f4d0
        x25: 0000000000020003 x24: ffff80003a8d3010
        x23: ffff00000118f760 x22: ffff800037b40028
        x21: ffff8000382981f0 x20: ffff800037b40028
        x19: ffff80003c039000 x18: 0000000000000020
        x17: 0000000000000000 x16: ffff800037338000
        x15: ffffffffffffffff x14: 0000001000000014
        x13: 0000000100001007 x12: 0000000100000020
        x11: 0000100e00000000 x10: 0000000000000001
        x9 : 0000000200000000 x8 : 0000001400000001
        x7 : 0000000000001010 x6 : 0000000000000148
        x5 : 0000000000001009 x4 : ffff80003c039000
        x3 : 00000000cd770abb x2 : 0000000000000042
        x1 : 0000000000000788 x0 : 0000000000000002
        Process irq/150-venus (pid: 551, stack limit = 0xffff800038e00000)
        Call trace:
        [<ffff00000118b384>] hfi_sys_init_done+0x64/0x140 [venus_core]
        [<ffff00000118c11c>] hfi_process_msg_packet+0xcc/0x1e8 [venus_core]
        [<ffff00000118a2b4>] venus_isr_thread+0x1b4/0x208 [venus_core]
        [<ffff00000118e750>] hfi_isr_thread+0x28/0x38 [venus_core]
        [<ffff000008161550>] irq_thread_fn+0x30/0x70
        [<ffff0000081617fc>] irq_thread+0x14c/0x1c8
        [<ffff000008105e68>] kthread+0x138/0x140
        [<ffff000008083590>] ret_from_fork+0x10/0x40
        Code: 52820125 52820207 7a431820 54000249 (b9400263)
        ---[ end trace c963460f20a984b6 ]---
      
      The problem is that in the error case, we've incremented the data ptr
      but not decremented rem_bytes, and keep reading (presumably garbage)
      until eventually we go beyond the end of the buffer.
      
      Instead, on first error, we should probably just bail out.  Other
      option is to increment read_bytes by sizeof(u32) before the switch,
      rather than only accounting for the ptype header in the non-error
      case.  Note that in this case it is HFI_ERR_SYS_INVALID_PARAMETER,
      ie. an unrecognized/unsupported parameter, so interpreting the next
      word as a property type would be bogus.  The other error cases are
      due to truncated buffer, so there isn't likely to be anything valid
      to interpret in the remainder of the buffer.  So just bailing seems
      like a reasonable solution.
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      Reviewed-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      3e7caae5
    • Arnd Bergmann's avatar
      media: venus: fix compile-test build on non-qcom ARM platform · b8f9bdc1
      Arnd Bergmann authored
      If QCOM_MDT_LOADER is enabled, but ARCH_QCOM is not, we run into
      a build error:
      
      ERROR: "qcom_mdt_load" [drivers/media/platform/qcom/venus/venus-core.ko] undefined!
      ERROR: "qcom_mdt_get_size" [drivers/media/platform/qcom/venus/venus-core.ko] undefined!
      
      This changes the 'select' statement again, so we only try to enable
      those symbols when the drivers will actually get built, and explicitly
      test for QCOM_MDT_LOADER to be enabled before calling into it.
      
      Fixes: 76724b30 ("[media] media: venus: enable building with COMPILE_TEST")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      b8f9bdc1
    • Arnd Bergmann's avatar
      media: venus: mark PM functions as __maybe_unused · eb918f91
      Arnd Bergmann authored
      Without PM support, gcc warns about two unused functions:
      
      platform/qcom/venus/core.c:146:13: error: 'venus_clks_disable' defined but not used [-Werror=unused-function]
      platform/qcom/venus/core.c:126:12: error: 'venus_clks_enable' defined but not used [-Werror=unused-function]
      
      The problem as usual are incorrect #ifdefs, so the easiest fix
      is to do away with the #ifdef completely and mark the suspend/resume
      handlers as __maybe_unused, which they are.
      
      Fixes: af2c3834 ("[media] media: venus: adding core part and helper functions")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      eb918f91
    • Hans Verkuil's avatar
      media: cec-notifier: small improvements · fc1ff45a
      Hans Verkuil authored
      Allow calling cec_notifier_set_phys_addr and
      cec_notifier_set_phys_addr_from_edid with a NULL notifier, in which
      case these functions do nothing.
      
      Add a cec_notifier_phys_addr_invalidate helper function (the notifier
      equivalent of cec_phys_addr_invalidate).
      
      These changes simplify drm CEC driver support.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      fc1ff45a
    • Hans Verkuil's avatar
      media: pulse8-cec: persistent_config should be off by default · 9b7c0c47
      Hans Verkuil authored
      The persistent_config option is used to make the CEC settings persistent by using
      the eeprom inside the device to store this information. This was on by default, which
      caused confusion since this device now behaves differently from other CEC devices
      which all come up unconfigured.
      
      Another reason for doing this now is that I hope a more standard way of selecting
      persistent configuration will be created in the future. And for that to work all
      CEC drivers should behave the same and come up unconfigured by default.
      
      None of the open source CEC applications are using this CEC framework at the moment
      so change this behavior before it is too late.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Cc: <stable@vger.kernel.org>      # for v4.10 and up
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      9b7c0c47
    • Hans Verkuil's avatar
      media: cec: cec_transmit_attempt_done: ignore CEC_TX_STATUS_MAX_RETRIES · bd34ca87
      Hans Verkuil authored
      The switch in cec_transmit_attempt_done() should ignore the
      CEC_TX_STATUS_MAX_RETRIES status bit.
      
      Calling this function with e.g. CEC_TX_STATUS_NACK | CEC_TX_STATUS_MAX_RETRIES
      is perfectly legal and should not trigger the WARN(1).
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      bd34ca87
    • Dan Carpenter's avatar
      media: staging: atomisp: array underflow in ioctl · f3aa6840
      Dan Carpenter authored
      I noticed an array underflow in ov5693_enum_frame_size().  The code
      looks like this:
      
      	int index = fse->index;
      
      	if (index >= N_RES)
      		retur -EINVAL;
      
      fse->index is a u32 that comes from the user.  We want negative values
      to be counted as -EINVAL but they aren't.  There are several ways to fix
      this but I feel like the best fix for future proofing is to change the
      type of N_RES from int to unsigned long to make it the same as if we
      were comparing against ARRAY_SIZE().
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      f3aa6840
    • Sean Young's avatar
      media: lirc: LIRC_GET_REC_RESOLUTION should return microseconds · 9f5039ba
      Sean Young authored
      Since commit e8f48188 ("[media] lirc: advertise
      LIRC_CAN_GET_REC_RESOLUTION and improve") lircd uses the ioctl
      LIRC_GET_REC_RESOLUTION to determine the shortest pulse or space that
      the hardware can detect. This breaks decoding in lirc because lircd
      expects the answer in microseconds, but nanoseconds is returned.
      
      Cc: <stable@vger.kernel.org> # v2.6.36+
      Reported-by: default avatarDerek <user.vdr@gmail.com>
      Tested-by: default avatarDerek <user.vdr@gmail.com>
      Signed-off-by: default avatarSean Young <sean@mess.org>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      9f5039ba
    • Mauro Carvalho Chehab's avatar
      media: svg: avoid too long lines · dd10be38
      Mauro Carvalho Chehab authored
      Sending patches with SVG files via e-mail has a drawback: line
      size could be bigger than 998, with is the limit given by
      RFC 5322[1]. So, we need to enforce a lower limit, in order to
      allow those patches to be properly reviewed.
      
      [1] https://tools.ietf.org/html/rfc5322#section-2.1.1
      
      So, use this small Perl script to limit columns size to ~900.
      
      use Text::Wrap;
      $Text::Wrap::columns = 900;
      
      $t.=$_ while (<>);
      
      print wrap("","",$t);
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      dd10be38
    • Mauro Carvalho Chehab's avatar
      media: svg files: simplify files · 86eaa804
      Mauro Carvalho Chehab authored
      Debian's ImageMagick is currently unable to decode those
      images. Use scour to simplify the SVG, and provide only
      one font type, in order to make it more palatable.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      86eaa804
    • Mauro Carvalho Chehab's avatar
      media: selection.svg: simplify the SVG file · 38f79cba
      Mauro Carvalho Chehab authored
      This file is too big, with cause it to require a lot
      of memory when parsed by texlive.
      
      Optimize it, in order to avoid the need of touching at
      main_memory at texmf.cnf.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      38f79cba
    • Javier Martinez Canillas's avatar
      media: vimc: set id_table for platform drivers · bf183e0f
      Javier Martinez Canillas authored
      The vimc platform drivers define a platform device ID table but these
      are not set to the .id_table field in the platform driver structure.
      
      So the platform device ID table is only used to fill the aliases in
      the module but are not used for matching (works because the platform
      subsystem fallbacks to the driver's name if no .id_table is set).
      
      But this also means that the platform device ID table isn't used if
      the driver is built-in, which leads to the following build warning:
      
      This causes the following build warnings when the driver is built-in:
      
      drivers/media/platform/vimc//vimc-capture.c:528:40: warning: ‘vimc_cap_driver_ids’ defined but not used [-Wunused-const-variable=]
       static const struct platform_device_id vimc_cap_driver_ids[] = {
                                              ^~~~~~~~~~~~~~~~~~~
      drivers/media/platform/vimc//vimc-debayer.c:588:40: warning: ‘vimc_deb_driver_ids’ defined but not used [-Wunused-const-variable=]
       static const struct platform_device_id vimc_deb_driver_ids[] = {
                                              ^~~~~~~~~~~~~~~~~~~
      drivers/media/platform/vimc//vimc-scaler.c:442:40: warning: ‘vimc_sca_driver_ids’ defined but not used [-Wunused-const-variable=]
       static const struct platform_device_id vimc_sca_driver_ids[] = {
                                              ^~~~~~~~~~~~~~~~~~~
      drivers/media/platform/vimc//vimc-sensor.c:376:40: warning: ‘vimc_sen_driver_ids’ defined but not used [-Wunused-const-variable=]
       static const struct platform_device_id vimc_sen_driver_ids[] = {
                                              ^~~~~~~~~~~~~~~~~~~
      Reported-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Suggested-by: default avatarSakari Ailus <sakari.ailus@iki.fi>
      Signed-off-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
      Reviewed-by: default avatarHelen Koike <helen.koike@collabora.com>
      Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      bf183e0f
  2. 17 Jul, 2017 3 commits
    • Mauro Carvalho Chehab's avatar
      media: staging: atomisp: disable warnings with cc-disable-warning · a1a0a56f
      Mauro Carvalho Chehab authored
      Instead of directly using -Wno-foo, use cc-disable-warning, as it
      checks if the compiler has the warnings we want to disable.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      a1a0a56f
    • Mauro Carvalho Chehab's avatar
      media: davinci: variable 'common' set but not used · 9a01968c
      Mauro Carvalho Chehab authored
      Get rid of those two warnings:
      drivers/media/platform/davinci/vpif_capture.c: In function 'vpif_remove':
      drivers/media/platform/davinci/vpif_capture.c:1722:21: warning: variable 'common' set but not used [-Wunused-but-set-variable]
        struct common_obj *common;
                           ^~~~~~
      drivers/media/platform/davinci/vpif_display.c: In function 'vpif_remove':
      drivers/media/platform/davinci/vpif_display.c:1342:21: warning: variable 'common' set but not used [-Wunused-but-set-variable]
        struct common_obj *common;
                           ^~~~~~
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      9a01968c
    • Mauro Carvalho Chehab's avatar
      Merge tag 'v4.13-rc1' into patchwork · a3db9d60
      Mauro Carvalho Chehab authored
      Linux v4.13-rc1
      
      * tag 'v4.13-rc1': (11136 commits)
        Linux v4.13-rc1
        random: reorder READ_ONCE() in get_random_uXX
        random: suppress spammy warnings about unseeded randomness
        replace incorrect strscpy use in FORTIFY_SOURCE
        kmod: throttle kmod thread limit
        kmod: add test driver to stress test the module loader
        MAINTAINERS: give kmod some maintainer love
        xtensa: use generic fb.h
        fault-inject: add /proc/<pid>/fail-nth
        fault-inject: simplify access check for fail-nth
        fault-inject: make fail-nth read/write interface symmetric
        fault-inject: parse as natural 1-based value for fail-nth write interface
        fault-inject: automatically detect the number base for fail-nth write interface
        kernel/watchdog.c: use better pr_fmt prefix
        MAINTAINERS: move the befs tree to kernel.org
        lib/atomic64_test.c: add a test that atomic64_inc_not_zero() returns an int
        mm: fix overflow check in expand_upwards()
        ubifs: Set double hash cookie also for RENAME_EXCHANGE
        ubifs: Massage assert in ubifs_xattr_set() wrt. init_xattrs
        ubifs: Don't leak kernel memory to the MTD
        ...
      a3db9d60
  3. 15 Jul, 2017 23 commits
    • Linus Torvalds's avatar
      Linux v4.13-rc1 · 5771a8c0
      Linus Torvalds authored
      5771a8c0
    • Linus Torvalds's avatar
      Merge tag 'standardize-docs' of git://git.lwn.net/linux · 486088bc
      Linus Torvalds authored
      Pull documentation format standardization from Jonathan Corbet:
       "This series converts a number of top-level documents to the RST format
        without incorporating them into the Sphinx tree. The hope is to bring
        some uniformity to kernel documentation and, perhaps more importantly,
        have our existing docs serve as an example of the desired formatting
        for those that will be added later.
      
        Mauro has gone through and fixed up a lot of top-level documentation
        files to make them conform to the RST format, but without moving or
        renaming them in any way. This will help when we incorporate the ones
        we want to keep into the Sphinx doctree, but the real purpose is to
        bring a bit of uniformity to our documentation and let the top-level
        docs serve as examples for those writing new ones"
      
      * tag 'standardize-docs' of git://git.lwn.net/linux: (84 commits)
        docs: kprobes.txt: Fix whitespacing
        tee.txt: standardize document format
        cgroup-v2.txt: standardize document format
        dell_rbu.txt: standardize document format
        zorro.txt: standardize document format
        xz.txt: standardize document format
        xillybus.txt: standardize document format
        vfio.txt: standardize document format
        vfio-mediated-device.txt: standardize document format
        unaligned-memory-access.txt: standardize document format
        this_cpu_ops.txt: standardize document format
        svga.txt: standardize document format
        static-keys.txt: standardize document format
        smsc_ece1099.txt: standardize document format
        SM501.txt: standardize document format
        siphash.txt: standardize document format
        sgi-ioc4.txt: standardize document format
        SAK.txt: standardize document format
        rpmsg.txt: standardize document format
        robust-futexes.txt: standardize document format
        ...
      486088bc
    • Linus Torvalds's avatar
      Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random · 52f6c588
      Linus Torvalds authored
      Pull random updates from Ted Ts'o:
       "Add wait_for_random_bytes() and get_random_*_wait() functions so that
        callers can more safely get random bytes if they can block until the
        CRNG is initialized.
      
        Also print a warning if get_random_*() is called before the CRNG is
        initialized. By default, only one single-line warning will be printed
        per boot. If CONFIG_WARN_ALL_UNSEEDED_RANDOM is defined, then a
        warning will be printed for each function which tries to get random
        bytes before the CRNG is initialized. This can get spammy for certain
        architecture types, so it is not enabled by default"
      
      * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random:
        random: reorder READ_ONCE() in get_random_uXX
        random: suppress spammy warnings about unseeded randomness
        random: warn when kernel uses unseeded randomness
        net/route: use get_random_int for random counter
        net/neighbor: use get_random_u32 for 32-bit hash random
        rhashtable: use get_random_u32 for hash_rnd
        ceph: ensure RNG is seeded before using
        iscsi: ensure RNG is seeded before use
        cifs: use get_random_u32 for 32-bit lock random
        random: add get_random_{bytes,u32,u64,int,long,once}_wait family
        random: add wait_for_random_bytes() API
      52f6c588
    • Linus Torvalds's avatar
      Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 78dcf734
      Linus Torvalds authored
      Pull ->s_options removal from Al Viro:
       "Preparations for fsmount/fsopen stuff (coming next cycle). Everything
        gets moved to explicit ->show_options(), killing ->s_options off +
        some cosmetic bits around fs/namespace.c and friends. Basically, the
        stuff needed to work with fsmount series with minimum of conflicts
        with other work.
      
        It's not strictly required for this merge window, but it would reduce
        the PITA during the coming cycle, so it would be nice to have those
        bits and pieces out of the way"
      
      * 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        isofs: Fix isofs_show_options()
        VFS: Kill off s_options and helpers
        orangefs: Implement show_options
        9p: Implement show_options
        isofs: Implement show_options
        afs: Implement show_options
        affs: Implement show_options
        befs: Implement show_options
        spufs: Implement show_options
        bpf: Implement show_options
        ramfs: Implement show_options
        pstore: Implement show_options
        omfs: Implement show_options
        hugetlbfs: Implement show_options
        VFS: Don't use save/replace_mount_options if not using generic_show_options
        VFS: Provide empty name qstr
        VFS: Make get_filesystem() return the affected filesystem
        VFS: Clean up whitespace in fs/namespace.c and fs/super.c
        Provide a function to create a NUL-terminated string from unterminated data
      78dcf734
    • Linus Torvalds's avatar
      Merge branch 'work.__copy_to_user' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 93ff8185
      Linus Torvalds authored
      Pull more __copy_.._user elimination from Al Viro.
      
      * 'work.__copy_to_user' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        drm_dp_aux_dev: switch to read_iter/write_iter
      93ff8185
    • Linus Torvalds's avatar
      Merge branch 'work.uaccess-unaligned' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 89cbec71
      Linus Torvalds authored
      Pull uacess-unaligned removal from Al Viro:
       "That stuff had just one user, and an exotic one, at that - binfmt_flat
        on arm and m68k"
      
      * 'work.uaccess-unaligned' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        kill {__,}{get,put}_user_unaligned()
        binfmt_flat: flat_{get,put}_addr_from_rp() should be able to fail
      89cbec71
    • Linus Torvalds's avatar
      Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 2173bd06
      Linus Torvalds authored
      Pull network field-by-field copy-in updates from Al Viro:
       "This part of the misc compat queue was held back for review from
        networking folks and since davem has jus ACKed those..."
      
      * 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        get_compat_bpf_fprog(): don't copyin field-by-field
        get_compat_msghdr(): get rid of field-by-field copyin
        copy_msghdr_from_user(): get rid of field-by-field copyin
      2173bd06
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 568d135d
      Linus Torvalds authored
      Pull MIPS updates from Ralf Baechle:
       "Boston platform support:
         - Document DT bindings
         - Add CLK driver for board clocks
      
        CM:
         - Avoid per-core locking with CM3 & higher
         - WARN on attempt to lock invalid VP, not BUG
      
        CPS:
         - Select CONFIG_SYS_SUPPORTS_SCHED_SMT for MIPSr6
         - Prevent multi-core with dcache aliasing
         - Handle cores not powering down more gracefully
         - Handle spurious VP starts more gracefully
      
        DSP:
         - Add lwx & lhx missaligned access support
      
        eBPF:
         - Add MIPS support along with many supporting change to add the
           required infrastructure
      
        Generic arch code:
         - Misc sysmips MIPS_ATOMIC_SET fixes
         - Drop duplicate HAVE_SYSCALL_TRACEPOINTS
         - Negate error syscall return in trace
         - Correct forced syscall errors
         - Traced negative syscalls should return -ENOSYS
         - Allow samples/bpf/tracex5 to access syscall arguments for sane
           traces
         - Cleanup from old Kconfig options in defconfigs
         - Fix PREF instruction usage by memcpy for MIPS R6
         - Fix various special cases in the FPU eulation
         - Fix some special cases in MIPS16e2 support
         - Fix MIPS I ISA /proc/cpuinfo reporting
         - Sort MIPS Kconfig alphabetically
         - Fix minimum alignment requirement of IRQ stack as required by
           ABI / GCC
         - Fix special cases in the module loader
         - Perform post-DMA cache flushes on systems with MAARs
         - Probe the I6500 CPU
         - Cleanup cmpxchg and add support for 1 and 2 byte operations
         - Use queued read/write locks (qrwlock)
         - Use queued spinlocks (qspinlock)
         - Add CPU shared FTLB feature detection
         - Handle tlbex-tlbp race condition
         - Allow storing pgd in C0_CONTEXT for MIPSr6
         - Use current_cpu_type() in m4kc_tlbp_war()
         - Support Boston in the generic kernel
      
        Generic platform:
         - yamon-dt: Pull YAMON DT shim code out of SEAD-3 board
         - yamon-dt: Support > 256MB of RAM
         - yamon-dt: Use serial* rather than uart* aliases
         - Abstract FDT fixup application
         - Set RTC_ALWAYS_BCD to 0
         - Add a MAINTAINERS entry
      
        core kernel:
         - qspinlock.c: include linux/prefetch.h
      
        Loongson 3:
         - Add support
      
        Perf:
         - Add I6500 support
      
        SEAD-3:
         - Remove GIC timer from DT
         - Set interrupt-parent per-device, not at root node
         - Fix GIC interrupt specifiers
      
        SMP:
         - Skip IPI setup if we only have a single CPU
      
        VDSO:
         - Make comment match reality
         - Improvements to time code in VDSO"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (86 commits)
        locking/qspinlock: Include linux/prefetch.h
        MIPS: Fix MIPS I ISA /proc/cpuinfo reporting
        MIPS: Fix minimum alignment requirement of IRQ stack
        MIPS: generic: Support MIPS Boston development boards
        MIPS: DTS: img: Don't attempt to build-in all .dtb files
        clk: boston: Add a driver for MIPS Boston board clocks
        dt-bindings: Document img,boston-clock binding
        MIPS: Traced negative syscalls should return -ENOSYS
        MIPS: Correct forced syscall errors
        MIPS: Negate error syscall return in trace
        MIPS: Drop duplicate HAVE_SYSCALL_TRACEPOINTS select
        MIPS16e2: Provide feature overrides for non-MIPS16 systems
        MIPS: MIPS16e2: Report ASE presence in /proc/cpuinfo
        MIPS: MIPS16e2: Subdecode extended LWSP/SWSP instructions
        MIPS: MIPS16e2: Identify ASE presence
        MIPS: VDSO: Fix a mismatch between comment and preprocessor constant
        MIPS: VDSO: Add implementation of gettimeofday() fallback
        MIPS: VDSO: Add implementation of clock_gettime() fallback
        MIPS: VDSO: Fix conversions in do_monotonic()/do_monotonic_coarse()
        MIPS: Use current_cpu_type() in m4kc_tlbp_war()
        ...
      568d135d
    • Linus Torvalds's avatar
      Merge branch 'for-linus-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · 4ecd4ff5
      Linus Torvalds authored
      Pull UML updates from Richard Weinberger:
       "Mostly fixes for UML:
      
         - First round of fixes for PTRACE_GETRESET/SETREGSET
      
         - A printf vs printk cleanup
      
         - Minor improvements"
      
      * 'for-linus-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        um: Correctly check for PTRACE_GETRESET/SETREGSET
        um: v2: Use generic NOTES macro
        um: Add kerneldoc for userspace_tramp() and start_userspace()
        um: Add kerneldoc for segv_handler
        um: stub-data.h: remove superfluous include
        um: userspace - be more verbose in ptrace set regs error
        um: add dummy ioremap and iounmap functions
        um: Allow building and running on older hosts
        um: Avoid longjmp/setjmp symbol clashes with libpthread.a
        um: console: Ignore console= option
        um: Use os_warn to print out pre-boot warning/error messages
        um: Add os_warn() for pre-boot warning/error messages
        um: Use os_info for the messages on normal path
        um: Add os_info() for pre-boot information messages
        um: Use printk instead of printf in make_uml_dir
      4ecd4ff5
    • Linus Torvalds's avatar
      Merge tag 'upstream-4.13-rc1' of git://git.infradead.org/linux-ubifs · 966859b9
      Linus Torvalds authored
      Pull UBIFS updates from Richard Weinberger:
      
       - Updates and fixes for the file encryption mode
      
       - Minor improvements
      
       - Random fixes
      
      * tag 'upstream-4.13-rc1' of git://git.infradead.org/linux-ubifs:
        ubifs: Set double hash cookie also for RENAME_EXCHANGE
        ubifs: Massage assert in ubifs_xattr_set() wrt. init_xattrs
        ubifs: Don't leak kernel memory to the MTD
        ubifs: Change gfp flags in page allocation for bulk read
        ubifs: Fix oops when remounting with no_bulk_read.
        ubifs: Fail commit if TNC is obviously inconsistent
        ubifs: allow userspace to map mounts to volumes
        ubifs: Wire-up statx() support
        ubifs: Remove dead code from ubifs_get_link()
        ubifs: Massage debug prints wrt. fscrypt
        ubifs: Add assert to dent_key_init()
        ubifs: Fix unlink code wrt. double hash lookups
        ubifs: Fix data node size for truncating uncompressed nodes
        ubifs: Don't encrypt special files on creation
        ubifs: Fix memory leak in RENAME_WHITEOUT error path in do_rename
        ubifs: Fix inode data budget in ubifs_mknod
        ubifs: Correctly evict xattr inodes
        ubifs: Unexport ubifs_inode_slab
        ubifs: don't bother checking for encryption key in ->mmap()
        ubifs: require key for truncate(2) of encrypted file
      966859b9
    • Linus Torvalds's avatar
      Merge tag 'kvm-4.13-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm · e37a07e0
      Linus Torvalds authored
      Pull more KVM updates from Radim Krčmář:
       "Second batch of KVM updates for v4.13
      
        Common:
         - add uevents for VM creation/destruction
         - annotate and properly access RCU-protected objects
      
        s390:
         - rename IOCTL added in the first v4.13 merge
      
        x86:
         - emulate VMLOAD VMSAVE feature in SVM
         - support paravirtual asynchronous page fault while nested
         - add Hyper-V userspace interfaces for better migration
         - improve master clock corner cases
         - extend internal error reporting after EPT misconfig
         - correct single-stepping of emulated instructions in SVM
         - handle MCE during VM entry
         - fix nVMX VM entry checks and nVMX VMCS shadowing"
      
      * tag 'kvm-4.13-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (28 commits)
        kvm: x86: hyperv: make VP_INDEX managed by userspace
        KVM: async_pf: Let guest support delivery of async_pf from guest mode
        KVM: async_pf: Force a nested vmexit if the injected #PF is async_pf
        KVM: async_pf: Add L1 guest async_pf #PF vmexit handler
        KVM: x86: Simplify kvm_x86_ops->queue_exception parameter list
        kvm: x86: hyperv: add KVM_CAP_HYPERV_SYNIC2
        KVM: x86: make backwards_tsc_observed a per-VM variable
        KVM: trigger uevents when creating or destroying a VM
        KVM: SVM: Enable Virtual VMLOAD VMSAVE feature
        KVM: SVM: Add Virtual VMLOAD VMSAVE feature definition
        KVM: SVM: Rename lbr_ctl field in the vmcb control area
        KVM: SVM: Prepare for new bit definition in lbr_ctl
        KVM: SVM: handle singlestep exception when skipping emulated instructions
        KVM: x86: take slots_lock in kvm_free_pit
        KVM: s390: Fix KVM_S390_GET_CMMA_BITS ioctl definition
        kvm: vmx: Properly handle machine check during VM-entry
        KVM: x86: update master clock before computing kvmclock_offset
        kvm: nVMX: Shadow "high" parts of shadowed 64-bit VMCS fields
        kvm: nVMX: Fix nested_vmx_check_msr_bitmap_controls
        kvm: nVMX: Validate the I/O bitmaps on nested VM-entry
        ...
      e37a07e0
    • Sebastian Andrzej Siewior's avatar
      random: reorder READ_ONCE() in get_random_uXX · 72e5c740
      Sebastian Andrzej Siewior authored
      Avoid the READ_ONCE in commit 4a072c71 ("random: silence compiler
      warnings and fix race") if we can leave the function after
      arch_get_random_XXX().
      
      Cc: Jason A. Donenfeld <Jason@zx2c4.com>
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      72e5c740
    • Theodore Ts'o's avatar
      random: suppress spammy warnings about unseeded randomness · eecabf56
      Theodore Ts'o authored
      Unfortunately, on some models of some architectures getting a fully
      seeded CRNG is extremely difficult, and so this can result in dmesg
      getting spammed for a surprisingly long time.  This is really bad from
      a security perspective, and so architecture maintainers really need to
      do what they can to get the CRNG seeded sooner after the system is
      booted.  However, users can't do anything actionble to address this,
      and spamming the kernel messages log will only just annoy people.
      
      For developers who want to work on improving this situation,
      CONFIG_WARN_UNSEEDED_RANDOM has been renamed to
      CONFIG_WARN_ALL_UNSEEDED_RANDOM.  By default the kernel will always
      print the first use of unseeded randomness.  This way, hopefully the
      security obsessed will be happy that there is _some_ indication when
      the kernel boots there may be a potential issue with that architecture
      or subarchitecture.  To see all uses of unseeded randomness,
      developers can enable CONFIG_WARN_ALL_UNSEEDED_RANDOM.
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      eecabf56
    • Linus Torvalds's avatar
      Merge tag 'xfs-4.13-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · a80099a1
      Linus Torvalds authored
      Pull XFS fixes from Darrick Wong:
       "Largely debugging and regression fixes.
      
         - Add some locking assertions for the _ilock helpers.
      
         - Revert the XFS_QMOPT_NOLOCK patch; after discussion with hch the
           online fsck patch that would have needed it has been redesigned and
           no longer needs it.
      
         - Fix behavioral regression of SEEK_HOLE/DATA with negative offsets
           to match 4.12-era XFS behavior"
      
      * tag 'xfs-4.13-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        vfs: in iomap seek_{hole,data}, return -ENXIO for negative offsets
        Revert "xfs: grab dquots without taking the ilock"
        xfs: assert locking precondition in xfs_readlink_bmap_ilocked
        xfs: assert locking precondіtion in xfs_attr_list_int_ilocked
        xfs: fixup xfs_attr_get_ilocked
      a80099a1
    • Linus Torvalds's avatar
      Merge branch 'for-4.13-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · bc243704
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "We've identified and fixed a silent corruption (introduced by code in
        the first pull), a fixup after the blk_status_t merge and two fixes to
        incremental send that Filipe has been hunting for some time"
      
      * 'for-4.13-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        Btrfs: fix unexpected return value of bio_readpage_error
        btrfs: btrfs_create_repair_bio never fails, skip error handling
        btrfs: cloned bios must not be iterated by bio_for_each_segment_all
        Btrfs: fix write corruption due to bio cloning on raid5/6
        Btrfs: incremental send, fix invalid memory access
        Btrfs: incremental send, fix invalid path for link commands
      bc243704
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 0ffff118
      Linus Torvalds authored
      Pull a few more input updates from Dmitry Torokhov:
      
       - multi-touch handling for Xen
      
       - fix for long-standing bug causing crashes in i8042 on boot
      
       - change to gpio_keys to better handle key presses during system state
         transition
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: i8042 - fix crash at boot time
        Input: gpio_keys - handle the missing key press event in resume phase
        Input: xen-kbdfront - add multi-touch support
      0ffff118
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · dcf903d0
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
      
       - fix new compiler warnings in cavium
      
       - set post-op IV properly in caam (this fixes chaining)
      
       - fix potential use-after-free in atmel in case of EBUSY
      
       - fix sleeping in softirq path in chcr
      
       - disable buggy sha1-avx2 driver (may overread and page fault)
      
       - fix use-after-free on signals in caam
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: cavium - make several functions static
        crypto: chcr - Avoid algo allocation in softirq.
        crypto: caam - properly set IV after {en,de}crypt
        crypto: atmel - only treat EBUSY as transient if backlog
        crypto: af_alg - Avoid sock_graft call warning
        crypto: caam - fix signals handling
        crypto: sha1-ssse3 - Disable avx2
      dcf903d0
    • Linus Torvalds's avatar
      Merge tag 'devprop-fix-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 96d0d831
      Linus Torvalds authored
      Pull device properties framework fix from Rafael Wysocki:
       "This fixes a problem with bool properties that could be seen as "true"
        when the property was not present at all by adding a special helper
        for bool properties with checks for all of the requisute conditions
        (Sakari Ailus)"
      
      * tag 'devprop-fix-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        device property: Introduce fwnode_call_bool_op() for ops that return bool
      96d0d831
    • Linus Torvalds's avatar
      Merge tag 'acpi-fixes-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 1ef27400
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These fix the return value of an IRQ mapping routine in the ACPI core,
        fix an EC driver issue causing abnormal fan behavior after system
        resume on some systems and add quirks for ACPI device objects that
        need to be treated as "always present" to work around bogus
        implementations of the _STA control method.
      
        Specifics:
      
         - Fix the return value of acpi_gsi_to_irq() to make the GSI to IRQ
           mapping work on the Mustang (ARM64) platform (Mark Salter).
      
         - Fix an EC driver issue that causes fans to behave abnormally after
           system resume on some systems which turns out to be related to
           switching over the EC into the polling mode during the noirq stages
           of system suspend and resume (Lv Zheng).
      
         - Add quirks for ACPI device objects that need to be treated as
           "always present", because their _STA methods are designed to work
           around Windows driver bugs and return garbage from our perspective
           (Hans de Goede)"
      
      * tag 'acpi-fixes-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / x86: Add KIOX000A accelerometer on GPD win to always_present_ids array
        ACPI / x86: Add Dell Venue 11 Pro 7130 touchscreen to always_present_ids
        ACPI / x86: Allow matching always_present_id array entries by DMI
        Revert "ACPI / EC: Enable event freeze mode..." to fix a regression
        ACPI / EC: Drop EC noirq hooks to fix a regression
        ACPI / irq: Fix return code of acpi_gsi_to_irq()
      1ef27400
    • Linus Torvalds's avatar
      Merge tag 'pm-fixes-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · e37720e2
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These fix a recently exposed issue in the PCI device wakeup code and
        one older problem related to PCI device wakeup that has been reported
        recently, modify one more piece of computations in intel_pstate to get
        rid of a rounding error, fix a possible race in the schedutil cpufreq
        governor, fix the device PM QoS sysfs interface to correctly handle
        invalid user input, fix return values of two probe routines in devfreq
        drivers and constify an attribute_group structure in devfreq.
      
        Specifics:
      
         - Avoid clearing the PCI PME Enable bit for devices as a result of
           config space restoration which confuses AML executed afterward and
           causes wakeup events to be lost on some systems (Rafael Wysocki).
      
         - Fix the native PCIe PME interrupts handling in the cases when the
           PME IRQ is set up as a system wakeup one so that runtime PM remote
           wakeup works as expected after system resume on systems where that
           happens (Rafael Wysocki).
      
         - Fix the device PM QoS sysfs interface to handle invalid user input
           correctly instead of using an unititialized variable value as the
           latency tolerance for the device at hand (Dan Carpenter).
      
         - Get rid of one more rounding error from intel_pstate computations
           (Srinivas Pandruvada).
      
         - Fix the schedutil cpufreq governor to prevent it from possibly
           accessing unititialized data structures from governor callbacks in
           some cases on systems when multiple CPUs share a single cpufreq
           policy object (Vikram Mulukutla).
      
         - Fix the return values of probe routines in two devfreq drivers
           (Gustavo Silva).
      
         - Constify an attribute_group structure in devfreq (Arvind Yadav)"
      
      * tag 'pm-fixes-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PCI / PM: Fix native PME handling during system suspend/resume
        PCI / PM: Restore PME Enable after config space restoration
        cpufreq: schedutil: Fix sugov_start() versus sugov_update_shared() race
        PM / QoS: return -EINVAL for bogus strings
        cpufreq: intel_pstate: Fix ratio setting for min_perf_pct
        PM / devfreq: constify attribute_group structures.
        PM / devfreq: tegra: fix error return code in tegra_devfreq_probe()
        PM / devfreq: rk3399_dmc: fix error return code in rk3399_dmcfreq_probe()
      e37720e2
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 867eacd7
      Linus Torvalds authored
      Merge even more updates from Andrew Morton:
      
       - a few leftovers
      
       - fault-injector rework
      
       - add a module loader test driver
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        kmod: throttle kmod thread limit
        kmod: add test driver to stress test the module loader
        MAINTAINERS: give kmod some maintainer love
        xtensa: use generic fb.h
        fault-inject: add /proc/<pid>/fail-nth
        fault-inject: simplify access check for fail-nth
        fault-inject: make fail-nth read/write interface symmetric
        fault-inject: parse as natural 1-based value for fail-nth write interface
        fault-inject: automatically detect the number base for fail-nth write interface
        kernel/watchdog.c: use better pr_fmt prefix
        MAINTAINERS: move the befs tree to kernel.org
        lib/atomic64_test.c: add a test that atomic64_inc_not_zero() returns an int
        mm: fix overflow check in expand_upwards()
      867eacd7
    • Daniel Micay's avatar
      replace incorrect strscpy use in FORTIFY_SOURCE · 077d2ba5
      Daniel Micay authored
      Using strscpy was wrong because FORTIFY_SOURCE is passing the maximum
      possible size of the outermost object, but strscpy defines the count
      parameter as the exact buffer size, so this could copy past the end of
      the source.  This would still be wrong with the planned usage of
      __builtin_object_size(p, 1) for intra-object overflow checks since it's
      the maximum possible size of the specified object with no guarantee of
      it being that large.
      
      Reuse of the fortified functions like this currently makes the runtime
      error reporting less precise but that can be improved later on.
      
      Noticed by Dave Jones and KASAN.
      Signed-off-by: default avatarDaniel Micay <danielmicay@gmail.com>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Reported-by: default avatarDave Jones <davej@codemonkey.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      077d2ba5
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · 01ea9177
      Linus Torvalds authored
      Pull arch/tile updates from Chris Metcalf:
       "This adds support for an <arch/intreg.h> to help with removing
        __need_xxx #defines from glibc, and removes some dead code in
        arch/tile/mm/init.c"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
        mm, tile: drop arch_{add,remove}_memory
        tile: prefer <arch/intreg.h> to __need_int_reg_t
      01ea9177