18 Mar, 2020

1 commit

  • The TX/RX register should not be treated the same way to allow for better
    support of tuning. Fix this by using a default initial value for TX.

    Signed-off-by: Ricky Wu
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20200316025232.1167-1-ricky_wu@realtek.com
    [Ulf: Updated changelog]
    Signed-off-by: Ulf Hansson
    Acked-by: Greg Kroah-Hartman

    Ricky Wu
     

12 Mar, 2020

1 commit

  • The at24 driver attempts to read a byte from the device to validate that
    it's actually present, and if not, disables the vcc regulator and
    returns -ENODEV. However, between the read and the error handling path,
    pm_runtime_idle() is called and invokes the driver's suspend callback,
    which also disables the vcc regulator. This leads to an underflow of the
    regulator enable count if the EEPROM is not present.

    Move the pm_runtime_suspend() call to be after the error handling path
    to resolve this.

    Fixes: cd5676db0574 ("misc: eeprom: at24: support pm_runtime control")
    Signed-off-by: Michael Auchter
    Signed-off-by: Bartosz Golaszewski

    Michael Auchter
     

03 Mar, 2020

1 commit

  • altera_get_note is called from altera_init, where key is kzalloc(33).

    When the allocation functions are annotated to allow the compiler to see
    the sizes of objects, and with FORTIFY_SOURCE, we see:

    In file included from drivers/misc/altera-stapl/altera.c:14:0:
    In function ‘strlcpy’,
    inlined from ‘altera_init’ at drivers/misc/altera-stapl/altera.c:2189:5:
    include/linux/string.h:378:4: error: call to ‘__write_overflow’ declared with attribute error: detected write beyond size of object passed as 1st parameter
    __write_overflow();
    ^~~~~~~~~~~~~~~~~~

    That refers to this code in altera_get_note:

    if (key != NULL)
    strlcpy(key, &p[note_strings +
    get_unaligned_be32(
    &p[note_table + (8 * i)])],
    length);

    The error triggers because the length of 'key' is 33, but the copy
    uses length supplied as the 'length' parameter, which is always
    256. Split the size parameter into key_len and val_len, and use the
    appropriate length depending on what is being copied.

    Detected by compiler error, only compile-tested.

    Cc: "Igor M. Liplianin"
    Signed-off-by: Daniel Axtens
    Link: https://lore.kernel.org/r/20200120074344.504-2-dja@axtens.net
    Signed-off-by: Kees Cook
    Link: https://lore.kernel.org/r/202002251042.D898E67AC@keescook
    Signed-off-by: Greg Kroah-Hartman

    Daniel Axtens
     

11 Feb, 2020

3 commits

  • During device memory memset, the driver allocates and use a CB (command
    buffer). To reuse existing code, it keeps a pointer to the CB in two
    variables, user_cb and patched_cb. Therefore, there is no need to "put"
    both the user_cb and patched_cb, as it will cause an underflow of the
    refcnt of the CB.

    Signed-off-by: Oded Gabbay

    Oded Gabbay
     
  • During hard reset we must not write to the device.
    Hence avoid halting CoreSight during user context close if it is done
    during hard reset.
    In addition, we must not re-enable clock gating afterwards as it was
    deliberately disabled in the beginning of the hard reset flow.

    Signed-off-by: Omer Shpigelman
    Reviewed-by: Oded Gabbay
    Signed-off-by: Oded Gabbay

    Omer Shpigelman
     
  • The driver must halt the engines before doing hard-reset, otherwise the
    device can go into undefined state. There is a place where the driver
    didn't do that and this patch fixes it.

    Reviewed-by: Tomer Tayar
    Signed-off-by: Oded Gabbay

    Oded Gabbay
     

08 Feb, 2020

1 commit

  • Pull i2c updates from Wolfram Sang:
    "i2c core:

    - huge improvements and refactorizations of the Linux I2C
    documentation (lots of thanks to Luca for doing it and Jean for the
    careful review)

    - subsystem wide API conversion to i2c_new_client_device()

    - remove obsolete parport-light driver

    - smaller core updates (removal of 'extern', enabling more compile
    testing, use more helper macros)

    - and quite a bunch of driver updates (new IDs, simplifications,
    better PM, support of atomic transfers and other improvements)

    i2c-mux:

    - The main feature is the idle-state rework of the pca954x driver
    from Biwen Li

    at24 driver:

    - minor maintenance: update the license tag, sort headers

    - move support for the write-protect pin into nvmem core

    - add a reference to the new wp-gpios property in nvmem to at25
    bindings

    - add support for regulator and pm_runtime control"

    * 'i2c/for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (91 commits)
    i2c: cros-ec-tunnel: Fix ACPI identifier
    i2c: cros-ec-tunnel: Fix slave device enumeration
    i2c: stm32f7: add PM_SLEEP suspend/resume support
    i2c: cadence: Fix wording in i2c-cadence driver
    i2c: cadence: Fix power management order of operations
    i2c: cadence: Fix error printing in case of defer
    i2c: cadence: Handle transfer_size rollover
    i2c: i801: Add support for Intel Comet Lake PCH-V
    docs: i2c: writing-clients: properly name the stop condition
    docs: i2c: i2c-protocol: use same wording as smbus-protocol
    docs: i2c: rename sections so the overall picture is clearer
    docs: i2c: old-module-parameters: use monospace instead of ""
    docs: i2c: old-module-parameters: clarify this is for obsolete kernels
    docs: i2c: old-module-parameters: fix internal hyperlink
    docs: i2c: instantiating-devices: use monospace for sysfs attributes
    docs: i2c: instantiating-devices: rearrange static instatiation
    docs: i2c: instantiating-devices: fix internal hyperlink
    docs: i2c: smbus-protocol: improve I2C Block transactions description
    docs: i2c: smbus-protocol: fix punctuation
    docs: i2c: smbus-protocol: fix typo
    ...

    Linus Torvalds
     

04 Feb, 2020

2 commits

  • Pull powerpc updates from Michael Ellerman:
    "A pretty small batch for us, and apologies for it being a bit late, I
    wanted to sneak Christophe's user_access_begin() series in.

    Summary:

    - Implement user_access_begin() and friends for our platforms that
    support controlling kernel access to userspace.

    - Enable CONFIG_VMAP_STACK on 32-bit Book3S and 8xx.

    - Some tweaks to our pseries IOMMU code to allow SVMs ("secure"
    virtual machines) to use the IOMMU.

    - Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE to the 32-bit
    VDSO, and some other improvements.

    - A series to use the PCI hotplug framework to control opencapi
    card's so that they can be reset and re-read after flashing a new
    FPGA image.

    As well as other minor fixes and improvements as usual.

    Thanks to: Alastair D'Silva, Alexandre Ghiti, Alexey Kardashevskiy,
    Andrew Donnellan, Aneesh Kumar K.V, Anju T Sudhakar, Bai Yingjie, Chen
    Zhou, Christophe Leroy, Frederic Barrat, Greg Kurz, Jason A.
    Donenfeld, Joel Stanley, Jordan Niethe, Julia Lawall, Krzysztof
    Kozlowski, Laurent Dufour, Laurentiu Tudor, Linus Walleij, Michael
    Bringmann, Nathan Chancellor, Nicholas Piggin, Nick Desaulniers,
    Oliver O'Halloran, Peter Ujfalusi, Pingfan Liu, Ram Pai, Randy Dunlap,
    Russell Currey, Sam Bobroff, Sebastian Andrzej Siewior, Shawn
    Anastasio, Stephen Rothwell, Steve Best, Sukadev Bhattiprolu, Thiago
    Jung Bauermann, Tyrel Datwyler, Vaibhav Jain"

    * tag 'powerpc-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (131 commits)
    powerpc: configs: Cleanup old Kconfig options
    powerpc/configs/skiroot: Enable some more hardening options
    powerpc/configs/skiroot: Disable xmon default & enable reboot on panic
    powerpc/configs/skiroot: Enable security features
    powerpc/configs/skiroot: Update for symbol movement only
    powerpc/configs/skiroot: Drop default n CONFIG_CRYPTO_ECHAINIV
    powerpc/configs/skiroot: Drop HID_LOGITECH
    powerpc/configs: Drop NET_VENDOR_HP which moved to staging
    powerpc/configs: NET_CADENCE became NET_VENDOR_CADENCE
    powerpc/configs: Drop CONFIG_QLGE which moved to staging
    powerpc: Do not consider weak unresolved symbol relocations as bad
    powerpc/32s: Fix kasan_early_hash_table() for CONFIG_VMAP_STACK
    powerpc: indent to improve Kconfig readability
    powerpc: Provide initial documentation for PAPR hcalls
    powerpc: Implement user_access_save() and user_access_restore()
    powerpc: Implement user_access_begin and friends
    powerpc/32s: Prepare prevent_user_access() for user_access_end()
    powerpc/32s: Drop NULL addr verification
    powerpc/kuap: Fix set direction in allow/prevent_user_access()
    powerpc/32s: Fix bad_kuap_fault()
    ...

    Linus Torvalds
     
  • The most notable change is DEFINE_SHOW_ATTRIBUTE macro split in
    seq_file.h.

    Conversion rule is:

    llseek => proc_lseek
    unlocked_ioctl => proc_ioctl

    xxx => proc_xxx

    delete ".owner = THIS_MODULE" line

    [akpm@linux-foundation.org: fix drivers/isdn/capi/kcapi_proc.c]
    [sfr@canb.auug.org.au: fix kernel/sched/psi.c]
    Link: http://lkml.kernel.org/r/20200122180545.36222f50@canb.auug.org.au
    Link: http://lkml.kernel.org/r/20191225172546.GB13378@avx2
    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

01 Feb, 2020

1 commit


31 Jan, 2020

1 commit

  • Pull drm updates from Davbe Airlie:
    "This is the main pull request for graphics for 5.6. Usual selection of
    changes all over.

    I've got one outstanding vmwgfx pull that touches mm so kept it
    separate until after all of this lands. I'll try and get it to you
    soon after this, but it might be early next week (nothing wrong with
    code, just my schedule is messy)

    This also hits a lot of fbdev drivers with some cleanups.

    Other notables:
    - vulkan timeline semaphore support added to syncobjs
    - nouveau turing secureboot/graphics support
    - Displayport MST display stream compression support

    Detailed summary:

    uapi:
    - dma-buf heaps added (and fixed)
    - command line add support for panel oreientation
    - command line allow overriding penguin count

    drm:
    - mipi dsi definition updates
    - lockdep annotations for dma_resv
    - remove dma-buf kmap/kunmap support
    - constify fb_ops in all fbdev drivers
    - MST fix for daisy chained hotplug-
    - CTA-861-G modes with VIC >= 193 added
    - fix drm_panel_of_backlight export
    - LVDS decoder support
    - more device based logging support
    - scanline alighment for dumb buffers
    - MST DSC helpers

    scheduler:
    - documentation fixes
    - job distribution improvements

    panel:
    - Logic PD type 28 panel support
    - Jimax8729d MIPI-DSI
    - igenic JZ4770
    - generic DSI devicetree bindings
    - sony acx424AKP panel
    - Leadtek LTK500HD1829
    - xinpeng XPP055C272
    - AUO B116XAK01
    - GiantPlus GPM940B0
    - BOE NV140FHM-N49
    - Satoz SAT050AT40H12R2
    - Sharp LS020B1DD01D panels.

    ttm:
    - use blocking WW lock

    i915:
    - hw/uapi state separation
    - Lock annotation improvements
    - selftest improvements
    - ICL/TGL DSI VDSC support
    - VBT parsing improvments
    - Display refactoring
    - DSI updates + fixes
    - HDCP 2.2 for CFL
    - CML PCI ID fixes
    - GLK+ fbc fix
    - PSR fixes
    - GEN/GT refactor improvments
    - DP MST fixes
    - switch context id alloc to xarray
    - workaround updates
    - LMEM debugfs support
    - tiled monitor fixes
    - ICL+ clock gating programming removed
    - DP MST disable sequence fixed
    - LMEM discontiguous object maps
    - prefaulting for discontiguous objects
    - use LMEM for dumb buffers if possible
    - add LMEM mmap support

    amdgpu:
    - enable sync object timelines for vulkan
    - MST atomic routines
    - enable MST DSC support
    - add DMCUB display microengine support
    - DC OEM i2c support
    - Renoir DC fixes
    - Initial HDCP 2.x support
    - BACO support for Arcturus
    - Use BACO for runtime PM power save
    - gfxoff on navi10
    - gfx10 golden updates and fixes
    - DCN support on POWER
    - GFXOFF for raven1 refresh
    - MM engine idle handlers cleanup
    - 10bpc EDP panel fixes
    - renoir watermark fixes
    - SR-IOV fixes
    - Arcturus VCN fixes
    - GDDR6 training fixes
    - freesync fixes
    - Pollock support

    amdkfd:
    - unify more codepath with amdgpu
    - use KIQ to setup HIQ rather than MMIO

    radeon:
    - fix vma fault handler race
    - PPC DMA fix
    - register check fixes for r100/r200

    nouveau:
    - mmap_sem vs dma_resv fix
    - rewrite the ACR secure boot code for Turing
    - TU10x graphics engine support (TU11x pending)
    - Page kind mapping for turing
    - 10-bit LUT support
    - GP10B Tegra fixes
    - HD audio regression fix

    hisilicon/hibmc:
    - use generic fbdev code and helpers

    rockchip:
    - dsi/px30 support

    virtio:
    - fb damage support
    - static some functions

    vc4:
    - use dma_resv lock wrappers

    msm:
    - use dma_resv lock wrappers
    - sc7180 display + DSI support
    - a618 support
    - UBWC support improvements

    vmwgfx:
    - updates + new logging uapi

    exynos:
    - enable/disable callback cleanups

    etnaviv:
    - use dma_resv lock wrappers

    atmel-hlcdc:
    - clock fixes

    mediatek:
    - cmdq support
    - non-smooth cursor fixes
    - ctm property support

    sun4i:
    - suspend support
    - A64 mipi dsi support

    rcar-du:
    - Color management module support
    - LVDS encoder dual-link support
    - R8A77980 support

    analogic:
    - add support for an6345

    ast:
    - atomic modeset support
    - primary plane garbage fix

    arcgpu:
    - fixes for fourcc handling

    tegra:
    - minor fixes and improvments

    mcde:
    - vblank support

    meson:
    - OSD1 plane AFBC commit

    gma500:
    - add pageflip support
    - reomve global drm_dev

    komeda:
    - tweak debugfs output
    - d32 support
    - runtime PM suppotr

    udl:
    - use generic shmem helpers
    - cleanup and fixes"

    * tag 'drm-next-2020-01-30' of git://anongit.freedesktop.org/drm/drm: (1998 commits)
    drm/nouveau/fb/gp102-: allow module to load even when scrubber binary is missing
    drm/nouveau/acr: return error when registering LSF if ACR not supported
    drm/nouveau/disp/gv100-: not all channel types support reporting error codes
    drm/nouveau/disp/nv50-: prevent oops when no channel method map provided
    drm/nouveau: support synchronous pushbuf submission
    drm/nouveau: signal pending fences when channel has been killed
    drm/nouveau: reject attempts to submit to dead channels
    drm/nouveau: zero vma pointer even if we only unreference it rather than free
    drm/nouveau: Add HD-audio component notifier support
    drm/nouveau: fix build error without CONFIG_IOMMU_API
    drm/nouveau/kms/nv04: remove set but not used variable 'width'
    drm/nouveau/kms/nv50: remove set but not unused variable 'nv_connector'
    drm/nouveau/mmu: fix comptag memory leak
    drm/nouveau/gr/gp10b: Use gp100_grctx and gp100_gr_zbc
    drm/nouveau/pmu/gm20b,gp10b: Fix Falcon bootstrapping
    drm/exynos: Rename Exynos to lowercase
    drm/exynos: change callback names
    drm/mst: Don't do atomic checks over disabled managers
    drm/amdgpu: add the lost mutex_init back
    drm/amd/display: skip opp blank or unblank if test pattern enabled
    ...

    Linus Torvalds
     

30 Jan, 2020

2 commits

  • …it/brgl/linux into i2c/for-5.6

    at24 updates for linux v5.6

    - minor maintenance: update the license tag, sort headers
    - move support for the write-protect pin into nvmem core
    - add a reference to the new wp-gpios property in nvmem to at25 bindings
    - add support for regulator and pm_runtime control

    Wolfram Sang
     
  • Pull char/misc driver updates from Greg KH:
    "Here is the big char/misc/whatever driver changes for 5.6-rc1

    Included in here are loads of things from a variety of different
    driver subsystems:
    - soundwire updates
    - binder updates
    - nvmem updates
    - firmware drivers updates
    - extcon driver updates
    - various misc driver updates
    - fpga driver updates
    - interconnect subsystem and driver updates
    - bus driver updates
    - uio driver updates
    - mei driver updates
    - w1 driver cleanups
    - various other small driver updates

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'char-misc-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (86 commits)
    mei: me: add jasper point DID
    char: hpet: Use flexible-array member
    binder: fix log spam for existing debugfs file creation.
    mei: me: add comet point (lake) H device ids
    nvmem: add QTI SDAM driver
    dt-bindings: nvmem: add binding for QTI SPMI SDAM
    dt-bindings: imx-ocotp: Add i.MX8MP compatible
    dt-bindings: soundwire: fix example
    soundwire: cadence: fix kernel-doc parameter descriptions
    soundwire: intel: report slave_ids for each link to SOF driver
    siox: Use the correct style for SPDX License Identifier
    w1: omap-hdq: Simplify driver with PM runtime autosuspend
    firmware: stratix10-svc: Remove unneeded semicolon
    firmware: google: Probe for a GSMI handler in firmware
    firmware: google: Unregister driver_info on failure and exit in gsmi
    firmware: google: Release devices before unregistering the bus
    slimbus: qcom: add missed clk_disable_unprepare in remove
    slimbus: Use the correct style for SPDX License Identifier
    slimbus: qcom-ngd-ctrl: Use dma_request_chan() instead dma_request_slave_channel()
    dt-bindings: SLIMBus: add slim devices optional properties
    ...

    Linus Torvalds
     

29 Jan, 2020

2 commits

  • Pull networking updates from David Miller:

    1) Add WireGuard

    2) Add HE and TWT support to ath11k driver, from John Crispin.

    3) Add ESP in TCP encapsulation support, from Sabrina Dubroca.

    4) Add variable window congestion control to TIPC, from Jon Maloy.

    5) Add BCM84881 PHY driver, from Russell King.

    6) Start adding netlink support for ethtool operations, from Michal
    Kubecek.

    7) Add XDP drop and TX action support to ena driver, from Sameeh
    Jubran.

    8) Add new ipv4 route notifications so that mlxsw driver does not have
    to handle identical routes itself. From Ido Schimmel.

    9) Add BPF dynamic program extensions, from Alexei Starovoitov.

    10) Support RX and TX timestamping in igc, from Vinicius Costa Gomes.

    11) Add support for macsec HW offloading, from Antoine Tenart.

    12) Add initial support for MPTCP protocol, from Christoph Paasch,
    Matthieu Baerts, Florian Westphal, Peter Krystad, and many others.

    13) Add Octeontx2 PF support, from Sunil Goutham, Geetha sowjanya, Linu
    Cherian, and others.

    * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1469 commits)
    net: phy: add default ARCH_BCM_IPROC for MDIO_BCM_IPROC
    udp: segment looped gso packets correctly
    netem: change mailing list
    qed: FW 8.42.2.0 debug features
    qed: rt init valid initialization changed
    qed: Debug feature: ilt and mdump
    qed: FW 8.42.2.0 Add fw overlay feature
    qed: FW 8.42.2.0 HSI changes
    qed: FW 8.42.2.0 iscsi/fcoe changes
    qed: Add abstraction for different hsi values per chip
    qed: FW 8.42.2.0 Additional ll2 type
    qed: Use dmae to write to widebus registers in fw_funcs
    qed: FW 8.42.2.0 Parser offsets modified
    qed: FW 8.42.2.0 Queue Manager changes
    qed: FW 8.42.2.0 Expose new registers and change windows
    qed: FW 8.42.2.0 Internal ram offsets modifications
    MAINTAINERS: Add entry for Marvell OcteonTX2 Physical Function driver
    Documentation: net: octeontx2: Add RVU HW and drivers overview
    octeontx2-pf: ethtool RSS config support
    octeontx2-pf: Add basic ethtool support
    ...

    Linus Torvalds
     
  • Pull header cleanup from Ingo Molnar:
    "This is a treewide cleanup, mostly (but not exclusively) with x86
    impact, which breaks implicit dependencies on the asm/realtime.h
    header and finally removes it from asm/acpi.h"

    * 'core-headers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/ACPI/sleep: Move acpi_get_wakeup_address() into sleep.c, remove from
    ACPI/sleep: Convert acpi_wakeup_address into a function
    x86/ACPI/sleep: Remove an unnecessary include of asm/realmode.h
    ASoC: Intel: Skylake: Explicitly include linux/io.h for virt_to_phys()
    vmw_balloon: Explicitly include linux/io.h for virt_to_phys()
    virt: vbox: Explicitly include linux/io.h to pick up various defs
    efi/capsule-loader: Explicitly include linux/io.h for page_to_phys()
    perf/x86/intel: Explicitly include asm/io.h to use virt_to_phys()
    x86/kprobes: Explicitly include vmalloc.h for set_vm_flush_reset_perms()
    x86/ftrace: Explicitly include vmalloc.h for set_vm_flush_reset_perms()
    x86/boot: Explicitly include realmode.h to handle RM reservations
    x86/efi: Explicitly include realmode.h to handle RM trampoline quirk
    x86/platform/intel/quark: Explicitly include linux/io.h for virt_to_phys()
    x86/setup: Enhance the comments
    x86/setup: Clean up the header portion of setup.c

    Linus Torvalds
     

28 Jan, 2020

1 commit


24 Jan, 2020

1 commit


23 Jan, 2020

2 commits

  • Although in the most platforms, the power of eeprom are alway
    on, some platforms disable the eeprom power in order to meet
    low power request. This patch add the pm_runtime ops to control
    power to support all platforms.

    Signed-off-by: Bibby Hsieh
    [Bartosz: rebased on top of current at24/for-next]
    Signed-off-by: Bartosz Golaszewski

    Bibby Hsieh
     
  • The PCI hotplug framework is used to update the devices when a new
    image is written to the FPGA.

    Reviewed-by: Alastair D'Silva
    Reviewed-by: Andrew Donnellan
    Signed-off-by: Frederic Barrat
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/20191121134918.7155-12-fbarrat@linux.ibm.com

    Frederic Barrat
     

22 Jan, 2020

2 commits


20 Jan, 2020

2 commits


19 Jan, 2020

1 commit

  • Pull char/misc fixes from Greg KH:
    "Here are some small fixes for 5.5-rc7

    Included here are:

    - two lkdtm fixes

    - coresight build fix

    - Documentation update for the hw process document

    All of these have been in linux-next with no reported issues"

    * tag 'char-misc-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
    Documentation/process: Add Amazon contact for embargoed hardware issues
    lkdtm/bugs: fix build error in lkdtm_UNSET_SMEP
    lkdtm/bugs: Make double-fault test always available
    coresight: etm4x: Fix unused function warning

    Linus Torvalds
     

16 Jan, 2020

1 commit

  • Mmgrab was introduced in commit f1f1007644ff ("mm: add new mmgrab()
    helper") and most of the kernel was updated to use it. Update a
    remaining file.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    @@ expression e; @@
    - atomic_inc(&e->mm_count);
    + mmgrab(e);

    Signed-off-by: Julia Lawall
    Acked-by: Andrew Donnellan
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/1577634178-22530-2-git-send-email-Julia.Lawall@inria.fr

    Julia Lawall
     

15 Jan, 2020

1 commit

  • Pull SCSI fixes from James Bottomley:
    "Two simple fixes in the upper drivers (so both fairly core), one in
    enclosures, which fixes replugging a device into an enclosure slot and
    one in the disk driver which fixes revalidating a drive with
    protection information (PI) to make it a non-PI drive ... previously
    we were still remembering the old PI state.

    Both fixed issues are quite rare in the field"

    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
    scsi: enclosure: Fix stale device oops with hot replug
    scsi: sd: Clear sdkp->protection_type if disk is reformatted without PI

    Linus Torvalds
     

14 Jan, 2020

14 commits

  • When building ARCH=um with CONFIG_UML_X86=y and CONFIG_64BIT=y we get
    the build errors:

    drivers/misc/lkdtm/bugs.c: In function ‘lkdtm_UNSET_SMEP’:
    drivers/misc/lkdtm/bugs.c:288:8: error: implicit declaration of function ‘native_read_cr4’ [-Werror=implicit-function-declaration]
    cr4 = native_read_cr4();
    ^~~~~~~~~~~~~~~
    drivers/misc/lkdtm/bugs.c:290:13: error: ‘X86_CR4_SMEP’ undeclared (first use in this function); did you mean ‘X86_FEATURE_SMEP’?
    if ((cr4 & X86_CR4_SMEP) != X86_CR4_SMEP) {
    ^~~~~~~~~~~~
    X86_FEATURE_SMEP
    drivers/misc/lkdtm/bugs.c:290:13: note: each undeclared identifier is reported only once for each function it appears in
    drivers/misc/lkdtm/bugs.c:297:2: error: implicit declaration of function ‘native_write_cr4’; did you mean ‘direct_write_cr4’? [-Werror=implicit-function-declaration]
    native_write_cr4(cr4);
    ^~~~~~~~~~~~~~~~
    direct_write_cr4

    So specify that this block of code should only build when
    CONFIG_X86_64=y *AND* CONFIG_UML is unset.

    Signed-off-by: Brendan Higgins
    Acked-by: Kees Cook
    Link: https://lore.kernel.org/r/20191213003522.66450-1-brendanhiggins@google.com
    Signed-off-by: Greg Kroah-Hartman

    Brendan Higgins
     
  • Adjust the DOUBLE_FAULT test to always be available (so test harnesses
    don't have to make exceptions more missing tests), and for the
    arch-specific tests to "XFAIL" so that test harnesses can reason about
    expected vs unexpected failures.

    Fixes: b09511c253e5 ("lkdtm: Add a DOUBLE_FAULT crash type on x86")
    Signed-off-by: Kees Cook
    Link: https://lore.kernel.org/r/202001021226.751D3F869D@keescook
    Signed-off-by: Greg Kroah-Hartman

    Kees Cook
     
  • debugfs_remove_recursive will do NULL check, so remove
    the redundant null check.

    Signed-off-by: Xu Wang
    Reviewed-by: Ashutosh Dixit
    Link: https://lore.kernel.org/r/1578391235-603-1-git-send-email-vulab@iscas.ac.cn
    Signed-off-by: Greg Kroah-Hartman

    Xu Wang
     
  • xsdfec_poll() is defined as returning 'unsigned int' but the
    .poll method is declared as returning '__poll_t', a bitwise type.

    Fix this by using the proper return type and using the EPOLL
    constants instead of the POLL ones, as required for __poll_t.

    CC: Derek Kiernan
    CC: Dragan Cvetic
    Signed-off-by: Luc Van Oostenryck
    Acked-by: Dragan Cvetic
    Link: https://lore.kernel.org/r/20191209213655.57985-1-luc.vanoostenryck@gmail.com
    Signed-off-by: Greg Kroah-Hartman

    Luc Van Oostenryck
     
  • The second arg of xsdfec_set_order() is a 'void __user *'
    and this pointer is then used in get_user() which expect
    a __user pointer.

    But get_user() can't be used with a void pointer, it a
    pointer to the effective type. This is done here by casting
    the argument to a pointer to the effective type but the
    __user is missing in the cast.

    Fix this by adding the missing __user in the cast.

    CC: Derek Kiernan
    CC: Dragan Cvetic
    Signed-off-by: Luc Van Oostenryck
    Acked-by: Dragan Cvetic
    Link: https://lore.kernel.org/r/20191209213719.58037-1-luc.vanoostenryck@gmail.com
    Signed-off-by: Greg Kroah-Hartman

    Luc Van Oostenryck
     
  • The variables i and flags are being initialized with values that are
    never read. The initializations are redundant and can be removed.

    Addresses-Coverity: ("Unused value")
    Signed-off-by: Colin Ian King
    Link: https://lore.kernel.org/r/20200113123149.187555-1-colin.king@canonical.com
    Signed-off-by: Greg Kroah-Hartman

    Colin Ian King
     
  • The variable r is being initialized with a value that is never
    read and it is being updated later with a new value. Remove
    the redundant initialization and move the declaration into a
    deeper code block.

    Addresses-Coverity: ("Unused value")
    Signed-off-by: Colin Ian King
    Link: https://lore.kernel.org/r/20200107175234.121298-1-colin.king@canonical.com
    Signed-off-by: Greg Kroah-Hartman

    Colin Ian King
     
  • The variable retval is assigned with a value that is never read and
    it is re-assigned a new value later on. The assignment is redundant
    and can be removed. Clean up multiple occurrances of this pattern.

    Addresses-Coverity: ("Unused value")
    Signed-off-by: Colin Ian King
    Link: https://lore.kernel.org/r/20191222222224.732340-1-colin.king@canonical.com
    Signed-off-by: Greg Kroah-Hartman

    Colin Ian King
     
  • I have added the AU6625 PCI_ID to the list of supported IDs:
    alcor_pci.c
    // Added au6625s ID to the array of supported devices
    alcor_pci.h
    // Added entry to define the PCI ID

    Made it fit in with the already submitted code:
    alcor_pci.c
    // Added config entry to that matches the one for au6601

    >From general usage there seems to be no problems.

    Signed-off-by: Rhys Perry
    Link: https://lore.kernel.org/r/20191229171824.10308-1-rhysperry111@gmail.com
    Signed-off-by: Greg Kroah-Hartman

    Rhys Perry
     
  • Mmgrab was introduced in commit f1f1007644ff ("mm: add new mmgrab()
    helper") and most of the kernel was updated to use it. Update a
    remaining file.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    @@ expression e; @@
    - atomic_inc(&e->mm_count);
    + mmgrab(e);

    Signed-off-by: Julia Lawall
    Acked-by: Andrew Donnellan
    Link: https://lore.kernel.org/r/1577634178-22530-2-git-send-email-Julia.Lawall@inria.fr
    Signed-off-by: Greg Kroah-Hartman

    Julia Lawall
     
  • Some users prefer kdump tools to generate guest kernel dumpfile,
    at the same time, need a out-of-band kernel panic event.

    Currently if booting guest kernel with 'crash_kexec_post_notifiers',
    QEMU will receive PVPANIC_PANICKED event and stop VM. If booting
    guest kernel without 'crash_kexec_post_notifiers', guest will not
    call notifier chain.

    Add PVPANIC_CRASH_LOADED bit for pvpanic event, it means that guest
    kernel actually hit a kernel panic, but the guest kernel wants to
    handle by itself.

    Signed-off-by: zhenwei pi
    Link: https://lore.kernel.org/r/20200102023513.318836-3-pizhenwei@bytedance.com
    Signed-off-by: Greg Kroah-Hartman

    zhenwei pi
     
  • Some processes outside of the kernel(Ex, QEMU) should know what the
    value really is for, so move the bit definition to a uapi file.

    Suggested-by: Greg KH
    Signed-off-by: zhenwei pi
    Link: https://lore.kernel.org/r/20200102023513.318836-2-pizhenwei@bytedance.com
    Signed-off-by: Greg Kroah-Hartman

    zhenwei pi
     
  • A u8 can only go up to 255, condition n > 396 is
    impossible, so change u8 to u16.

    Signed-off-by: Rui Feng
    Link: https://lore.kernel.org/r/1574214006-13540-1-git-send-email-rui_feng@realsil.com.cn
    Signed-off-by: Greg Kroah-Hartman

    Rui Feng
     
  • The driver forgets to call pm_runtime_disable in remove.
    Add the missed call to fix it.

    Signed-off-by: Chuhong Yuan
    Link: https://lore.kernel.org/r/20191118080931.30749-1-hslester96@gmail.com
    Signed-off-by: Greg Kroah-Hartman

    Chuhong Yuan