Commit graph

1058556 commits

Author SHA1 Message Date
Jiri Kosina
fce0d27584 Merge branch 'for-5.17/apple' into for-linus
- Apple Magic Keyboard support improvements (José Expósito, Alex Henrie,
  Benjamin Berg)
2022-01-10 09:54:31 +01:00
Jiri Kosina
8a2094d679 Merge branch 'for-5.17/core' into for-linus
- support for USI style pens (Tero Kristo, Mika Westerberg)
- quirk for devices that need inverted X/Y axes (Alistair Francis)
- small core code cleanups and deduplication (Benjamin Tissoires)
2022-01-10 09:49:13 +01:00
Lukas Bulwahn
3809fe4798 HID: address kernel-doc warnings
The command ./scripts/kernel-doc -none include/linux/hid.h reports:

  include/linux/hid.h:818: warning: cannot understand function prototype: 'struct hid_ll_driver '
  include/linux/hid.h:1135: warning: expecting prototype for hid_may_wakeup(). Prototype was for hid_hw_may_wakeup() instead

Address those kernel-doc warnings.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-01-06 15:39:43 +01:00
Yang Li
98b6b62cd5 HID: intel-ish-hid: ishtp-fw-loader: Fix a kernel-doc formatting issue
This function had kernel-doc that not used a hash to separate
the function name from the one line description.

The warning was found by running scripts/kernel-doc, which is
caused by using 'make W=1'.

drivers/hid/intel-ish-hid/ishtp-fw-loader.c:271: warning: This comment
starts with '/**', but isn't a kernel-doc comment. Refer
Documentation/doc-guide/kernel-doc.rst

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-01-06 15:39:43 +01:00
Ye Xiang
bcad6d1bd9 HID: intel-ish-hid: ipc: Specify no cache snooping on TGL and ADL
Specify that both TGL and ADL don't support DMA cache snooping.

Signed-off-by: Ye Xiang <xiang.ye@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-01-06 15:39:43 +01:00
José Expósito
aa320fdbbb HID: hid-uclogic-params: Invalid parameter check in uclogic_params_frame_init_v1_buttonpad
The function performs a check on the hdev input parameters, however, it
is used before the check.

Initialize the udev variable after the sanity check to avoid a
possible NULL pointer dereference.

Fixes: 9614219e93 ("HID: uclogic: Extract tablet parameter discovery into a module")
Addresses-Coverity-ID: 1443763 ("Null pointer dereference")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-01-06 15:39:43 +01:00
José Expósito
ff6b548afe HID: hid-uclogic-params: Invalid parameter check in uclogic_params_huion_init
The function performs a check on its input parameters, however, the
hdev parameter is used before the check.

Initialize the stack variables after checking the input parameters to
avoid a possible NULL pointer dereference.

Fixes: 9614219e93 ("HID: uclogic: Extract tablet parameter discovery into a module")
Addresses-Coverity-ID: 1443804 ("Null pointer dereference")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-01-06 15:39:43 +01:00
José Expósito
0a94131d69 HID: hid-uclogic-params: Invalid parameter check in uclogic_params_get_str_desc
The function performs a check on the hdev input parameters, however, it
is used before the check.

Initialize the udev variable after the sanity check to avoid a
possible NULL pointer dereference.

Fixes: 9614219e93 ("HID: uclogic: Extract tablet parameter discovery into a module")
Addresses-Coverity-ID: 1443827 ("Null pointer dereference")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-01-06 15:39:43 +01:00
José Expósito
f364c571a5 HID: hid-uclogic-params: Invalid parameter check in uclogic_params_init
The function performs a check on its input parameters, however, the
hdev parameter is used before the check.

Initialize the stack variables after checking the input parameters to
avoid a possible NULL pointer dereference.

Fixes: 9614219e93 ("HID: uclogic: Extract tablet parameter discovery into a module")
Addresses-Coverity-ID: 1443831 ("Null pointer dereference")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-01-06 15:39:43 +01:00
José Expósito
7f84e2439e HID: apple: Add Magic Keyboard 2021 with fingerprint reader FN key mapping
Use the function key table introduced for the Magic Keyboard 2021
without fingerprint reader in the models with fingerprint reader and/or
numpad.

Tested with the ANSI variant of the keyboard with and without numpad.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-01-06 14:01:32 +01:00
Benjamin Berg
531cb56972 HID: apple: Add 2021 magic keyboard FN key mapping
The new 2021 apple models have a different FN key assignment. Add a new
translation table and use that for the 2021 magic keyboard.

Signed-off-by: Benjamin Berg <bberg@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-01-06 14:01:28 +01:00
José Expósito
5768701edc HID: magicmouse: set Magic Trackpad 2021 name
The Apple Magic Trackpad 2021 (3rd generation) has the same product ID
as the 2nd generation. However, when connected through Bluetooth, the
version has changed from 0x107 to 0x110.

The other meaningful change is that the name has dropped the generation
number and now it is just "Apple Inc. Magic Trackpad", like the first
generation model.

Set the device name correctly to ensure the same driver settings are
loaded, whether connected via Bluetooth or USB.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-01-06 13:58:29 +01:00
José Expósito
0aa45fcc42 HID: magicmouse: set device name when it has been personalized
If the Apple Magic Trackpad 2 has been connected to a Mac, the name
is automatically personalized showing its owner name. For example:
"José Expósito's Trackpad".

When connected through Bluetooth, the personalized name is reported,
however, when connected through USB the generic name is reported.

Set the device name correctly to ensure the same driver settings are
loaded, whether connected via Bluetooth or USB.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-01-06 13:58:28 +01:00
Alex Henrie
b2dcadef20 HID: apple: Add 2021 Magic Keyboard with number pad
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-01-06 13:57:24 +01:00
Alex Henrie
9f92d61f01 HID: apple: Add 2021 Magic Keyboard with fingerprint reader
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Tested-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-01-06 13:57:24 +01:00
Jiasheng Jiang
13251ce1dd HID: potential dereference of null pointer
The return value of devm_kzalloc() needs to be checked.
To avoid hdev->dev->driver_data to be null in case of the failure of
alloc.

Fixes: 14c9c014ba ("HID: add vivaldi HID driver")
Cc: stable@vger.kernel.org
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20211215083605.117638-1-jiasheng@iscas.ac.cn
2021-12-20 11:26:14 +01:00
Benjamin Tissoires
93a2207c25 HID: holtek: fix mouse probing
An overlook from the previous commit: we don't even parse or start the
device, meaning that the device is not presented to user space.

Fixes: 93020953d0 ("HID: check for valid USB device for many HID drivers")
Cc: stable@vger.kernel.org
Link: https://bugs.archlinux.org/task/73048
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215341
Link: https://lore.kernel.org/r/e4efbf13-bd8d-0370-629b-6c80c0044b15@leemhuis.info/
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2021-12-20 11:25:42 +01:00
Alistair Francis
b60d3c803d HID: i2c-hid-of: Expose the touchscreen-inverted properties
Allow the touchscreen-inverted-x/y device tree properties to control the
HID_QUIRK_X_INVERT/HID_QUIRK_Y_INVERT quirks for the hid-input device.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
Acked-by: Rob Herring <robh@kernel.org>
[bentiss: silence checkpatch warnings]
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20211208124045.61815-3-alistair@alistair23.me
2021-12-14 11:38:04 +01:00
Alistair Francis
fd8d135b2c HID: quirks: Allow inverting the absolute X/Y values
Add a HID_QUIRK_X_INVERT/HID_QUIRK_Y_INVERT quirk that can be used
to invert the X/Y values.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
[bentiss: silence checkpatch warning]
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20211208124045.61815-2-alistair@alistair23.me
2021-12-14 11:37:52 +01:00
Mika Westerberg
9ea1b35f63 HID: debug: Add USI usages
Add USI defined usages to the HID debug code.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Tero Kristo <tero.kristo@linux.intel.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20211210111138.1248187-6-tero.kristo@linux.intel.com
2021-12-14 10:08:45 +01:00
Mika Westerberg
5904a3f9d7 HID: input: Make hidinput_find_field() static
This function is not called outside of hid-input.c so we can make it
static.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Tero Kristo <tero.kristo@linux.intel.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20211210111138.1248187-5-tero.kristo@linux.intel.com
2021-12-14 10:08:45 +01:00
Tero Kristo
ae7fafa689 HID: Add hid usages for USI style pens
Add usage codes for USI style pens, based on the USB-HID usage table:
    https://usb.org/document-library/hid-usage-tables-122

See chapter 16, Digitizers Page (0x0D)

Signed-off-by: Tero Kristo <tero.kristo@linux.intel.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20211210111138.1248187-4-tero.kristo@linux.intel.com
2021-12-14 10:08:45 +01:00
Mika Westerberg
c0ee1d5716 HID: hid-input: Add suffix also for HID_DG_PEN
This and HID_DG_STYLUS are pretty much the same thing so add suffix for
HID_DG_PEN too. This makes the input device name look better.

While doing this, remove the suffix override from hid-multitouch, as it
is now handled by hid-input. Also, the suffix override done by
hid-multitouch was wrong, as it mapped HID_DG_PEN => "Stylus" and
HID_DG_STYLUS => "Pen".

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Tero Kristo <tero.kristo@linux.intel.com>
[bentiss: amended to keep the same name for hid-multitouch devices]
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20211210111138.1248187-3-tero.kristo@linux.intel.com
2021-12-14 10:08:40 +01:00
Mika Westerberg
8aa45b544d HID: Add map_msc() to avoid boilerplate code
Since we are going to have more MSC events too, add map_msc() that can
be used to fill in necessary fields and avoid boilerplate code.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Tero Kristo <tero.kristo@linux.intel.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20211210111138.1248187-2-tero.kristo@linux.intel.com
2021-12-14 10:05:39 +01:00
Hans de Goede
14902f8961 HID: Ignore battery for Elan touchscreen on Asus UX550VE
Battery status is reported for the Asus UX550VE touchscreen even though
it does not have a battery. Prevent it from always reporting the
battery as low.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1897823
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2021-12-08 18:16:07 +01:00
Thomas Weißschuh
086e81f6b9 HID: intel-ish-hid: ipc: only enable IRQ wakeup when requested
Fixes spurious wakeups from s0ix on Lenovo ThinkPad X1 Cargon Gen 9 on
lid close.

These wakeups are generated by interrupts from the ISH on changes to the
lid status.

By disabling the wake IRQ from the ISH we inhibit these spurious
wakeups while keeping the resume from LID open through the ACPI
interrupt.

Reports on the Lenovo forums indicate that Lenovo ThinkPad X1 Yoga Gen6
is also affected.

Fixes: ae02e5d40d ("HID: intel-ish-hid: ipc layer")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214855
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20211130060117.3026-1-linux@weissschuh.net
2021-12-03 09:32:49 +01:00
xiazhengqiao
caff009098 HID: google: add eel USB id
Add one additional hammer-like device.

Signed-off-by: xiazhengqiao <xiazhengqiao@huaqin.corp-partner.google.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20211203030119.28612-1-xiazhengqiao@huaqin.corp-partner.google.com
2021-12-03 09:19:38 +01:00
Greg Kroah-Hartman
30cb3c2ad2 HID: add USB_HID dependancy to hid-prodikeys
The prodikeys HID driver only controls USB devices, yet did not have a
dependancy on USB_HID.  This causes build errors on some configurations
like nios2 when building due to new changes to the prodikeys driver.

Reported-by: kernel test robot <lkp@intel.com>
Cc: stable@vger.kernel.org
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20211203081231.2856936-1-gregkh@linuxfoundation.org
2021-12-03 09:15:53 +01:00
Greg Kroah-Hartman
d080811f27 HID: add USB_HID dependancy to hid-chicony
The chicony HID driver only controls USB devices, yet did not have a
dependancy on USB_HID.  This causes build errors on some configurations
like sparc when building due to new changes to the chicony driver.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: stable@vger.kernel.org
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20211203075927.2829218-1-gregkh@linuxfoundation.org
2021-12-03 09:15:26 +01:00
Benjamin Tissoires
f65a0b1f3e HID: do not inline some hid_hw_ functions
We don't gain much by having them as inline, and it
actually prevents us to attach a probe to those helpers.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20211202095334.14399-5-benjamin.tissoires@redhat.com
2021-12-02 15:42:46 +01:00
Benjamin Tissoires
9e35620809 HID: add suspend/resume helpers
There is a lot of duplication of code in the HID low level drivers.
Better have everything in one place so we can eventually extend it
in a generic way.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20211202095334.14399-4-benjamin.tissoires@redhat.com
2021-12-02 15:42:46 +01:00
Benjamin Tissoires
918aa1ef10 HID: bigbenff: prevent null pointer dereference
When emulating the device through uhid, there is a chance we don't have
output reports and so report_field is null.

Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20211202095334.14399-3-benjamin.tissoires@redhat.com
2021-12-02 15:36:18 +01:00
Benjamin Tissoires
7998193bcc HID: sony: fix error path in probe
When the setup of the GHL fails, we are not calling hid_hw_stop().
This leads to the hidraw node not being released, meaning a crash
whenever somebody attempts to open the file.

Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20211202095334.14399-2-benjamin.tissoires@redhat.com
2021-12-02 15:36:18 +01:00
Greg Kroah-Hartman
f237d9028f HID: add USB_HID dependancy on some USB HID drivers
Some HID drivers are only for USB drivers, yet did not depend on
CONFIG_USB_HID.  This was hidden by the fact that the USB functions were
stubbed out in the past, but now that drivers are checking for USB
devices properly, build errors can occur with some random
configurations.

Reported-by: kernel test robot <lkp@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20211202114819.2511954-1-gregkh@linuxfoundation.org
2021-12-02 15:36:18 +01:00
Greg Kroah-Hartman
93020953d0 HID: check for valid USB device for many HID drivers
Many HID drivers assume that the HID device assigned to them is a USB
device as that was the only way HID devices used to be able to be
created in Linux.  However, with the additional ways that HID devices
can be created for many different bus types, that is no longer true, so
properly check that we have a USB device associated with the HID device
before allowing a driver that makes this assumption to claim it.

Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Michael Zaidman <michael.zaidman@gmail.com>
Cc: Stefan Achatz <erazor_de@users.sourceforge.net>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: linux-input@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
[bentiss: amended for thrustmater.c hunk to apply]
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20211201183503.2373082-3-gregkh@linuxfoundation.org
2021-12-02 15:36:18 +01:00
Greg Kroah-Hartman
720ac46720 HID: wacom: fix problems when device is not a valid USB device
The wacom driver accepts devices of more than just USB types, but some
code paths can cause problems if the device being controlled is not a
USB device due to a lack of checking.  Add the needed checks to ensure
that the USB device accesses are only happening on a "real" USB device,
and not one on some other bus.

Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: linux-input@vger.kernel.org
Cc: stable@vger.kernel.org
Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20211201183503.2373082-2-gregkh@linuxfoundation.org
2021-12-02 15:36:12 +01:00
Greg Kroah-Hartman
f83baa0cb6 HID: add hid_is_usb() function to make it simpler for USB detection
A number of HID drivers already call hid_is_using_ll_driver() but only
for the detection of if this is a USB device or not.  Make this more
obvious by creating hid_is_usb() and calling the function that way.

Also converts the existing hid_is_using_ll_driver() functions to use the
new call.

Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: linux-input@vger.kernel.org
Cc: stable@vger.kernel.org
Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20211201183503.2373082-1-gregkh@linuxfoundation.org
2021-12-02 15:35:57 +01:00
Hans de Goede
9003fbe0f3 HID: quirks: Add quirk for the Microsoft Surface 3 type-cover
Add a HID_QUIRK_NO_INIT_REPORTS quirk for the
Microsoft Surface 3 (non pro) type-cover.

Trying to init the reports seems to confuse the type-cover and
causes 2 issues:

1. Despite hid-multitouch sending the command to switch the
touchpad to multitouch mode, it keeps sending events on the
mouse emulation interface.

2. The touchpad completely stops sending events after a reboot.

Adding the HID_QUIRK_NO_INIT_REPORTS quirk fixes both issues.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2021-11-29 09:59:12 +01:00
Linus Torvalds
740bebf421 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
Pull HID fixes from Jiri Kosina:

 - fix for Intel-ISH driver to make sure it gets aoutoloaded only on
   matching devices and not universally (Thomas Weißschuh)

 - fix for Wacom driver reporting invalid contact under certain
   circumstances (Jason Gerecke)

 - probing fix for ft260 dirver (Michael Zaidman)

 - fix for generic keycode remapping (Thomas Weißschuh)

 - fix for division by zero in hid-magicmouse (Claudia Pellegrino)

 - other tiny assorted fixes and new device IDs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
  HID: multitouch: Fix Iiyama ProLite T1931SAW (0eef:0001 again!)
  HID: nintendo: eliminate dead datastructures in !CONFIG_NINTENDO_FF case
  HID: magicmouse: prevent division by 0 on scroll
  HID: thrustmaster: fix sparse warnings
  HID: Ignore battery for Elan touchscreen on HP Envy X360 15-eu0xxx
  HID: input: set usage type to key on keycode remap
  HID: input: Fix parsing of HID_CP_CONSUMER_CONTROL fields
  HID: ft260: fix i2c probing for hwmon devices
  Revert "HID: hid-asus.c: Maps key 0x35 (display off) to KEY_SCREENLOCK"
  HID: intel-ish-hid: fix module device-id handling
  mod_devicetable: fix kdocs for ishtp_device_id
  HID: wacom: Use "Confidence" flag to prevent reporting invalid contacts
  HID: nintendo: unlock on error in joycon_leds_create()
  platform/x86: isthp_eclite: only load for matching devices
  platform/chrome: chros_ec_ishtp: only load for matching devices
  HID: intel-ish-hid: hid-client: only load for matching devices
  HID: intel-ish-hid: fw-loader: only load for matching devices
  HID: intel-ish-hid: use constants for modaliases
  HID: intel-ish-hid: add support for MODULE_DEVICE_TABLE()
2021-11-24 09:44:13 -08:00
Linus Torvalds
5d9f4cf367 selinux/stable-5.16 PR 20211123
-----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCAAyFiEES0KozwfymdVUl37v6iDy2pc3iXMFAmGdTV8UHHBhdWxAcGF1
 bC1tb29yZS5jb20ACgkQ6iDy2pc3iXPN5Q/+O4ZtB40NcUOHOtJebrlXDdfTRpqJ
 xLkVlAdOLF1v9PuigJ85AW9zyBn8cbb6mQxHeiVJaFpRCUO6xcsi32cg9y+3oYfj
 rAGREsSD3JULvQTbist5e93BVbj+7J8+tgXwwUde38HqTViAAiZUQeWvZ32/Ussy
 9P+PNUeWHy5X9y76YEBNEdvhPcSVH63nFbq2CC4WPlfe5vlaU2231L3Hwia/LWEt
 oJsRDTUQ0iLBAfj0RH+UPZrci0L1F9HajP0MmaBazof4HBK/OnO0h18p7B8z1DdL
 wfCxNi5ovlAyMtU8hbmzuGAr1HtXJu7Lj+ee5E4mb/3KfiG4/rDG9gvDHTDsri/n
 S28eYKE1B0qpA4+KUvxu/7O9T8EBfb8jM4JQmcU5BOQvDyNbBHgOa6shG1fUBvva
 wdlO6JREXA4mFjph91PSLWOLFPmzFgS/FBRYKej1OAOX2VCPN2z+UwixE3jfPzxk
 YFUn34tz99/6xzgzWFMi4uPBU3TIOmXm7ZfeSjYoFKeWHjNkEihax96zgIHweSFY
 HyEJYjNtXyiY/0kJRD/EAV7ORqpIsG5eiL3b22rgeoyTncW1kUykroUozG/tzAnA
 xn9/6DIyofQdtdsgXThIPddJd+zEuJu9jweSPClzerHP45ILgdDcuG4pA91BG/vp
 Vbxmkjb8xdxZu5A=
 =3GqX
 -----END PGP SIGNATURE-----

Merge tag 'selinux-pr-20211123' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux

Pull SELinux fix from Paul Moore:
 "A fix to make sure things are handled correctly when an allocation
  fails"

* tag 'selinux-pr-20211123' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
  selinux: fix NULL-pointer dereference when hashtab allocation fails
2021-11-23 13:59:54 -08:00
Linus Torvalds
b735936289 sound fixes for 5.16-rc3
A lot of small changes at this time.  There are many ASoC fixes,
 and the majority of them are new machine quirks for Intel
 platforms, as well as the device-specific fixes for Mediatek and
 Qualcomm.  In addition, a regression fix for USB-audio and a few
 more HD- and USB-audio quirks are found here.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmGbwIoOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE+img//RtAbJKqAnyksve8R8MXygLZnXpt5SnqaCKM+
 J7wS16pEzWdPrnfW1bhyooy3xdGttRDyye5PVBbA55p3me5d5MPMLMcnESnD6Fw0
 RVkw9F+SMdLF9neO6+mxBUivwNap2SjmXd0+40vJLXooBLgM8PZnfV8RqCS4DgzL
 wUnqAQAS/vqMXzflIuHXSp2k2ZA/RhTsj/NEt8cf9Oy7YY8eaWFjckrkp+WBd13W
 jplucD/GjCfWQe3fKb3dFrXsS02+iJqudXpBfpzIUbuPNJr2iI/nfluuvXRcUmyd
 LjfdQIOVEUwAMd/2vcBvujfUFYaJfcopK/DJkBNTJQK4KuSjsp2Lhj3Kw8jdLOqH
 ymrHONZ07j4Y0bqvydn22H5T78D+TT5nD4GKVrUFAoNbwXYVmfgPvqlNxhFZBVXV
 gbUwD9ZG8j2pYftCVaiLGfnt/ogd87VFGsjmA3b4Z1Y1vvxlqhVG2P/yEhPNdcSj
 48TZ+bzQC2YvGYxFfB9ABn0N+hU4+VbN6fZOBg9Dara6bzHNK50w27Zm6ZR2zRek
 uZ2LnH9c4bzgbrhdXA3IBMavExwcyuCS6V/7cx3SLQGpFIHnsNmmqgNsBKPw/9bd
 hOI0cEtCCa6PX83tQ3wJpOOFR4zkHoD9NVyOlG7f/v13YOelqsGaLlpq0ELSRdVH
 xBUbB7k=
 =sp2K
 -----END PGP SIGNATURE-----

Merge tag 'sound-5.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A lot of small changes at this time.

  There are many ASoC fixes, and the majority of them are new machine
  quirks for Intel platforms, as well as the device-specific fixes for
  Mediatek and Qualcomm.

  In addition, a regression fix for USB-audio and a few more HD- and
  USB-audio quirks are found here"

* tag 'sound-5.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (41 commits)
  ALSA: intel-dsp-config: add quirk for JSL devices based on ES8336 codec
  ALSA: usb-audio: Don't start stream for capture at prepare
  ALSA: usb-audio: Switch back to non-latency mode at a later point
  ALSA: ctxfi: Fix out-of-range access
  ALSA: hda/realtek: Fix LED on HP ProBook 435 G7
  ASoC: stm32: i2s: fix 32 bits channel length without mclk
  ASoC: codecs: lpass-rx-macro: fix HPHR setting CLSH mask
  ASoC: codecs: wcd934x: return error code correctly from hw_params
  ASoC: codecs: wcd938x: fix volatile register range
  ASoC: topology: Add missing rwsem around snd_ctl_remove() calls
  ASoC: qdsp6: q6routing: validate port id before setting up route
  ASoC: qdsp6: q6adm: improve error reporting
  ASoC: qdsp6: q6asm: fix q6asm_dai_prepare error handling
  ASoC: qdsp6: q6routing: Conditionally reset FrontEnd Mixer
  ASoC: qdsp6: qdsp6: q6prm: handle clk disable correctly
  ASoC: wm_adsp: wm_adsp_control_add() error: uninitialized symbol 'ret'
  ALSA: cmipci: Drop stale variable assignment
  ALSA: hda/realtek: Add quirk for ASRock NUC Box 1100
  ASoC: rsnd: fixup DMAEngine API
  ASoC: SOF: build compression interface into snd_sof.ko
  ...
2021-11-23 09:10:08 -08:00
Linus Torvalds
c7756f3a32 media fixes for v5.16-rc3
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+QmuaPwR3wnBdVwACF8+vY7k4RUFAmGbRRYACgkQCF8+vY7k
 4RWYVw/8DwN6kyjGkBkAMGoHCXUYeoATYn3l5NVQaAyxTxF8s5d5YPFOXhJn77s9
 S8CVvqy3JvZWeI/8L6mmOZl0rBNiDkURvnXyvcMv2lHb+VJpcb3hulgtMrRPogMw
 EFH2DjP9FE+ipOcqaAYrBIgyNRgvhqV+GKcqAXH9X4o+6lOZUKXVZcUbz/T6rWUQ
 MbZdc1aq1GA4SBj/scI0QMZskJ6dFtZTSeLUTgHo/QcybkxPh64Sqw2k3pc+xzRr
 SQB60DsDbzCuBX0aQjJWxNAUmu/b/DZdyd6yuiFvZCtsCiWH8rlkkr0kLmJB19Wr
 Xv7o5+heTYh5dKrDzA4VpbKeM5pjUn5hd3iK5C+YLNS7WwUNeBlrgT4JD1TUhj/w
 zwMRiKTBqMbi2lkOzcgxGMKn3SCkSa7WiKw25EdxQbn22laKP+6/a6ELg2nniARm
 N8OmTkpOYDK6va2j8U1ouJBwHOVoF+rUOzyD8CsRwC1zMjCdefN7dhvOd8Wh87Qo
 vCahUAHTCb5qANbRWqp2khTyg+LKK6/jGKa6IxVLAHhc9ZvyOCJW4iHEQ52cIFQI
 5FxR+CYJUN8vMxHsm90Y/8xis17HaOrkfQcWX7o/GVQh6jPrihez2TC0zoq3kj6N
 ID6Qaqs3tLCcsjX5XDBGiM2sDITrWNIZYMoIMg0vf29g5rED/aY=
 =f3wv
 -----END PGP SIGNATURE-----

Merge tag 'media/v5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:

 - fix VIDIOC_DQEVENT ioctl handling for 32-bit userspace with a 64-bit
   kernel

 - regression fix for videobuf2 core

 - fix for CEC core when handling non-block transmit

 - hi846: fix a clang warning

* tag 'media/v5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  media: hi846: remove the of_match_ptr macro
  media: hi846: include property.h instead of of_graph.h
  media: cec: copy sequence field for the reply
  media: videobuf2-dma-sg: Fix buf->vb NULL pointer dereference
  media: v4l2-core: fix VIDIOC_DQEVENT handling on non-x86
2021-11-22 14:58:57 -08:00
Nadav Amit
13e4ad2ce8 hugetlbfs: flush before unlock on move_hugetlb_page_tables()
We must flush the TLB before releasing i_mmap_rwsem to avoid the
potential reuse of an unshared PMDs page.  This is not true in the case
of move_hugetlb_page_tables().  The last reference on the page table can
therefore be dropped before the TLB flush took place.

Prevent it by reordering the operations and flushing the TLB before
releasing i_mmap_rwsem.

Fixes: 550a7d60bd ("mm, hugepages: add mremap() support for hugepage backed vma")
Signed-off-by: Nadav Amit <namit@vmware.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Mina Almasry <almasrymina@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-11-22 11:36:46 -08:00
Nadav Amit
a4a118f2ee hugetlbfs: flush TLBs correctly after huge_pmd_unshare
When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB
flush is missing.  This TLB flush must be performed before releasing the
i_mmap_rwsem, in order to prevent an unshared PMDs page from being
released and reused before the TLB flush took place.

Arguably, a comprehensive solution would use mmu_gather interface to
batch the TLB flushes and the PMDs page release, however it is not an
easy solution: (1) try_to_unmap_one() and try_to_migrate_one() also call
huge_pmd_unshare() and they cannot use the mmu_gather interface; and (2)
deferring the release of the page reference for the PMDs page until
after i_mmap_rwsem is dropeed can confuse huge_pmd_unshare() into
thinking PMDs are shared when they are not.

Fix __unmap_hugepage_range() by adding the missing TLB flush, and
forcing a flush when unshare is successful.

Fixes: 24669e5847 ("hugetlb: use mmu_gather instead of a temporary linked list for accumulating pages)" # 3.6
Signed-off-by: Nadav Amit <namit@vmware.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-11-22 11:36:46 -08:00
Linus Torvalds
1360572566 Linux 5.16-rc2 2021-11-21 13:47:39 -08:00
Linus Torvalds
40c93d7fff Two X86 fixes:
- Move the command line preparation and the early command line parsing
    earlier so that the command line parameters which affect
    early_reserve_memory(), e.g. efi=nosftreserve, are taken into
    account. This was broken when the invocation of early_reserve_memory()
    was moved recently.
 
  - Use an atomic type for the SGX page accounting, which is read and
    written lockless, to plug various race conditions related to it.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmGaYPoTHHRnbHhAbGlu
 dXRyb25peC5kZQAKCRCmGPVMDXSYoTM7D/9bivpPDiNzfjUV7kNKx6aTUwPjdFer
 G0RuuDZqkpJm9j7+51VnQNFssIfAFtzKMJn/DuGVoXF0ERxXMEhJVHiSTeOlCjJU
 u1760qFYlAQ1mwvKVNLk2SenWuNZwwgUneY3VvvS4qYsSq7PsbYlekuddPeX0Nws
 AJ1llOoCoBkm5vNZ5c3/CmhY6iPSRQQkDmbA11cZZUyWl2uouSk21+ax24IDCvW3
 E8Aq9QqB6ND2uukB32kQ7Wp7/UZ4inJHTUXF9UF/8P+N1ftDWeKDjQz6y9U19Tsd
 ivuMr6NqqAos/Fpo9PhlGns07C8HeKGf4ronnt9cUMqjzYWfdS+pRT+0pQR+vIPa
 M8+jyHQplzeOX9/nKOkpV+u0tYP2zgx8e7yeu5Sion8TqsKqiNOy9+D0D2utUDmw
 1x3DzuzGx/mK2OX5gjGSx4ZbS4u0DIAWnF8vB9YfgEfcnqpxr6KdbrY0bLatIbKv
 ip9mh0rRYeTkTZ4FGmvy3hFgAmadCODWxva/7AhzbWVZoM+AShwnTDsipkRaaj3V
 nMdgcVix8qVDg9YIAn9ziZbxkXKQUXFJn7lZj3KBeWjKcV2svA89S/9YL6JTaSeW
 TJ4X6wK8EoApKhEasZhufXBNAl9EmQlBS1k9pHiIjKVuRgBGlzMuEhzvrqZM2+rA
 KaUQSwBN6Ij6Dg==
 =CJUK
 -----END PGP SIGNATURE-----

Merge tag 'x86-urgent-2021-11-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:

 - Move the command line preparation and the early command line parsing
   earlier so that the command line parameters which affect
   early_reserve_memory(), e.g. efi=nosftreserve, are taken into
   account. This was broken when the invocation of
   early_reserve_memory() was moved recently.

 - Use an atomic type for the SGX page accounting, which is read and
   written locklessly, to plug various race conditions related to it.

* tag 'x86-urgent-2021-11-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/sgx: Fix free page accounting
  x86/boot: Pull up cmdline preparation and early param parsing
2021-11-21 11:25:19 -08:00
Linus Torvalds
af16bdeae8 A set of perf/X86 fixes:
- Remove unneded PEBS disabling when taking LBR snapshots to prevent an
    unchecked MSR access error.
 
  - Fix IIO event constraints for Snowridge and Skylake server chips.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmGaX44THHRnbHhAbGlu
 dXRyb25peC5kZQAKCRCmGPVMDXSYoarZEACxCahzh+3P3BD/yYs2R4qEWpiFf0ei
 KpoCSL/Xh2+5c+N0Z5qxMKs4//Vkab6GYdDlbQnfcfQPFgxFs9UI0kqBoXFWaqK6
 u12JJW8F3iBxV4UTwduCflve9x5iZ5B7OmCRrTmJm8GJwQqTIFmjx8kDsDbghYvu
 rURM3L7mln/Qx7xcjvhZehXrDupwPvak1tw1SbxPyNjz1dNAN8A7G9xVFDddlzDB
 AuYMEadipn5QsbQD224rwUPMj04jnby+421phLmaaPiduZx2Hi7QjJGEH718R7IQ
 IGA1OeSXJXIsPimUW3UJZEw5OGMG+UY7/raHgk8LnxUCqQoeIjU8vpt6HR7EAD0b
 0LuUvJ1ispVT8dY+7DdzcbuW+Zp4TPUQNlG/bBlsmuduuSkvUiDeMtknJbJ8xE0s
 xFbMAgcwlaylSmtwNGCgM/P1KWbLwZQXS6IP8Iy4bnfwEueTeeHwaEtssrfrhW/z
 9OCVgUIkO2LbAFMmlQK4tfFprmR2oJSDpohJ0e5QZMMyrEefSMbY2U47omnB4bln
 HDZ2Q+ZKI0G43ECyI2TZXJg77SS/cmJxCcgXx8iQGZTDn38iPDPQJWWWWWDYTz0C
 ERVEGvK7jc+9Pu54iWAaSQxGmZQUWHfETt0QuKqx+1Kgl2NmBfeJkLkss4dL/eW4
 zH8qAjblfH7a3g==
 =PeA1
 -----END PGP SIGNATURE-----

Merge tag 'perf-urgent-2021-11-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 perf fixes from Thomas Gleixner:

 - Remove unneded PEBS disabling when taking LBR snapshots to prevent an
   unchecked MSR access error.

 - Fix IIO event constraints for Snowridge and Skylake server chips.

* tag 'perf-urgent-2021-11-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/perf: Fix snapshot_branch_stack warning in VM
  perf/x86/intel/uncore: Fix IIO event constraints for Snowridge
  perf/x86/intel/uncore: Fix IIO event constraints for Skylake Server
  perf/x86/intel/uncore: Fix filter_tid mask for CHA events on Skylake Server
2021-11-21 11:17:50 -08:00
Linus Torvalds
75603b14ed powerpc fixes for 5.16 #2
Fix a bug in copying of sigset_t for 32-bit systems, which caused X to not start.
 
 Fix handling of shared LSIs (rare) with the xive interrupt controller (Power9/10).
 
 Fix missing TOC setup in some KVM code, which could result in oopses depending on kernel
 data layout.
 
 Fix DMA mapping when we have persistent memory and only one DMA window available.
 
 Fix further problems with STRICT_KERNEL_RWX on 8xx, exposed by a recent fix.
 
 A couple of other minor fixes.
 
 Thanks to: Alexey Kardashevskiy, Aneesh Kumar K.V, Cédric Le Goater, Christian Zigotzky,
 Christophe Leroy, Daniel Axtens, Finn Thain, Greg Kurz, Masahiro Yamada, Nicholas Piggin,
 Uwe Kleine-König.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEJFGtCPCthwEv2Y/bUevqPMjhpYAFAmGZzGMTHG1wZUBlbGxl
 cm1hbi5pZC5hdQAKCRBR6+o8yOGlgBrRD/4qE1A3+nXe+uZRJM3H5F8C/Ui2I/1G
 JPekyfW9aZklsv8SMlz8BotDTlK8vNwiEtkAuwqLOfPXPi1p/Y1do4sPtXAjUpuX
 mXZP3G9K2xXmALLedXMjJNO6YJjTT5LE7OT42QziSfY1ScS7iqfGNANg1zRjkCRW
 yf2cpBbMRnWdDhCgWyE/V/V4xdPyOTTnnWn3d4F3qNshV0luKgTJl/9yo0OmQrGe
 /T4Cw8jG5p+pSblNyFaACnYlKWF4bYTQIl5NWsvJY0A2cg3I5ah6+hexdGRN/JdI
 K3PWpJ8rx5RjICkTFE4cADI6xIF1bHhjMh3ytcaMH5USBMmW3fTUUfcFwjRkRDHa
 b8Z6V631mgK1v3L0RlrAn+PZ9R212wpupvQT6YOf4pFb5+BzOyaCQCzyQv+BnwoI
 Fwran0HEO6NUODq4off9MADEpNTjwhV2mDFojxiCJ9eb1oCIilLbs8BOUWRSHYe0
 1S22pdj9XSR7yxXt5DnjQBwhR47ZS7D3jXf9gjbmJ/qn6cRPAFzt/m/woSY2Vv7T
 UrZVjz5lb+skjij7vxw+L9jUIwLBd99cvBiHzJpWUNc0RTQeBlAh4QBK/1MNixCP
 93LTN7tsRdGknLRTJ5yfRhEhwuhTTH8SEPp3H+qOZj9sXwq3Bftl4Nm40AgoATHO
 G4kPlgrCMQBcRQ==
 =Ss4y
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull more powerpc fixes from Michael Ellerman:

 - Fix a bug in copying of sigset_t for 32-bit systems, which caused X
   to not start.

 - Fix handling of shared LSIs (rare) with the xive interrupt controller
   (Power9/10).

 - Fix missing TOC setup in some KVM code, which could result in oopses
   depending on kernel data layout.

 - Fix DMA mapping when we have persistent memory and only one DMA
   window available.

 - Fix further problems with STRICT_KERNEL_RWX on 8xx, exposed by a
   recent fix.

 - A couple of other minor fixes.

Thanks to Alexey Kardashevskiy, Aneesh Kumar K.V, Cédric Le Goater,
Christian Zigotzky, Christophe Leroy, Daniel Axtens, Finn Thain, Greg
Kurz, Masahiro Yamada, Nicholas Piggin, and Uwe Kleine-König.

* tag 'powerpc-5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/xive: Change IRQ domain to a tree domain
  powerpc/8xx: Fix pinned TLBs with CONFIG_STRICT_KERNEL_RWX
  powerpc/signal32: Fix sigset_t copy
  powerpc/book3e: Fix TLBCAM preset at boot
  powerpc/pseries/ddw: Do not try direct mapping with persistent memory and one window
  powerpc/pseries/ddw: simplify enable_ddw()
  powerpc/pseries/ddw: Revert "Extend upper limit for huge DMA window for persistent memory"
  powerpc/pseries: Fix numa FORM2 parsing fallback code
  powerpc/pseries: rename numa_dist_table to form2_distances
  powerpc: clean vdso32 and vdso64 directories
  powerpc/83xx/mpc8349emitx: Drop unused variable
  KVM: PPC: Book3S HV: Use GLOBAL_TOC for kvmppc_h_set_dabr/xdabr()
2021-11-21 10:26:35 -08:00
Geert Uytterhoeven
61eb495c83 pstore/blk: Use "%lu" to format unsigned long
On 32-bit:

    fs/pstore/blk.c: In function ‘__best_effort_init’:
    include/linux/kern_levels.h:5:18: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
	5 | #define KERN_SOH "\001"  /* ASCII Start Of Header */
	  |                  ^~~~~~
    include/linux/kern_levels.h:14:19: note: in expansion of macro ‘KERN_SOH’
       14 | #define KERN_INFO KERN_SOH "6" /* informational */
	  |                   ^~~~~~~~
    include/linux/printk.h:373:9: note: in expansion of macro ‘KERN_INFO’
      373 |  printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
	  |         ^~~~~~~~~
    fs/pstore/blk.c:314:3: note: in expansion of macro ‘pr_info’
      314 |   pr_info("attached %s (%zu) (no dedicated panic_write!)\n",
	  |   ^~~~~~~

Cc: stable@vger.kernel.org
Fixes: 7bb9557b48 ("pstore/blk: Use the normal block device I/O path")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210629103700.1935012-1-geert@linux-m68k.org
Cc: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-11-21 09:44:19 -08:00
Linus Torvalds
923dcc5eb0 Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton:
 "15 patches.

  Subsystems affected by this patch series: ipc, hexagon, mm (swap,
  slab-generic, kmemleak, hugetlb, kasan, damon, and highmem), and proc"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  proc/vmcore: fix clearing user buffer by properly using clear_user()
  kmap_local: don't assume kmap PTEs are linear arrays in memory
  mm/damon/dbgfs: fix missed use of damon_dbgfs_lock
  mm/damon/dbgfs: use '__GFP_NOWARN' for user-specified size buffer allocation
  kasan: test: silence intentional read overflow warnings
  hugetlb, userfaultfd: fix reservation restore on userfaultfd error
  hugetlb: fix hugetlb cgroup refcounting during mremap
  mm: kmemleak: slob: respect SLAB_NOLEAKTRACE flag
  hexagon: ignore vmlinux.lds
  hexagon: clean up timer-regs.h
  hexagon: export raw I/O routines for modules
  mm: emit the "free" trace report before freeing memory in kmem_cache_free()
  shm: extend forced shm destroy to support objects from several IPC nses
  ipc: WARN if trying to remove ipc object which is absent
  mm/swap.c:put_pages_list(): reinitialise the page list
2021-11-20 13:17:24 -08:00