4.19.171-rc1 review
Subsystems (2)
Greg Kroah-Hartman
maintainercover 4.19.171-rc1 review
This is the start of the stable review cycle for the 4.19.171 release. There are 58 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 27 Jan 2021 18:31:44 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.171-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 4.19.171-rc1
Dan Carpenter <[email protected]>
net: dsa: b53: fix an off by one in checking "vlan->vid"
Tariq Toukan <[email protected]>
net: Disable NETIF_F_HW_TLS_RX when RXCSUM is disabled
Vladimir Oltean <[email protected]>
net: mscc: ocelot: allow offloading of bridge on top of LAG
Matteo Croce <[email protected]>
ipv6: set multicast flag on the multicast route
Eric Dumazet <[email protected]>
net_sched: reject silly cell_log in qdisc_get_rtab()
Eric Dumazet <[email protected]>
net_sched: avoid shift-out-of-bounds in tcindex_set_parms()
Matteo Croce <[email protected]>
ipv6: create multicast route with RTPROT_KERNEL
Guillaume Nault <[email protected]>
udp: mask TOS bits in udp_v4_early_demux()
Lecopzer Chen <[email protected]>
kasan: fix incorrect arguments passing in kasan_add_zero_shadow
Lecopzer Chen <[email protected]>
kasan: fix unaligned address is unhandled in kasan_remove_zero_shadow
Alexander Lobakin <[email protected]>
skbuff: back tiny skbs with kmalloc() in __netdev_alloc_skb() too
Geert Uytterhoeven <[email protected]>
sh_eth: Fix power down vs. is_opened flag ordering
Rasmus Villemoes <[email protected]>
net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext
Necip Fazil Yildiran <[email protected]>
sh: dma: fix kconfig dependency for G2_DMA
Guillaume Nault <[email protected]>
netfilter: rpfilter: mask ecn bits before fib lookup
Rafael J. Wysocki <[email protected]>
driver core: Extend device_is_dependent()
JC Kuo <[email protected]>
xhci: tegra: Delay for disabling LFPS detector
Mathias Nyman <[email protected]>
xhci: make sure TRB is fully written before giving it to the controller
Patrik Jakobsson <[email protected]>
usb: bdc: Make bdc pci driver depend on BROKEN
Thinh Nguyen <[email protected]>
usb: udc: core: Use lock when write to soft_connect
Ryan Chen <[email protected]>
usb: gadget: aspeed: fix stop dma register setting.
Longfang Liu <[email protected]>
USB: ehci: fix an interrupt calltrace error
Eugene Korenevsky <[email protected]>
ehci: fix EHCI host controller initialization sequence
Pali Rohár <[email protected]>
serial: mvebu-uart: fix tx lost characters at power off
Wang Hui <[email protected]>
stm class: Fix module init return on allocation failure
Alexander Shishkin <[email protected]>
intel_th: pci: Add Alder Lake-P support
Mathias Kresin <[email protected]>
irqchip/mips-cpu: Set IPI domain parent chip
Lars-Peter Clausen <[email protected]>
iio: ad5504: Fix setting power-down state
Vincent Mailhol <[email protected]>
can: peak_usb: fix use after free bugs
Vincent Mailhol <[email protected]>
can: vxcan: vxcan_xmit: fix use after free bug
Vincent Mailhol <[email protected]>
can: dev: can_restart: fix use after free bug
Hangbin Liu <[email protected]>
selftests: net: fib_tests: remove duplicate log test
Hans de Goede <[email protected]>
platform/x86: intel-vbtn: Drop HP Stream x360 Convertible PC 11 from allow-list
Wolfram Sang <[email protected]>
i2c: octeon: check correct size of maximum RECV_LEN packet
Arnd Bergmann <[email protected]>
scsi: megaraid_sas: Fix MEGASAS_IOC_FIRMWARE regression
Ben Skeggs <[email protected]>
drm/nouveau/kms/nv50-: fix case where notifier buffer is at offset 0
Ben Skeggs <[email protected]>
drm/nouveau/mmu: fix vram heap sizing
Ben Skeggs <[email protected]>
drm/nouveau/i2c/gm200: increase width of aux semaphore owner fields
Ben Skeggs <[email protected]>
drm/nouveau/privring: ack interrupts the same way as RM
Ben Skeggs <[email protected]>
drm/nouveau/bios: fix issue shadowing expansion ROMs
David Woodhouse <[email protected]>
xen: Fix event channel callback via INTX/GSI
Peter Geis <[email protected]>
clk: tegra30: Add hda clock default rates to clock driver
Seth Miller <[email protected]>
HID: Ignore battery for Elan touchscreen on ASUS UX550
Damien Le Moal <[email protected]>
riscv: Fix kernel time_init()
Nilesh Javali <[email protected]>
scsi: qedi: Correct max length of CHAP secret
Can Guo <[email protected]>
scsi: ufs: Correct the LUN used in eh_device_reset_handler() callback
Anthony Iliopoulos <[email protected]>
dm integrity: select CRYPTO_SKCIPHER
Cezary Rojewski <[email protected]>
ASoC: Intel: haswell: Add missing pm_ops
Pan Bian <[email protected]>
drm/atomic: put state on error path
Mikulas Patocka <[email protected]>
dm integrity: fix a crash if "recalculate" used without "internal_hash"
Hannes Reinecke <[email protected]>
dm: avoid filesystem lookup in dm_get_dev_t()
Alex Leibovich <[email protected]>
mmc: sdhci-xenon: fix 1.8v regulator stabilization
Peter Collingbourne <[email protected]>
mmc: core: don't initialize block size from ext_csd if not present
Josef Bacik <[email protected]>
btrfs: fix lockdep splat in btrfs_recover_relocation
Hans de Goede <[email protected]>
ACPI: scan: Make acpi_bus_get_device() clear return pointer on error
Takashi Iwai <[email protected]>
ALSA: hda/via: Add minimum mute flag
Takashi Iwai <[email protected]>
ALSA: seq: oss: Fix missing error check in snd_seq_oss_synth_make_info()
Mikko Perttunen <[email protected]>
i2c: bpmp-tegra: Ignore unknown I2C_M flags
-------------
Diffstat:
Makefile | 4 +- arch/arm/xen/enlighten.c | 2 +- arch/riscv/kernel/time.c | 3 + arch/sh/drivers/dma/Kconfig | 3 +- drivers/acpi/scan.c | 2 + drivers/base/core.c | 17 ++++- drivers/clk/tegra/clk-tegra30.c | 2 + drivers/gpu/drm/drm_atomic_helper.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 +- drivers/gpu/drm/nouveau/dispnv50/disp.h | 2 +- drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c | 8 +-- drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c | 10 ++- drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c | 10 ++- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 6 +- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-input.c | 2 + drivers/hwtracing/intel_th/pci.c | 5 ++ drivers/hwtracing/stm/heartbeat.c | 6 +- drivers/i2c/busses/i2c-octeon-core.c | 2 +- drivers/i2c/busses/i2c-tegra-bpmp.c | 2 +- drivers/iio/dac/ad5504.c | 4 +- drivers/irqchip/irq-mips-cpu.c | 7 ++ drivers/md/Kconfig | 1 + drivers/md/dm-integrity.c | 6 ++ drivers/md/dm-table.c | 15 +++- drivers/mmc/core/queue.c | 4 +- drivers/mmc/host/sdhci-xenon.c | 7 +- drivers/net/can/dev.c | 4 +- drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 8 +-- drivers/net/can/vxcan.c | 6 +- drivers/net/dsa/b53/b53_common.c | 2 +- drivers/net/dsa/mv88e6xxx/global1_vtu.c | 4 ++ drivers/net/ethernet/mscc/ocelot.c | 4 +- drivers/net/ethernet/renesas/sh_eth.c | 4 +- drivers/platform/x86/intel-vbtn.c | 6 -- drivers/scsi/megaraid/megaraid_sas_base.c | 6 +- drivers/scsi/qedi/qedi_main.c | 4 +- drivers/scsi/ufs/ufshcd.c | 11 ++- drivers/tty/serial/mvebu-uart.c | 10 ++- drivers/usb/gadget/udc/aspeed-vhub/epn.c | 5 +- drivers/usb/gadget/udc/bdc/Kconfig | 2 +- drivers/usb/gadget/udc/core.c | 13 +++- drivers/usb/host/ehci-hcd.c | 12 ++++ drivers/usb/host/ehci-hub.c | 3 + drivers/usb/host/xhci-ring.c | 2 + drivers/usb/host/xhci-tegra.c | 7 ++ drivers/xen/events/events_base.c | 10 --- drivers/xen/platform-pci.c | 1 - drivers/xen/xenbus/xenbus.h | 1 + drivers/xen/xenbus/xenbus_comms.c | 8 --- drivers/xen/xenbus/xenbus_probe.c | 81 ++++++++++++++++++---- fs/btrfs/volumes.c | 2 + include/xen/xenbus.h | 2 +- mm/kasan/kasan_init.c | 23 +++--- net/core/dev.c | 5 ++ net/core/skbuff.c | 6 +- net/ipv4/netfilter/ipt_rpfilter.c | 2 +- net/ipv4/udp.c | 3 +- net/ipv6/addrconf.c | 3 +- net/sched/cls_tcindex.c | 8 ++- net/sched/sch_api.c | 3 +- sound/core/seq/oss/seq_oss_synth.c | 3 +- sound/pci/hda/patch_via.c | 1 + sound/soc/intel/boards/haswell.c | 1 + tools/testing/selftests/net/fib_tests.sh | 1 - 67 files changed, 290 insertions(+), 128 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/58 i2c: bpmp-tegra: Ignore unknown I2C_M flags
From: Mikko Perttunen <[email protected]>
commit bc1c2048abbe3c3074b4de91d213595c57741a6b upstream.
In order to not to start returning errors when new I2C_M flags are added, change behavior to just ignore all flags that we don't know about. This includes the I2C_M_DMA_SAFE flag that already exists but causes -EINVAL to be returned for valid transactions.
--- drivers/i2c/busses/i2c-tegra-bpmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-tegra-bpmp.c +1 -1
@@ -91,7 +91,7 @@ static int tegra_bpmp_xlate_flags(u16 fl flags &= ~I2C_M_RECV_LEN ; } -return (flags !=0 ) ? -EINVAL :0 ; +return 0 ; }/**
Greg Kroah-Hartman
maintainerPATCH 2/58 ALSA: seq: oss: Fix missing error check in snd_seq_oss_synth_make_info()
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 217bfbb8b0bfa24619b11ab75c135fec99b99b20 upstream.
snd_seq_oss_synth_make_info() didn't check the error code from snd_seq_oss_midi_make_info(), and this leads to the call of strlcpy() with the uninitialized string as the source, which may lead to the access over the limit.
Add the proper error check for avoiding the failure.
--- sound/core/seq/oss/seq_oss_synth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/core/seq/oss/seq_oss_synth.c +2 -1
@@ -624,7 +624,8 @@ snd_seq_oss_synth_make_info(struct seq_oif (info->is_midi) {struct midi_info minf; -snd_seq_oss_midi_make_info (dp, info->midi_mapped, &minf); +if (snd_seq_oss_midi_make_info (dp, info->midi_mapped, &minf)) +return -ENXIO ; inf->synth_type =SYNTH_TYPE_MIDI ; inf->synth_subtype =0 ; inf->nr_voices =16 ;
Greg Kroah-Hartman
maintainerPATCH 3/58 ALSA: hda/via: Add minimum mute flag
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit 67ea698c3950d10925be33c21ca49ffb64e21842 upstream.
It turned out that VIA codecs also mute the sound in the lowest mixer level. Turn on the dac_min_mute flag to indicate the mute-as-minimum in TLV like already done in Conexant and IDT codecs.
--- sound/pci/hda/patch_via.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/patch_via.c +1 -0
@@ -126,6 +126,7 @@ static struct via_spec *via_new_spec(str spec->codec_type =VT1708S ; spec->gen.indep_hp =1 ; spec->gen.keep_eapd_on =1 ; + spec->gen.dac_min_mute =1 ; spec->gen.pcm_playback_hook = via_playback_pcm_hook; spec->gen.add_stereo_mix_input =HDA_HINT_STEREO_MIX_AUTO ; codec->power_save_node =1 ;
Greg Kroah-Hartman
maintainerPATCH 4/58 ACPI: scan: Make acpi_bus_get_device() clear return pointer on error
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
commit 78a18fec5258c8df9435399a1ea022d73d3eceb9 upstream.
Set the acpi_device pointer which acpi_bus_get_device() returns-by- reference to NULL on errors.
We've recently had 2 cases where callers of acpi_bus_get_device() did not properly error check the return value, so set the returned- by-reference acpi_device pointer to NULL, because at least some callers of acpi_bus_get_device() expect that to be done on errors.
[ rjw: This issue was exposed by commit 71da201f38df ("ACPI: scan:
Defer enumeration of devices with _DEP lists") which caused it to be much more likely to occur on some systems, but the real defect had been introduced by an earlier commit. ]
--- drivers/acpi/scan.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/acpi/scan.c +2 -0
@@ -586,6 +586,8 @@ static int acpi_get_device_data(acpi_hanif (!device)return -EINVAL ; + *device =NULL ; + status =acpi_get_data_full (handle, acpi_scan_drop_device, (void **)device, callback);if (ACPI_FAILURE (status) || !*device) {
Greg Kroah-Hartman
maintainerPATCH 5/58 btrfs: fix lockdep splat in btrfs_recover_relocation
In reply to Greg Kroah-HartmanFrom: Josef Bacik <[email protected]>
commit fb286100974e7239af243bc2255a52f29442f9c8 upstream.
While testing the error paths of relocation I hit the following lockdep splat:
======================================================
WARNING: possible circular locking dependency detected
5.10.0-rc6+ #217 Not tainted
------------------------------------------------------
mount/779 is trying to acquire lock:
ffffa0e676945418 (&fs_info->balance_mutex){+.+.}-{3:3}, at: btrfs_recover_balance+0x2f0/0x340
but task is already holding lock:
ffffa0e60ee31da8 (btrfs-root-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x27/0x100
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (btrfs-root-00){++++}-{3:3}:
down_read_nested+0x43/0x130 __btrfs_tree_read_lock+0x27/0x100 btrfs_read_lock_root_node+0x31/0x40 btrfs_search_slot+0x462/0x8f0 btrfs_update_root+0x55/0x2b0 btrfs_drop_snapshot+0x398/0x750 clean_dirty_subvols+0xdf/0x120 btrfs_recover_relocation+0x534/0x5a0 btrfs_start_pre_rw_mount+0xcb/0x170 open_ctree+0x151f/0x1726 btrfs_mount_root.cold+0x12/0xea legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 vfs_kern_mount.part.0+0x71/0xb0 btrfs_mount+0x10d/0x380 legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 path_mount+0x433/0xc10 __x64_sys_mount+0xe3/0x120 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9
-> #1 (sb_internal#2){.+.+}-{0:0}:
start_transaction+0x444/0x700 insert_balance_item.isra.0+0x37/0x320 btrfs_balance+0x354/0xf40 btrfs_ioctl_balance+0x2cf/0x380 __x64_sys_ioctl+0x83/0xb0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9
-> #0 (&fs_info->balance_mutex){+.+.}-{3:3}:
__lock_acquire+0x1120/0x1e10 lock_acquire+0x116/0x370 __mutex_lock+0x7e/0x7b0 btrfs_recover_balance+0x2f0/0x340 open_ctree+0x1095/0x1726 btrfs_mount_root.cold+0x12/0xea legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 vfs_kern_mount.part.0+0x71/0xb0 btrfs_mount+0x10d/0x380 legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 path_mount+0x433/0xc10 __x64_sys_mount+0xe3/0x120 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9
other info that might help us debug this:
Chain exists of:
&fs_info->balance_mutex --> sb_internal#2 --> btrfs-root-00
Possible unsafe locking scenario: CPU0 CPU1
---- ----
lock(btrfs-root-00);
lock(sb_internal#2);
lock(btrfs-root-00);
lock(&fs_info->balance_mutex);*** DEADLOCK ***
2 locks held by mount/779:
#0: ffffa0e60dc040e0 (&type->s_umount_key#47/1){+.+.}-{3:3}, at: alloc_super+0xb5/0x380 #1: ffffa0e60ee31da8 (btrfs-root-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x27/0x100
stack backtrace: CPU: 0 PID: 779 Comm: mount Not tainted 5.10.0-rc6+ #217 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014 Call Trace: dump_stack+0x8b/0xb0 check_noncircular+0xcf/0xf0 ? trace_call_bpf+0x139/0x260 __lock_acquire+0x1120/0x1e10 lock_acquire+0x116/0x370 ? btrfs_recover_balance+0x2f0/0x340 __mutex_lock+0x7e/0x7b0 ? btrfs_recover_balance+0x2f0/0x340 ? btrfs_recover_balance+0x2f0/0x340 ? rcu_read_lock_sched_held+0x3f/0x80 ? kmem_cache_alloc_trace+0x2c4/0x2f0 ? btrfs_get_64+0x5e/0x100 btrfs_recover_balance+0x2f0/0x340 open_ctree+0x1095/0x1726 btrfs_mount_root.cold+0x12/0xea ? rcu_read_lock_sched_held+0x3f/0x80 legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 vfs_kern_mount.part.0+0x71/0xb0 btrfs_mount+0x10d/0x380 ? __kmalloc_track_caller+0x2f2/0x320 legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 ? capable+0x3a/0x60 path_mount+0x433/0xc10 __x64_sys_mount+0xe3/0x120 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9
This is straightforward to fix, simply release the path before we setup the balance_ctl.
--- fs/btrfs/volumes.c | 2 ++ 1 file changed, 2 insertions(+)
fs/btrfs/volumes.c +2 -0
@@ -4011,6 +4011,8 @@ int btrfs_recover_balance(struct btrfs_fbtrfs_warn (fs_info,"balance: cannot set exclusive op status, resume manually" ); +btrfs_release_path (path); +mutex_lock (&fs_info->balance_mutex);BUG_ON (fs_info->balance_ctl);spin_lock (&fs_info->balance_lock);
Greg Kroah-Hartman
maintainerPATCH 6/58 mmc: core: dont initialize block size from ext_csd if not present
In reply to Greg Kroah-HartmanFrom: Peter Collingbourne <[email protected]>
commit b503087445ce7e45fabdee87ca9e460d5b5b5168 upstream.
If extended CSD was not available, the eMMC driver would incorrectly set the block size to 0, as the data_sector_size field of ext_csd was never initialized. This issue was exposed by commit 817046ecddbc ("block: Align max_hw_sectors to logical blocksize") which caused max_sectors and max_hw_sectors to be set to 0 after setting the block size to 0, resulting in a kernel panic in bio_split when attempting to read from the device. Fix it by only reading the block size from ext_csd if it is available.
--- drivers/mmc/core/queue.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/mmc/core/queue.c +3 -1
@@ -364,8 +364,10 @@ static void mmc_setup_queue(struct mmc_q min(host->max_blk_count, host->max_req_size / 512));blk_queue_max_segments (mq->queue, host->max_segs); -if (mmc_card_mmc (card)) +if (mmc_card_mmc (card) && card->ext_csd.data_sector_size) { block_size = card->ext_csd.data_sector_size; +WARN_ON (block_size !=512 && block_size !=4096 ); + }blk_queue_logical_block_size (mq->queue, block_size); blk_queue_max_segment_size(mq->queue,
Greg Kroah-Hartman
maintainerPATCH 7/58 mmc: sdhci-xenon: fix 1.8v regulator stabilization
In reply to Greg Kroah-HartmanFrom: Alex Leibovich <[email protected]>
commit 1a3ed0dc3594d99ff341ec63865a40519ea24b8d upstream.
Automatic Clock Gating is a feature used for the power consumption optimisation. It turned out that during early init phase it may prevent the stable voltage switch to 1.8V - due to that on some platforms an endless printout in dmesg can be observed: "mmc1: 1.8V regulator output did not became stable" Fix the problem by disabling the ACG at very beginning of the sdhci_init and let that be enabled later.
--- drivers/mmc/host/sdhci-xenon.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/mmc/host/sdhci-xenon.c +6 -1
@@ -170,7 +170,12 @@ static void xenon_reset_exit(struct sdhc/* Disable tuning request and auto-retuning again */ xenon_retune_setup (host); -xenon_set_acg (host, true); +/* +* The ACG should be turned off at the early init time, in order +* to solve a possible issues with the 1.8V regulator stabilization. +* The feature is enabled in later stage. +*/ +xenon_set_acg (host, false);xenon_set_sdclk_off_idle (host, sdhc_id, false);
Greg Kroah-Hartman
maintainerPATCH 8/58 dm: avoid filesystem lookup in dm_get_dev_t()
In reply to Greg Kroah-HartmanFrom: Hannes Reinecke <[email protected]>
commit 809b1e4945774c9ec5619a8f4e2189b7b3833c0c upstream.
This reverts commit644bda6f3460 ("dm table: fall back to getting device using name_to_dev_t()")
dm_get_dev_t() is just used to convert an arbitrary 'path' string into a dev_t. It doesn't presume that the device is present; that check will be done later, as the only caller is dm_get_device(), which does a dm_get_table_device() later on, which will properly open the device.
So if the path string already _is_ in major:minor representation we can convert it directly, avoiding a recursion into the filesystem to lookup the block device.
This avoids a hang in multipath_message() when the filesystem is inaccessible.
--- drivers/md/dm-table.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
drivers/md/dm-table.c +12 -3
@@ -431,14 +431,23 @@ int dm_get_device(struct dm_target *ti, {int r;dev_t dev; +unsigned int major, minor; +char dummy;struct dm_dev_internal *dd;struct dm_table *t = ti->table;BUG_ON (!t); - dev =dm_get_dev_t (path); -if (!dev) -return -ENODEV ; +if (sscanf (path,"%u:%u%c" , &major, &minor, &dummy) ==2 ) { +/* Extract the major/minor numbers */ + dev =MKDEV (major, minor); +if (MAJOR (dev) != major ||MINOR (dev) != minor) +return -EOVERFLOW ; + }else { + dev =dm_get_dev_t (path); +if (!dev) +return -ENODEV ; + } dd =find_device (&t->devices, dev);if (!dd) {
Greg Kroah-Hartman
maintainerPATCH 9/58 dm integrity: fix a crash if "recalculate" used without "internal_hash"
In reply to Greg Kroah-HartmanFrom: Mikulas Patocka <[email protected]>
commit 2d06dfecb132a1cc2e374a44eae83b5c4356b8b4 upstream.
Recalculate can only be specified with internal_hash.
--- drivers/md/dm-integrity.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/md/dm-integrity.c +6 -0
@@ -3515,6 +3515,12 @@ try_smaller_buffer: r = -ENOMEM ; goto bad; } + }else { +if (ic->sb->flags &cpu_to_le32 (SB_FLAG_RECALCULATING )) { + ti->error ="Recalculate can only be specified with internal_hash" ; + r = -EINVAL ; + goto bad; + } } ic->bufio = dm_bufio_client_create(ic->meta_dev ? ic->meta_dev->bdev : ic->dev->bdev,
Greg Kroah-Hartman
maintainerPATCH 10/58 drm/atomic: put state on error path
In reply to Greg Kroah-HartmanFrom: Pan Bian <[email protected]>
commit 43b67309b6b2a3c08396cc9b3f83f21aa529d273 upstream.
Put the state before returning error code.
--- drivers/gpu/drm/drm_atomic_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_atomic_helper.c +1 -1
@@ -2938,7 +2938,7 @@ int drm_atomic_helper_set_config(struct ret =handle_conflicting_encoders (state, true);if (ret) -return ret; + goto fail; ret =drm_atomic_commit (state);
Greg Kroah-Hartman
maintainerPATCH 11/58 ASoC: Intel: haswell: Add missing pm_ops
In reply to Greg Kroah-HartmanFrom: Cezary Rojewski <[email protected]>
[ Upstream commit bb224c3e3e41d940612d4cc9573289cdbd5cb8f5 ]
haswell machine board is missing pm_ops what prevents it from undergoing suspend-resume procedure successfully. Assign default snd_soc_pm_ops so this is no longer the case.
--- sound/soc/intel/boards/haswell.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/intel/boards/haswell.c +1 -0
@@ -198,6 +198,7 @@ static struct platform_driver haswell_audio = { .probe = haswell_audio_probe, .driver = { .name = "haswell-audio", + .pm = &snd_soc_pm_ops, }, };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 12/58 dm integrity: select CRYPTO_SKCIPHER
In reply to Greg Kroah-HartmanFrom: Anthony Iliopoulos <[email protected]>
[ Upstream commit f7b347acb5f6c29d9229bb64893d8b6a2c7949fb ]
The integrity target relies on skcipher for encryption/decryption, but certain kernel configurations may not enable CRYPTO_SKCIPHER, leading to compilation errors due to unresolved symbols. Explicitly select CRYPTO_SKCIPHER for DM_INTEGRITY, since it is unconditionally dependent on it.
--- drivers/md/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/md/Kconfig +1 -0
@@ -527,6 +527,7 @@ config DM_INTEGRITY select BLK_DEV_INTEGRITY select DM_BUFIO select CRYPTO + select CRYPTO_SKCIPHER select ASYNC_XOR ---help--- This device-mapper target emulates a block device that has
Signature · 1 line
2.27.0
Re: [PATCH 4.19 12/58] dm integrity: select CRYPTO_SKCIPHER
Hi!
Quoted 9 lines
From: Anthony Iliopoulos <[email protected]>
[ Upstream commit
f7b347acb5f6c29d9229bb64893d8b6a2c7949fb]The integrity target relies on skcipher for encryption/decryption, but certain kernel configurations may not enable
CRYPTO_SKCIPHER, leading to compilation errors due to unresolved symbols. Explicitly selectCRYPTO_SKCIPHERforDM_INTEGRITY, since it is unconditionally dependent on it.
There is no such config option in 4.19. This patch is not suitable here.
grep -r CRYPTO_SKCIPHER . ./include/crypto/skcipher.h:#ifndef _CRYPTO_SKCIPHER_H ./include/crypto/skcipher.h:#define _CRYPTO_SKCIPHER_H
./include/crypto/skcipher.h:#endif /* _CRYPTO_SKCIPHER_H */
Best regards,
Pavel
Quoted 9 lines
+++ b/drivers/md/Kconfig
drivers/md/Kconfig +1
-0@@ -527,6 +527,7 @@ config DM_INTEGRITY select BLK_DEV_INTEGRITY select DM_BUFIO select CRYPTO + select CRYPTO_SKCIPHER select ASYNC_XOR ---help--- This device-mapper target emulates a block device that has
Signature · 1 line
http://www.livejournal.com/~pavelmachek
Re: [PATCH 4.19 12/58] dm integrity: select CRYPTO_SKCIPHER
Quoted 12 lines · Pavel Machek
Hi!
Quoted 9 lines
From: Anthony Iliopoulos <[email protected]>
[ Upstream commit
f7b347acb5f6c29d9229bb64893d8b6a2c7949fb]The integrity target relies on skcipher for encryption/decryption, but certain kernel configurations may not enable
CRYPTO_SKCIPHER, leading to compilation errors due to unresolved symbols. Explicitly selectCRYPTO_SKCIPHERforDM_INTEGRITY, since it is unconditionally dependent on it.
Quoted 7 lines
There is no such config option in 4.19. This patch is not suitable here.
grep -r
CRYPTO_SKCIPHER. ./include/crypto/skcipher.h:#ifndef_CRYPTO_SKCIPHER_H./include/crypto/skcipher.h:#define_CRYPTO_SKCIPHER_H
./include/crypto/skcipher.h:#endif /*_CRYPTO_SKCIPHER_H*/
This is due to commit b95bba5d0114 ("crypto: skcipher - rename the crypto_blkcipher module and kconfig option"), which was applied in v5.5-rc1. As already pointed out in [1], if this is to be backported to any earlier releases then SKCIPHER needs to be changed to BLKCIPHER.
Best regards,
Anthony
[1] https://lore.kernel.org/lkml/YAfD81Jw%[email protected]/#t
Greg Kroah-Hartman
maintainerRe: [PATCH 4.19 12/58] dm integrity: select CRYPTO_SKCIPHER
In reply to Pavel MachekQuoted 23 lines · Pavel Machek
Hi!
Quoted 9 lines
From: Anthony Iliopoulos <[email protected]>
[ Upstream commit
f7b347acb5f6c29d9229bb64893d8b6a2c7949fb]The integrity target relies on skcipher for encryption/decryption, but certain kernel configurations may not enable
CRYPTO_SKCIPHER, leading to compilation errors due to unresolved symbols. Explicitly selectCRYPTO_SKCIPHERforDM_INTEGRITY, since it is unconditionally dependent on it.There is no such config option in 4.19. This patch is not suitable here.
grep -r
CRYPTO_SKCIPHER. ./include/crypto/skcipher.h:#ifndef_CRYPTO_SKCIPHER_H./include/crypto/skcipher.h:#define_CRYPTO_SKCIPHER_H
./include/crypto/skcipher.h:#endif /*_CRYPTO_SKCIPHER_H*/Best regards,
Pavel
Quoted 9 lines
drivers/md/Kconfig config DM_INTEGRITY · line 533
Quoted 9 lines
+++ b/drivers/md/Kconfig
drivers/md/Kconfig +1
-0@@ -527,6 +527,7 @@ config DM_INTEGRITY select BLK_DEV_INTEGRITY select DM_BUFIO select CRYPTO + select CRYPTO_SKCIPHER select ASYNC_XOR ---help--- This device-mapper target emulates a block device that has
Good catch, now dropped, thanks.
greg k-h
Greg Kroah-Hartman
maintainerPATCH 13/58 scsi: ufs: Correct the LUN used in eh_device_reset_handler() callback
In reply to Greg Kroah-HartmanFrom: Can Guo <[email protected]>
[ Upstream commit 35fc4cd34426c242ab015ef280853b7bff101f48 ]
Users can initiate resets to specific SCSI device/target/host through IOCTL. When this happens, the SCSI cmd passed to eh_device/target/host _reset_handler() callbacks is initialized with a request whose tag is -1. In this case it is not right for eh_device_reset_handler() callback to count on the LUN get from hba->lrb[-1]. Fix it by getting LUN from the SCSI device associated with the SCSI cmd.
--- drivers/scsi/ufs/ufshcd.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/scsi/ufs/ufshcd.c +4 -7
@@ -5772,19 +5772,16 @@ static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd) {struct Scsi_Host *host;struct ufs_hba *hba; -unsigned int tag;u32 pos;int err; -u8 resp =0xF ; -struct ufshcd_lrb *lrbp; +u8 resp =0xF , lun;unsigned long flags; host = cmd->device->host; hba =shost_priv (host); - tag = cmd->request->tag; - lrbp = &hba->lrb[tag]; - err =ufshcd_issue_tm_cmd (hba, lrbp->lun,0 ,UFS_LOGICAL_RESET , &resp); + lun =ufshcd_scsi_to_upiu_lun (cmd->device->lun); + err =ufshcd_issue_tm_cmd (hba, lun,0 ,UFS_LOGICAL_RESET , &resp);if (err || resp !=UPIU_TASK_MANAGEMENT_FUNC_COMPL ) {if (!err) err = resp;
@@ -5793,7 +5790,7 @@ static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd)/* clear the commands that were pending for corresponding LUN */ for_each_set_bit (pos, &hba->outstanding_reqs, hba->nutrs) { -if (hba->lrb[pos].lun == lrbp->lun) { +if (hba->lrb[pos].lun == lun) { err =ufshcd_clear_cmd (hba, pos);if (err)break ;
Signature · 1 line
2.27.0
Hi!
Quoted 4 lines
This is the start of the stable review cycle for the 4.19.171 release. There are 58 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
CIP testing did not find any problems here:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-4.19.y
Best regards,
Pavel
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Greg Kroah-Hartman
maintainerPATCH 14/58 scsi: qedi: Correct max length of CHAP secret
In reply to Greg Kroah-HartmanFrom: Nilesh Javali <[email protected]>
[ Upstream commit d50c7986fbf0e2167279e110a2ed5bd8e811c660 ]
The CHAP secret displayed garbage characters causing iSCSI login authentication failure. Correct the CHAP password max length.
--- drivers/scsi/qedi/qedi_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/qedi/qedi_main.c +2 -2
@@ -2129,7 +2129,7 @@ qedi_show_boot_tgt_info(struct qedi_ctx *qedi, int type, chap_name);break ;case ISCSI_BOOT_TGT_CHAP_SECRET : - rc =sprintf (buf,"%.*s\n" ,NVM_ISCSI_CFG_CHAP_NAME_MAX_LEN , + rc =sprintf (buf,"%.*s\n" ,NVM_ISCSI_CFG_CHAP_PWD_MAX_LEN , chap_secret);break ;case ISCSI_BOOT_TGT_REV_CHAP_NAME :
@@ -2137,7 +2137,7 @@ qedi_show_boot_tgt_info(struct qedi_ctx *qedi, int type, mchap_name);break ;case ISCSI_BOOT_TGT_REV_CHAP_SECRET : - rc =sprintf (buf,"%.*s\n" ,NVM_ISCSI_CFG_CHAP_NAME_MAX_LEN , + rc =sprintf (buf,"%.*s\n" ,NVM_ISCSI_CFG_CHAP_PWD_MAX_LEN , mchap_secret);break ;case ISCSI_BOOT_TGT_FLAGS :
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 15/58 riscv: Fix kernel time_init()
In reply to Greg Kroah-HartmanFrom: Damien Le Moal <[email protected]>
[ Upstream commit 11f4c2e940e2f317c9d8fb5a79702f2a4a02ff98 ]
If of_clk_init() is not called in time_init(), clock providers defined in the system device tree are not initialized, resulting in failures for other devices to initialize due to missing clocks.
Similarly to other architectures and to the default kernel time_init() implementation, call of_clk_init() before executing timer_probe() in time_init().
--- arch/riscv/kernel/time.c | 3 +++ 1 file changed, 3 insertions(+)
arch/riscv/kernel/time.c +3 -0
@@ -12,6 +12,7 @@* GNU General Public License for more details. */ +#include <linux/of_clk.h> #include <linux/clocksource.h> #include <linux/delay.h> #include <asm/sbi.h>
@@ -29,5 +30,7 @@ void __init time_init(void) riscv_timebase = prop; lpj_fine = riscv_timebase /HZ ; + +of_clk_init (NULL );timer_probe (); }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 16/58 HID: Ignore battery for Elan touchscreen on ASUS UX550
In reply to Greg Kroah-HartmanFrom: Seth Miller <[email protected]>
[ Upstream commit 7c38e769d5c508939ce5dc26df72602f3c902342 ]
Battery status is being reported for the Elan touchscreen on ASUS UX550 laptops despite not having a batter. It always shows either 0 or 1%.
--- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-input.c | 2 ++ 2 files changed, 3 insertions(+)
drivers/hid/hid-ids.h +1 -0
@@ -386,6 +386,7 @@#define USB_DEVICE_ID_TOSHIBA_CLICK_L9W 0x0401#define USB_DEVICE_ID_HP_X2 0x074d#define USB_DEVICE_ID_HP_X2_10_COVER 0x0755 +#define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN 0x2706#define USB_VENDOR_ID_ELECOM 0x056e#define USB_DEVICE_ID_ELECOM_BM084 0x0061
drivers/hid/hid-input.c +2 -0
@@ -334,6 +334,8 @@ static const struct hid_device_id hid_battery_quirks[] = { {HID_BLUETOOTH_DEVICE (USB_VENDOR_ID_LOGITECH ,USB_DEVICE_ID_LOGITECH_DINOVO_EDGE_KBD ), HID_BATTERY_QUIRK_IGNORE }, + { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN), + HID_BATTERY_QUIRK_IGNORE }, {} };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 17/58 clk: tegra30: Add hda clock default rates to clock driver
In reply to Greg Kroah-HartmanFrom: Peter Geis <[email protected]>
[ Upstream commit f4eccc7fea203cfb35205891eced1ab51836f362 ]
Current implementation defaults the hda clocks to clk_m. This causes hda to run too slow to operate correctly. Fix this by defaulting to pll_p and setting the frequency to the correct rate.
This matches upstream t124 and downstream t30.
--- drivers/clk/tegra/clk-tegra30.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/clk/tegra/clk-tegra30.c +2 -0
@@ -1274,6 +1274,8 @@ static struct tegra_clk_init_table init_table[] __initdata = { { TEGRA30_CLK_I2S3_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 }, { TEGRA30_CLK_I2S4_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 }, { TEGRA30_CLK_VIMCLK_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 }, + { TEGRA30_CLK_HDA, TEGRA30_CLK_PLL_P, 102000000, 0 }, + { TEGRA30_CLK_HDA2CODEC_2X, TEGRA30_CLK_PLL_P, 48000000, 0 },/* must be the last entry */ { TEGRA30_CLK_CLK_MAX, TEGRA30_CLK_CLK_MAX, 0, 0 }, };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 18/58 xen: Fix event channel callback via INTX/GSI
In reply to Greg Kroah-HartmanFrom: David Woodhouse <[email protected]>
[ Upstream commit 3499ba8198cad47b731792e5e56b9ec2a78a83a2 ]
For a while, event channel notification via the PCI platform device has been broken, because we attempt to communicate with xenstore before we even have notifications working, with the xs_reset_watches() call in xs_init().
We tend to get away with this on Xen versions below 4.0 because we avoid calling xs_reset_watches() anyway, because xenstore might not cope with reading a non-existent key. And newer Xen *does* have the vector callback support, so we rarely fall back to INTX/GSI delivery.
To fix it, clean up a bit of the mess of xs_init() and xenbus_probe() startup. Call xs_init() directly from xenbus_init() only in the !XS_HVM case, deferring it to be called from xenbus_probe() in the XS_HVM case instead.
Then fix up the invocation of xenbus_probe() to happen either from its device_initcall if the callback is available early enough, or when the callback is finally set up. This means that the hack of calling xenbus_probe() from a workqueue after the first interrupt, or directly from the PCI platform device setup, is no longer needed.
--- arch/arm/xen/enlighten.c | 2 +- drivers/xen/events/events_base.c | 10 ---- drivers/xen/platform-pci.c | 1 - drivers/xen/xenbus/xenbus.h | 1 + drivers/xen/xenbus/xenbus_comms.c | 8 --- drivers/xen/xenbus/xenbus_probe.c | 81 +++++++++++++++++++++++++------ include/xen/xenbus.h | 2 +- 7 files changed, 70 insertions(+), 35 deletions(-)
arch/arm/xen/enlighten.c +1 -1
@@ -405,7 +405,7 @@ static int __init xen_guest_init(void) }gnttab_init ();if (!xen_initial_domain ()) -xenbus_probe (NULL ); +xenbus_probe ();/* * Making sure board specific code will not set up ops for
drivers/xen/events/events_base.c +0 -10
@@ -1987,16 +1987,6 @@ static struct irq_chip xen_percpu_chip __read_mostly = { .irq_ack = ack_dynirq, }; -int xen_set_callback_via (uint64_t via) -{ -struct xen_hvm_param a; - a.domid =DOMID_SELF ; - a.index =HVM_PARAM_CALLBACK_IRQ ; - a.value = via; -return HYPERVISOR_hvm_op (HVMOP_set_param, &a); -} -EXPORT_SYMBOL_GPL (xen_set_callback_via); -#ifdef CONFIG_XEN_PVHVM /* Vector callbacks are better than PCI interrupts to receive event * channel notifications because we can receive vector callbacks on any
drivers/xen/platform-pci.c +0 -1
@@ -162,7 +162,6 @@ static int platform_pci_probe(struct pci_dev *pdev, ret =gnttab_init ();if (ret) goto grant_out; -xenbus_probe (NULL );return 0 ; grant_out:gnttab_free_auto_xlat_frames ();
drivers/xen/xenbus/xenbus.h +1 -0
@@ -115,6 +115,7 @@ int xenbus_probe_node(struct xen_bus_type *bus,const char *type, const char *nodename);int xenbus_probe_devices (struct xen_bus_type *bus); +void xenbus_probe (void );void xenbus_dev_changed (const char *node,struct xen_bus_type *bus);
drivers/xen/xenbus/xenbus_comms.c +0 -8
@@ -57,16 +57,8 @@ DEFINE_MUTEX(xs_response_mutex);static int xenbus_irq;static struct task_struct *xenbus_task; -static DECLARE_WORK(probe_work, xenbus_probe); - -static irqreturn_t wake_waiting (int irq,void *unused) { -if (unlikely (xenstored_ready ==0 )) { - xenstored_ready =1 ; -schedule_work (&probe_work); - } -wake_up (&xb_waitq);return IRQ_HANDLED ; }
drivers/xen/xenbus/xenbus_probe.c +67 -14
107 lines not on this page · raw message
include/xen/xenbus.h +1 -1
@@ -187,7 +187,7 @@ void xs_suspend_cancel(void);struct work_struct ; -void xenbus_probe (struct work_struct *); +void xenbus_probe (void );#define XENBUS_IS_ERR_READ (str) ({ \ if (!IS_ERR(str) && strlen(str) == 0) { \
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 19/58 drm/nouveau/bios: fix issue shadowing expansion ROMs
In reply to Greg Kroah-HartmanFrom: Ben Skeggs <[email protected]>
[ Upstream commit 402a89660e9dc880710b12773076a336c9dab3d7 ]
This issue has generally been covered up by the presence of additional expansion ROMs after the ones we're interested in, with header fetches of subsequent images loading enough of the ROM to hide the issue.
Noticed on GA102, which lacks a type 0x70 image compared to TU102,.
[ 906.364197] nouveau 0000:09:00.0: bios: 00000000: type 00, 65024 bytes [ 906.381205] nouveau 0000:09:00.0: bios: 0000fe00: type 03, 91648 bytes [ 906.405213] nouveau 0000:09:00.0: bios: 00026400: type e0, 22016 bytes [ 906.410984] nouveau 0000:09:00.0: bios: 0002ba00: type e0, 366080 bytes
vs
[ 22.961901] nouveau 0000:09:00.0: bios: 00000000: type 00, 60416 bytes [ 22.984174] nouveau 0000:09:00.0: bios: 0000ec00: type 03, 71168 bytes [ 23.010446] nouveau 0000:09:00.0: bios: 00020200: type e0, 48128 bytes [ 23.028220] nouveau 0000:09:00.0: bios: 0002be00: type e0, 140800 bytes [ 23.080196] nouveau 0000:09:00.0: bios: 0004e400: type 70, 7168 bytes
--- drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c +1 -1
@@ -75,7 +75,7 @@ shadow_image(struct nvkm_bios *bios, int idx, u32 offset, struct shadow *mthd)nvkm_debug (subdev,"%08x: type %02x, %d bytes\n" , image.base, image.type, image.size); -if (!shadow_fetch (bios, mthd, image.size)) { +if (!shadow_fetch (bios, mthd, image.base + image.size)) {nvkm_debug (subdev,"%08x: fetch failed\n" , image.base);return 0 ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 20/58 drm/nouveau/privring: ack interrupts the same way as RM
In reply to Greg Kroah-HartmanFrom: Ben Skeggs <[email protected]>
[ Upstream commit e05e06cd34f5311f677294a08b609acfbc315236 ]
Whatever it is that we were doing before doesn't work on Ampere.
--- drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c | 10 +++++++--- drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-)
drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c +7 -3
@@ -22,6 +22,7 @@* Authors: Ben Skeggs */ #include "priv.h" +#include <subdev/timer.h> static void gf100_ibus_intr_hub (struct nvkm_subdev *ibus,int i)
@@ -31,7 +32,6 @@ gf100_ibus_intr_hub(struct nvkm_subdev *ibus, int i)u32 data =nvkm_rd32 (device,0x122124 + (i *0x0400 ));u32 stat =nvkm_rd32 (device,0x122128 + (i *0x0400 ));nvkm_debug (ibus,"HUB%d: %06x %08x (%08x)\n" , i, addr, data, stat); -nvkm_mask (device,0x122128 + (i *0x0400 ),0x00000200 ,0x00000000 ); } static void
@@ -42,7 +42,6 @@ gf100_ibus_intr_rop(struct nvkm_subdev *ibus, int i)u32 data =nvkm_rd32 (device,0x124124 + (i *0x0400 ));u32 stat =nvkm_rd32 (device,0x124128 + (i *0x0400 ));nvkm_debug (ibus,"ROP%d: %06x %08x (%08x)\n" , i, addr, data, stat); -nvkm_mask (device,0x124128 + (i *0x0400 ),0x00000200 ,0x00000000 ); } static void
@@ -53,7 +52,6 @@ gf100_ibus_intr_gpc(struct nvkm_subdev *ibus, int i)u32 data =nvkm_rd32 (device,0x128124 + (i *0x0400 ));u32 stat =nvkm_rd32 (device,0x128128 + (i *0x0400 ));nvkm_debug (ibus,"GPC%d: %06x %08x (%08x)\n" , i, addr, data, stat); -nvkm_mask (device,0x128128 + (i *0x0400 ),0x00000200 ,0x00000000 ); }void
@@ -90,6 +88,12 @@ gf100_ibus_intr(struct nvkm_subdev *ibus) intr1 &= ~stat; } } + +nvkm_mask (device,0x121c4c ,0x0000003f ,0x00000002 ); +nvkm_msec (device,2000 , + if (!(nvkm_rd32(device, 0x121c4c) & 0x0000003f)) + break; + ); } static int
drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c +7 -3
@@ -22,6 +22,7 @@* Authors: Ben Skeggs */ #include "priv.h" +#include <subdev/timer.h> static void gk104_ibus_intr_hub (struct nvkm_subdev *ibus,int i)
@@ -31,7 +32,6 @@ gk104_ibus_intr_hub(struct nvkm_subdev *ibus, int i)u32 data =nvkm_rd32 (device,0x122124 + (i *0x0800 ));u32 stat =nvkm_rd32 (device,0x122128 + (i *0x0800 ));nvkm_debug (ibus,"HUB%d: %06x %08x (%08x)\n" , i, addr, data, stat); -nvkm_mask (device,0x122128 + (i *0x0800 ),0x00000200 ,0x00000000 ); } static void
@@ -42,7 +42,6 @@ gk104_ibus_intr_rop(struct nvkm_subdev *ibus, int i)u32 data =nvkm_rd32 (device,0x124124 + (i *0x0800 ));u32 stat =nvkm_rd32 (device,0x124128 + (i *0x0800 ));nvkm_debug (ibus,"ROP%d: %06x %08x (%08x)\n" , i, addr, data, stat); -nvkm_mask (device,0x124128 + (i *0x0800 ),0x00000200 ,0x00000000 ); } static void
@@ -53,7 +52,6 @@ gk104_ibus_intr_gpc(struct nvkm_subdev *ibus, int i)u32 data =nvkm_rd32 (device,0x128124 + (i *0x0800 ));u32 stat =nvkm_rd32 (device,0x128128 + (i *0x0800 ));nvkm_debug (ibus,"GPC%d: %06x %08x (%08x)\n" , i, addr, data, stat); -nvkm_mask (device,0x128128 + (i *0x0800 ),0x00000200 ,0x00000000 ); }void
@@ -90,6 +88,12 @@ gk104_ibus_intr(struct nvkm_subdev *ibus) intr1 &= ~stat; } } + +nvkm_mask (device,0x12004c ,0x0000003f ,0x00000002 ); +nvkm_msec (device,2000 , + if (!(nvkm_rd32(device, 0x12004c) & 0x0000003f)) + break; + ); } static int
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 21/58 drm/nouveau/i2c/gm200: increase width of aux semaphore owner fields
In reply to Greg Kroah-HartmanFrom: Ben Skeggs <[email protected]>
[ Upstream commit ba6e9ab0fcf3d76e3952deb12b5f993991621d9c ]
Noticed while debugging GA102.
--- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c +4 -4
@@ -33,7 +33,7 @@ static void gm200_i2c_aux_fini(struct gm200_i2c_aux *aux) {struct nvkm_device *device = aux->base.pad->i2c->subdev.device; -nvkm_mask (device,0x00d954 + (aux->ch *0x50 ),0x00310000 ,0x00000000 ); +nvkm_mask (device,0x00d954 + (aux->ch *0x50 ),0x00710000 ,0x00000000 ); } static int
@@ -54,10 +54,10 @@ gm200_i2c_aux_init(struct gm200_i2c_aux *aux)AUX_ERR (&aux->base,"begin idle timeout %08x" , ctrl);return -EBUSY ; } - }while (ctrl &0x03010000 ); + }while (ctrl &0x07010000 );/* set some magic, and wait up to 1ms for it to appear */ -nvkm_mask (device,0x00d954 + (aux->ch *0x50 ),0x00300000 , ureq); +nvkm_mask (device,0x00d954 + (aux->ch *0x50 ),0x00700000 , ureq); timeout =1000 ; do { ctrl = nvkm_rd32(device, 0x00d954 + (aux->ch * 0x50));
@@ -67,7 +67,7 @@ gm200_i2c_aux_init(struct gm200_i2c_aux *aux)gm200_i2c_aux_fini (aux);return -EBUSY ; } - }while ((ctrl &0x03000000 ) != urep); + }while ((ctrl &0x07000000 ) != urep);return 0 ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 22/58 drm/nouveau/mmu: fix vram heap sizing
In reply to Greg Kroah-HartmanFrom: Ben Skeggs <[email protected]>
[ Upstream commit add42781ad76c5ae65127bf13852a4c6b2f08849 ]
--- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c +3 -3
@@ -316,9 +316,9 @@ nvkm_mmu_vram(struct nvkm_mmu *mmu) {struct nvkm_device *device = mmu->subdev.device;struct nvkm_mm *mm = &device->fb->ram->vram; -const u32 sizeN =nvkm_mm_heap_size (mm,NVKM_RAM_MM_NORMAL ); -const u32 sizeU =nvkm_mm_heap_size (mm,NVKM_RAM_MM_NOMAP ); -const u32 sizeM =nvkm_mm_heap_size (mm,NVKM_RAM_MM_MIXED ); +const u64 sizeN =nvkm_mm_heap_size (mm,NVKM_RAM_MM_NORMAL ); +const u64 sizeU =nvkm_mm_heap_size (mm,NVKM_RAM_MM_NOMAP ); +const u64 sizeM =nvkm_mm_heap_size (mm,NVKM_RAM_MM_MIXED );u8 type =NVKM_MEM_KIND * !!mmu->func->kind;u8 heap =NVKM_MEM_VRAM ;int heapM, heapN, heapU;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 23/58 drm/nouveau/kms/nv50-: fix case where notifier buffer is at offset 0
In reply to Greg Kroah-HartmanFrom: Ben Skeggs <[email protected]>
[ Upstream commit caeb6ab899c3d36a74cda6e299c6e1c9c4e2a22e ]
VRAM offset 0 is a valid address, triggered on GA102.
--- drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 ++-- drivers/gpu/drm/nouveau/dispnv50/disp.h | 2 +- drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/nouveau/dispnv50/disp.c +2 -2
@@ -131,7 +131,7 @@ nv50_dmac_destroy(struct nv50_dmac *dmac)int nv50_dmac_create (struct nvif_device *device,struct nvif_object *disp, -const s32 *oclass,u8 head,void *data,u32 size,u64 syncbuf, +const s32 *oclass,u8 head,void *data,u32 size,s64 syncbuf,struct nv50_dmac *dmac) {struct nouveau_cli *cli = (void *)device->object.client;
@@ -166,7 +166,7 @@ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,if (ret)return ret; -if (!syncbuf) +if (syncbuf <0 )return 0 ; ret = nvif_object_init(&dmac->base.user, 0xf0000000, NV_DMA_IN_MEMORY,
drivers/gpu/drm/nouveau/dispnv50/disp.h +1 -1
@@ -68,7 +68,7 @@ struct nv50_dmac {int nv50_dmac_create (struct nvif_device *device,struct nvif_object *disp,const s32 *oclass,u8 head,void *data,u32 size, -u64 syncbuf,struct nv50_dmac *dmac); +s64 syncbuf,struct nv50_dmac *dmac);void nv50_dmac_destroy (struct nv50_dmac *);u32 *evo_wait (struct nv50_dmac *,int nr);
drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c +1 -1
@@ -68,7 +68,7 @@ wimmc37b_init_(const struct nv50_wimm_func *func, struct nouveau_drm *drm,int ret; ret =nv50_dmac_create (&drm->client.device, &disp->disp->object, - &oclass,0 , &args,sizeof (args),0 , + &oclass,0 , &args,sizeof (args),-1 , &wndw->wimm);if (ret) {NV_ERROR (drm,"wimm%04x allocation failed: %d\n" , oclass, ret);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 24/58 scsi: megaraid_sas: Fix MEGASAS_IOC_FIRMWARE regression
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
[ Upstream commit b112036535eda34460677ea883eaecc3a45a435d ]
Phil Oester reported that a fix for a possible buffer overrun that I sent caused a regression that manifests in this output:
Event Message: A PCI parity error was detected on a component at bus 0 device 5 function 0.
Severity: Critical
Message ID: PCI1308
The original code tried to handle the sense data pointer differently when using 32-bit 64-bit DMA addressing, which would lead to a 32-bit dma_addr_t value of 0x11223344 to get stored
32-bit kernel: 44 33 22 11 ?? ?? ?? ?? 64-bit LE kernel: 44 33 22 11 00 00 00 00 64-bit BE kernel: 00 00 00 00 44 33 22 11
or a 64-bit dma_addr_t value of 0x1122334455667788 to get stored as
32-bit kernel: 88 77 66 55 ?? ?? ?? ??
64-bit kernel: 88 77 66 55 44 33 22 11
In my patch, I tried to ensure that the same value is used on both 32-bit and 64-bit kernels, and picked what seemed to be the most sensible combination, storing 32-bit addresses in the first four bytes (as 32-bit kernels already did), and 64-bit addresses in eight consecutive bytes (as 64-bit kernels already did), but evidently this was incorrect.
Always storing the dma_addr_t pointer as 64-bit little-endian, i.e. initializing the second four bytes to zero in case of 32-bit addressing, apparently solved the problem for Phil, and is consistent with what all 64-bit little-endian machines did before.
I also checked in the history that in previous versions of the code, the pointer was always in the first four bytes without padding, and that previous attempts to fix 64-bit user space, big-endian architectures and 64-bit DMA were clearly flawed and seem to have introduced made this worse.
--- drivers/scsi/megaraid/megaraid_sas_base.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/scsi/megaraid/megaraid_sas_base.c +2 -4
@@ -7323,11 +7323,9 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance, goto out; } +/* always store 64 bits regardless of addressing */ sense_ptr = (void *)cmd->frame + ioc->sense_off; -if (instance->consistent_mask_64bit) -put_unaligned_le64 (sense_handle, sense_ptr); -else -put_unaligned_le32 (sense_handle, sense_ptr); +put_unaligned_le64 (sense_handle, sense_ptr); }/*
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 25/58 i2c: octeon: check correct size of maximum RECV_LEN packet
In reply to Greg Kroah-HartmanFrom: Wolfram Sang <[email protected]>
[ Upstream commit 1b2cfa2d1dbdcc3b6dba1ecb7026a537a1d7277f ]
I2C_SMBUS_BLOCK_MAX defines already the maximum number as defined in the SMBus 2.0 specs. No reason to add one to it.
--- drivers/i2c/busses/i2c-octeon-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-octeon-core.c +1 -1
@@ -347,7 +347,7 @@ static int octeon_i2c_read(struct octeon_i2c *i2c, int target,if (result)return result;if (recv_len && i ==0 ) { -if (data[i] >I2C_SMBUS_BLOCK_MAX +1 ) +if (data[i] >I2C_SMBUS_BLOCK_MAX )return -EPROTO ; length += data[i]; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 26/58 platform/x86: intel-vbtn: Drop HP Stream x360 Convertible PC 11 from allow-list
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit 070222731be52d741e55d8967b1764482b81e54c ]
THe HP Stream x360 Convertible PC 11 DSDT has the following VGBS function:
Method (VGBS, 0, Serialized)
{
If ((^^PCI0.LPCB.EC0.ROLS == Zero))
{
VBDS = Zero
}
Else
{
VBDS = Zero
}
Return (VBDS) /* \_SB_.VGBI.VBDS */
}Which is obviously wrong, because it always returns 0 independent of the 2-in-1 being in laptop or tablet mode. This causes the intel-vbtn driver to initially report SW_TABLET_MODE = 1 to userspace, which is known to cause problems when the 2-in-1 is actually in laptop mode.
During earlier testing this turned out to not be a problem because the 2-in-1 would do a Notify(..., 0xCC) or Notify(..., 0xCD) soon after the intel-vbtn driver loaded, correcting the SW_TABLET_MODE state.
Further testing however has shown that this Notify() soon after the intel-vbtn driver loads, does not always happen. When the Notify does not happen, then intel-vbtn reports SW_TABLET_MODE = 1 resulting in a non-working touchpad.
IOW the tablet-mode reporting is not reliable on this device, so it should be dropped from the allow-list, fixing the touchpad sometimes not working.
--- drivers/platform/x86/intel-vbtn.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/platform/x86/intel-vbtn.c +0 -6
@@ -191,12 +191,6 @@ static const struct dmi_system_id dmi_switches_allow_list[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Venue 11 Pro 7130"), }, }, - { - .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"Hewlett-Packard" ), - DMI_MATCH(DMI_PRODUCT_NAME, "HP Stream x360 Convertible PC 11"), - }, - }, { .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 27/58 selftests: net: fib_tests: remove duplicate log test
In reply to Greg Kroah-HartmanFrom: Hangbin Liu <[email protected]>
[ Upstream commit fd23d2dc180fccfad4b27a8e52ba1bc415d18509 ]
The previous test added an address with a specified metric and check if correspond route was created. I somehow added two logs for the same test. Remove the duplicated one.
--- tools/testing/selftests/net/fib_tests.sh | 1 - 1 file changed, 1 deletion(-)
tools/testing/selftests/net/fib_tests.sh +0 -1
@@ -987,7 +987,6 @@ ipv6_addr_metric_test() check_route6 "2001:db8:104::1 dev dummy2 proto kernel metric 260" log_test $? 0 "Set metric with peer route on local side" - log_test $? 0 "User specified metric on local address" check_route6 "2001:db8:104::2 dev dummy2 proto kernel metric 260" log_test $? 0 "Set metric with peer route on peer side"
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 28/58 can: dev: can_restart: fix use after free bug
In reply to Greg Kroah-HartmanFrom: Vincent Mailhol <[email protected]>
[ Upstream commit 03f16c5075b22c8902d2af739969e878b0879c94 ]
After calling netif_rx_ni(skb), dereferencing skb is unsafe. Especially, the can_frame cf which aliases skb memory is accessed after the netif_rx_ni() in:
stats->rx_bytes += cf->len;
Reordering the lines solves the issue.
--- drivers/net/can/dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/can/dev.c +2 -2
@@ -579,11 +579,11 @@ static void can_restart(struct net_device *dev) } cf->can_id |=CAN_ERR_RESTARTED ; -netif_rx_ni (skb); - stats->rx_packets++; stats->rx_bytes += cf->can_dlc; +netif_rx_ni (skb); + restart:netdev_dbg (dev,"restarted\n" ); priv->can_stats.restarts++;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 29/58 can: vxcan: vxcan_xmit: fix use after free bug
In reply to Greg Kroah-HartmanFrom: Vincent Mailhol <[email protected]>
[ Upstream commit 75854cad5d80976f6ea0f0431f8cedd3bcc475cb ]
After calling netif_rx_ni(skb), dereferencing skb is unsafe. Especially, the canfd_frame cfd which aliases skb memory is accessed after the netif_rx_ni().
--- drivers/net/can/vxcan.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/can/vxcan.c +4 -2
@@ -49,6 +49,7 @@ static netdev_tx_t vxcan_xmit(struct sk_buff *skb, struct net_device *dev)struct net_device *peer;struct canfd_frame *cfd = (struct canfd_frame *)skb->data;struct net_device_stats *peerstats, *srcstats = &dev->stats; +u8 len;if (can_dropped_invalid_skb (dev, skb))return NETDEV_TX_OK ;
@@ -71,12 +72,13 @@ static netdev_tx_t vxcan_xmit(struct sk_buff *skb, struct net_device *dev) skb->dev = peer; skb->ip_summed =CHECKSUM_UNNECESSARY ; + len = cfd->len;if (netif_rx_ni (skb) ==NET_RX_SUCCESS ) { srcstats->tx_packets++; - srcstats->tx_bytes += cfd->len; + srcstats->tx_bytes += len; peerstats = &peer->stats; peerstats->rx_packets++; - peerstats->rx_bytes += cfd->len; + peerstats->rx_bytes += len; } out_unlock:
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 30/58 can: peak_usb: fix use after free bugs
In reply to Greg Kroah-HartmanFrom: Vincent Mailhol <[email protected]>
[ Upstream commit 50aca891d7a554db0901b245167cd653d73aaa71 ]
After calling peak_usb_netif_rx_ni(skb), dereferencing skb is unsafe. Especially, the can_frame cf which aliases skb memory is accessed after the peak_usb_netif_rx_ni().
Reordering the lines solves the issue.
--- drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/can/usb/peak_usb/pcan_usb_fd.c +4 -4
@@ -520,11 +520,11 @@ static int pcan_usb_fd_decode_canmsg(struct pcan_usb_fd_if *usb_if,else memcpy (cfd->data, rm->d, cfd->len); -peak_usb_netif_rx (skb, &usb_if->time_ref,le32_to_cpu (rm->ts_low)); - netdev->stats.rx_packets++; netdev->stats.rx_bytes += cfd->len; +peak_usb_netif_rx (skb, &usb_if->time_ref,le32_to_cpu (rm->ts_low)); +return 0 ; }
@@ -586,11 +586,11 @@ static int pcan_usb_fd_decode_status(struct pcan_usb_fd_if *usb_if,if (!skb)return -ENOMEM ; -peak_usb_netif_rx (skb, &usb_if->time_ref,le32_to_cpu (sm->ts_low)); - netdev->stats.rx_packets++; netdev->stats.rx_bytes += cf->can_dlc; +peak_usb_netif_rx (skb, &usb_if->time_ref,le32_to_cpu (sm->ts_low)); +return 0 ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 31/58 iio: ad5504: Fix setting power-down state
In reply to Greg Kroah-HartmanFrom: Lars-Peter Clausen <[email protected]>
commit efd597b2839a9895e8a98fcb0b76d2f545802cd4 upstream.
The power-down mask of the ad5504 is actually a power-up mask. Meaning if a bit is set the corresponding channel is powered up and if it is not set the channel is powered down.
The driver currently has this the wrong way around, resulting in the channel being powered up when requested to be powered down and vice versa.
--- drivers/iio/dac/ad5504.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/dac/ad5504.c +2 -2
@@ -189,9 +189,9 @@ static ssize_t ad5504_write_dac_powerdowreturn ret;if (pwr_down) - st->pwr_down_mask |= (1 << chan->channel); -else st->pwr_down_mask &= ~(1 << chan->channel); +else + st->pwr_down_mask |= (1 << chan->channel); ret = ad5504_spi_write(st, AD5504_ADDR_CTRL, AD5504_DAC_PWRDWN_MODE(st->pwr_down_mode) |
Greg Kroah-Hartman
maintainerPATCH 32/58 irqchip/mips-cpu: Set IPI domain parent chip
In reply to Greg Kroah-HartmanFrom: Mathias Kresin <[email protected]>
commit 599b3063adf4bf041a87a69244ee36aded0d878f upstream.
Since commit 55567976629e ("genirq/irqdomain: Allow partial trimming of irq_data hierarchy") the irq_data chain is valided.
The irq_domain_trim_hierarchy() function doesn't consider the irq + ipi domain hierarchy as valid, since the ipi domain has the irq domain set as parent, but the parent domain has no chip set. Hence the boot ends in a kernel panic.
Set the chip for the parent domain as it is done in the mips gic irq driver, to have a valid irq_data chain.
--- drivers/irqchip/irq-mips-cpu.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/irqchip/irq-mips-cpu.c +7 -0
@@ -201,6 +201,13 @@ static int mips_cpu_ipi_alloc(struct irqif (ret)return ret; + ret =irq_domain_set_hwirq_and_chip (domain->parent, virq + i, hwirq, + &mips_mt_cpu_irq_controller, +NULL ); + +if (ret) +return ret; + ret =irq_set_irq_type (virq + i,IRQ_TYPE_LEVEL_HIGH );if (ret)return ret;
Greg Kroah-Hartman
maintainerPATCH 33/58 intel_th: pci: Add Alder Lake-P support
In reply to Greg Kroah-HartmanFrom: Alexander Shishkin <[email protected]>
commit cb5c681ab9037e25fcca20689c82cf034566d610 upstream.
This adds support for the Trace Hub in Alder Lake-P.
--- drivers/hwtracing/intel_th/pci.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/hwtracing/intel_th/pci.c +5 -0
@@ -231,6 +231,11 @@ static const struct pci_device_id intel_ .driver_data = (kernel_ulong_t)&intel_th_2x, }, { +/* Alder Lake-P */ + PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x51a6), + .driver_data = (kernel_ulong_t)&intel_th_2x, + }, + {/* Emmitsburg PCH */ PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x1bcc ), .driver_data = (kernel_ulong_t)&intel_th_2x,
Greg Kroah-Hartman
maintainerPATCH 34/58 stm class: Fix module init return on allocation failure
In reply to Greg Kroah-HartmanFrom: Wang Hui <[email protected]>
commit 927633a6d20af319d986f3e42c3ef9f6d7835008 upstream.
In stm_heartbeat_init(): return value gets reset after the first iteration by stm_source_register_device(), so allocation failures after that will, after a clean up, return success. Fix that.
--- drivers/hwtracing/stm/heartbeat.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/hwtracing/stm/heartbeat.c +4 -2
@@ -64,7 +64,7 @@ static void stm_heartbeat_unlink(structstatic int stm_heartbeat_init (void ) { -int i, ret = -ENOMEM ; +int i, ret;if (nr_devs <0 || nr_devs >STM_HEARTBEAT_MAX )return -EINVAL ;
@@ -72,8 +72,10 @@ static int stm_heartbeat_init(void)for (i =0 ; i < nr_devs; i++) { stm_heartbeat[i].data.name =kasprintf (GFP_KERNEL ,"heartbeat.%d" , i); -if (!stm_heartbeat[i].data.name) +if (!stm_heartbeat[i].data.name) { + ret = -ENOMEM ; goto fail_unregister; + } stm_heartbeat[i].data.nr_chans =1 ; stm_heartbeat[i].data.link = stm_heartbeat_link;
Greg Kroah-Hartman
maintainerPATCH 35/58 serial: mvebu-uart: fix tx lost characters at power off
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
commit 54ca955b5a4024e2ce0f206b03adb7109bc4da26 upstream.
Commit c685af1108d7 ("serial: mvebu-uart: fix tx lost characters") fixed tx lost characters at low baud rates but started causing tx lost characters when kernel is going to power off or reboot.
TX_EMP tells us when transmit queue is empty therefore all characters were transmitted. TX_RDY tells us when CPU can send a new character.
Therefore we need to use different check prior transmitting new character and different check after all characters were sent.
This patch splits polling code into two functions: wait_for_xmitr() which waits for TX_RDY and wait_for_xmite() which waits for TX_EMP.
When rebooting A3720 platform without this patch on UART is print only:
[ 42.699�
And with this patch on UART is full output:
[ 39.530216] reboot: Restarting system
--- drivers/tty/serial/mvebu-uart.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/tty/serial/mvebu-uart.c +9 -1
@@ -637,6 +637,14 @@ static void wait_for_xmitr(struct uart_p (val & STAT_TX_RDY(port)), 1, 10000); } +static void wait_for_xmite (struct uart_port *port) +{ +u32 val; + +readl_poll_timeout_atomic (port->membase +UART_STAT , val, + (val &STAT_TX_EMP ),1 ,10000 ); +} +static void mvebu_uart_console_putchar (struct uart_port *port,int ch) {wait_for_xmitr (port);
@@ -664,7 +672,7 @@ static void mvebu_uart_console_write(struart_console_write (port, s, count, mvebu_uart_console_putchar); -wait_for_xmitr (port); +wait_for_xmite (port);if (ier)writel (ier, port->membase +UART_CTRL (port));
Greg Kroah-Hartman
maintainerPATCH 36/58 ehci: fix EHCI host controller initialization sequence
In reply to Greg Kroah-HartmanFrom: Eugene Korenevsky <[email protected]>
commit 280a9045bb18833db921b316a5527d2b565e9f2e upstream.
According to EHCI spec, EHCI HC clears USBSTS.HCHalted whenever USBCMD.RS=1.
However, it is a good practice to wait some time after setting USBCMD.RS (approximately 100ms) until USBSTS.HCHalted become zero.
Without this waiting, VirtualBox's EHCI virtual HC accidentally hangs (see BugLink).
--- drivers/usb/host/ehci-hcd.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/usb/host/ehci-hcd.c +12 -0
@@ -574,6 +574,7 @@ static int ehci_run (struct usb_hcd *hcdstruct ehci_hcd *ehci =hcd_to_ehci (hcd);u32 temp;u32 hcc_params; +int rc; hcd->uses_new_polling =1 ;
@@ -629,9 +630,20 @@ static int ehci_run (struct usb_hcd *hcddown_write (&ehci_cf_port_reset_rwsem); ehci->rh_state =EHCI_RH_RUNNING ;ehci_writel (ehci,FLAG_CF , &ehci->regs->configured_flag); + +/* Wait until HC become operational */ ehci_readl (ehci, &ehci->regs->command);/* unblock posted writes */ msleep (5 ); + rc =ehci_handshake (ehci, &ehci->regs->status,STS_HALT ,0 ,100 *1000 ); +up_write (&ehci_cf_port_reset_rwsem); + +if (rc) { +ehci_err (ehci,"USB %x.%x, controller refused to start: %d\n" , + ((ehci->sbrn &0xf0 )>>4 ), (ehci->sbrn &0x0f ), rc); +return rc; + } + ehci->last_periodic_enable =ktime_get_real (); temp =HC_VERSION (ehci,ehci_readl (ehci, &ehci->caps->hc_capbase));
Greg Kroah-Hartman
maintainerPATCH 37/58 USB: ehci: fix an interrupt calltrace error
In reply to Greg Kroah-HartmanFrom: Longfang Liu <[email protected]>
commit 643a4df7fe3f6831d14536fd692be85f92670a52 upstream.
The system that use Synopsys USB host controllers goes to suspend when using USB audio player. This causes the USB host controller continuous send interrupt signal to system, When the number of interrupts exceeds 100000, the system will forcibly close the interrupts and output a calltrace error.
When the system goes to suspend, the last interrupt is reported to the driver. At this time, the system has set the state to suspend. This causes the last interrupt to not be processed by the system and not clear the interrupt flag. This uncleared interrupt flag constantly triggers new interrupt event. This causing the driver to receive more than 100,000 interrupts, which causes the system to forcibly close the interrupt report and report the calltrace error.
so, when the driver goes to sleep and changes the system state to suspend, the interrupt flag needs to be cleared.
--- drivers/usb/host/ehci-hub.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/host/ehci-hub.c +3 -0
@@ -345,6 +345,9 @@ static int ehci_bus_suspend (struct usb_unlink_empty_async_suspended (ehci); +/* Some Synopsys controllers mistakenly leave IAA turned on */ +ehci_writel (ehci,STS_IAA , &ehci->regs->status); +/* Any IAA cycle that started before the suspend is now invalid */ end_iaa_cycle (ehci);ehci_handle_start_intr_unlinks (ehci);
Greg Kroah-Hartman
maintainerPATCH 38/58 usb: gadget: aspeed: fix stop dma register setting.
In reply to Greg Kroah-HartmanFrom: Ryan Chen <[email protected]>
commit 4e0dcf62ab4cf917d0cbe751b8bf229a065248d4 upstream.
The vhub engine has two dma mode, one is descriptor list, another is single stage DMA. Each mode has different stop register setting. Descriptor list operation (bit2) : 0 disable reset, 1: enable reset Single mode operation (bit0) : 0 : disable, 1: enable
--- drivers/usb/gadget/udc/aspeed-vhub/epn.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/usb/gadget/udc/aspeed-vhub/epn.c +4 -1
@@ -420,7 +420,10 @@ static void ast_vhub_stop_active_req(stru32 state, reg, loops;/* Stop DMA activity */ -writel (0 , ep->epn.regs +AST_VHUB_EP_DMA_CTLSTAT ); +if (ep->epn.desc_mode) +writel (VHUB_EP_DMA_CTRL_RESET , ep->epn.regs +AST_VHUB_EP_DMA_CTLSTAT ); +else +writel (0 , ep->epn.regs +AST_VHUB_EP_DMA_CTLSTAT );/* Wait for it to complete */ for (loops =0 ; loops <1000 ; loops++) {
Greg Kroah-Hartman
maintainerPATCH 39/58 usb: udc: core: Use lock when write to soft_connect
In reply to Greg Kroah-HartmanFrom: Thinh Nguyen <[email protected]>
commit c28095bc99073ddda65e4f31f6ae0d908d4d5cd8 upstream.
Use lock to guard against concurrent access for soft-connect/disconnect operations when writing to soft_connect sysfs.
--- drivers/usb/gadget/udc/core.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
drivers/usb/gadget/udc/core.c +10 -3
@@ -1471,10 +1471,13 @@ static ssize_t soft_connect_store(struct struct device_attribute *attr, const char *buf, size_t n) { struct usb_udc *udc = container_of(dev, struct usb_udc, dev); +ssize_t ret; +mutex_lock (&udc_lock);if (!udc->driver) {dev_err (dev,"soft-connect without a gadget driver\n" ); -return -EOPNOTSUPP ; + ret = -EOPNOTSUPP ; + goto out; }if (sysfs_streq (buf,"connect" )) {
@@ -1486,10 +1489,14 @@ static ssize_t soft_connect_store(structusb_gadget_udc_stop (udc); }else {dev_err (dev,"unsupported command '%s'\n" , buf); -return -EINVAL ; + ret = -EINVAL ; + goto out; } -return n; + ret = n; +out: +mutex_unlock (&udc_lock); +return ret; }static DEVICE_ATTR_WO (soft_connect);
Greg Kroah-Hartman
maintainerPATCH 40/58 usb: bdc: Make bdc pci driver depend on BROKEN
In reply to Greg Kroah-HartmanFrom: Patrik Jakobsson <[email protected]>
commit ef02684c4e67d8c35ac83083564135bc7b1d3445 upstream.
The bdc pci driver is going to be removed due to it not existing in the wild. This patch turns off compilation of the driver so that stable kernels can also pick up the change. This helps the out-of-tree facetimehd webcam driver as the pci id conflicts with bdc.
--- drivers/usb/gadget/udc/bdc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/udc/bdc/Kconfig +1 -1
@@ -15,7 +15,7 @@ if USB_BDC_UDC comment "Platform Support" config USB_BDC_PCI tristate "BDC support for PCIe based platforms" - depends on USB_PCI + depends on USB_PCI && BROKEN default USB_BDC_UDC help Enable support for platforms which have BDC connected through PCIe, such as Lego3 FPGA platform.
Greg Kroah-Hartman
maintainerPATCH 41/58 xhci: make sure TRB is fully written before giving it to the controller
In reply to Greg Kroah-HartmanFrom: Mathias Nyman <[email protected]>
commit 576667bad341516edc4e18eb85acb0a2b4c9c9d9 upstream.
Once the command ring doorbell is rung the xHC controller will parse all command TRBs on the command ring that have the cycle bit set properly.
If the driver just started writing the next command TRB to the ring when hardware finished the previous TRB, then HW might fetch an incomplete TRB as long as its cycle bit set correctly.
A command TRB is 16 bytes (128 bits) long.
Driver writes the command TRB in four 32 bit chunks, with the chunk containing the cycle bit last. This does however not guarantee that chunks actually get written in that order.
This was detected in stress testing when canceling URBs with several connected USB devices.
Two consecutive "Set TR Dequeue pointer" commands got queued right after each other, and the second one was only partially written when the controller parsed it, causing the dequeue pointer to be set to bogus values. This was seen as error messages:
"Mismatch between completed Set TR Deq Ptr command & xHCI internal state"
Solution is to add a write memory barrier before writing the cycle bit.
--- drivers/usb/host/xhci-ring.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/host/xhci-ring.c +2 -0
@@ -2835,6 +2835,8 @@ static void queue_trb(struct xhci_hcd *x trb->field[0 ] =cpu_to_le32 (field1); trb->field[1 ] =cpu_to_le32 (field2); trb->field[2 ] =cpu_to_le32 (field3); +/* make sure TRB is fully written before giving it to the controller */ +wmb (); trb->field[3 ] =cpu_to_le32 (field4);trace_xhci_queue_trb (ring, trb);
Greg Kroah-Hartman
maintainerPATCH 42/58 xhci: tegra: Delay for disabling LFPS detector
In reply to Greg Kroah-HartmanFrom: JC Kuo <[email protected]>
commit da7e0c3c2909a3d9bf8acfe1db3cb213bd7febfb upstream.
Occasionally, we are seeing some SuperSpeed devices resumes right after being directed to U3. This commits add 500us delay to ensure LFPS detector is disabled before sending ACK to firmware.
[ 16.099363] tegra-xusb 70090000.usb: entering ELPG [ 16.104343] tegra-xusb 70090000.usb: 2-1 isn't suspended: 0x0c001203 [ 16.114576] tegra-xusb 70090000.usb: not all ports suspended: -16 [ 16.120789] tegra-xusb 70090000.usb: entering ELPG failed
The register write passes through a few flop stages of 32KHz clock domain. NVIDIA ASIC designer reviewed RTL and suggests 500us delay.
--- drivers/usb/host/xhci-tegra.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/usb/host/xhci-tegra.c +7 -0
@@ -578,6 +578,13 @@ static void tegra_xusb_mbox_handle(struc enable);if (err <0 )break ; + +/* +* wait 500us for LFPS detector to be disabled before +* sending ACK +*/ +if (!enable) +usleep_range (500 ,1000 ); }if (err <0 ) {
Greg Kroah-Hartman
maintainerPATCH 43/58 driver core: Extend device_is_dependent()
In reply to Greg Kroah-HartmanFrom: Rafael J. Wysocki <[email protected]>
commit 3d1cf435e201d1fd63e4346b141881aed086effd upstream.
If the device passed as the target (second argument) to device_is_dependent() is not completely registered (that is, it has been initialized, but not added yet), but the parent pointer of it is set, it may be missing from the list of the parent's children and device_for_each_child() called by device_is_dependent() cannot be relied on to catch that dependency.
For this reason, modify device_is_dependent() to check the ancestors of the target device by following its parent pointer in addition to the device_for_each_child() walk.
--- drivers/base/core.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
drivers/base/core.c +16 -1
@@ -93,6 +93,16 @@ void device_links_read_unlock(int not_us }#endif /* !CONFIG_SRCU */ +static bool device_is_ancestor (struct device *dev,struct device *target) +{ +while (target->parent) { + target = target->parent; +if (dev == target) +return true; + } +return false; +} +/** * device_is_dependent - Check if one device depends on another one * @dev: Device to check dependencies for.
@@ -106,7 +116,12 @@ static int device_is_dependent(struct destruct device_link *link;int ret; -if (dev == target) +/* +* The "ancestors" check is needed to catch the case when the target +* device has not been completely initialized yet and it is still +* missing from the list of children of its parent device. +*/ +if (dev == target ||device_is_ancestor (dev, target))return 1 ; ret =device_for_each_child (dev, target, device_is_dependent);
Greg Kroah-Hartman
maintainerPATCH 44/58 netfilter: rpfilter: mask ecn bits before fib lookup
In reply to Greg Kroah-HartmanFrom: Guillaume Nault <[email protected]>
commit 2e5a6266fbb11ae93c468dfecab169aca9c27b43 upstream.
RT_TOS() only masks one of the two ECN bits. Therefore rpfilter_mt() treats Not-ECT or ECT(1) packets in a different way than those with ECT(0) or CE.
Reproducer:
Create two netns, connected with a veth:
$ ip netns add ns0 $ ip netns add ns1 $ ip link add name veth01 netns ns0 type veth peer name veth10 netns ns1 $ ip -netns ns0 link set dev veth01 up $ ip -netns ns1 link set dev veth10 up $ ip -netns ns0 address add 192.0.2.10/32 dev veth01 $ ip -netns ns1 address add 192.0.2.11/32 dev veth10
Add a route to ns1 in ns0:
$ ip -netns ns0 route add 192.0.2.11/32 dev veth01
In ns1, only packets with TOS 4 can be routed to ns0:
$ ip -netns ns1 route add 192.0.2.10/32 tos 4 dev veth10
Ping from ns0 to ns1 works regardless of the ECN bits, as long as TOS is 4:
$ ip netns exec ns0 ping -Q 4 192.0.2.11 # TOS 4, Not-ECT
... 0% packet loss ...
$ ip netns exec ns0 ping -Q 5 192.0.2.11 # TOS 4, ECT(1)
... 0% packet loss ...
$ ip netns exec ns0 ping -Q 6 192.0.2.11 # TOS 4, ECT(0)
... 0% packet loss ...
$ ip netns exec ns0 ping -Q 7 192.0.2.11 # TOS 4, CE
... 0% packet loss ...Now use iptable's rpfilter module in ns1:
$ ip netns exec ns1 iptables-legacy -t raw -A PREROUTING -m rpfilter --invert -j DROP
Not-ECT and ECT(1) packets still pass:
$ ip netns exec ns0 ping -Q 4 192.0.2.11 # TOS 4, Not-ECT
... 0% packet loss ...
$ ip netns exec ns0 ping -Q 5 192.0.2.11 # TOS 4, ECT(1)
... 0% packet loss ...But ECT(0) and ECN packets are dropped:
$ ip netns exec ns0 ping -Q 6 192.0.2.11 # TOS 4, ECT(0)
... 100% packet loss ...
$ ip netns exec ns0 ping -Q 7 192.0.2.11 # TOS 4, CE
... 100% packet loss ...After this patch, rpfilter doesn't drop ECT(0) and CE packets anymore.
--- net/ipv4/netfilter/ipt_rpfilter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/netfilter/ipt_rpfilter.c +1 -1
@@ -94,7 +94,7 @@ static bool rpfilter_mt(const struct sk_ flow.daddr = iph->saddr; flow.saddr =rpfilter_get_saddr (iph->daddr); flow.flowi4_mark = info->flags &XT_RPFILTER_VALID_MARK ? skb->mark :0 ; - flow.flowi4_tos =RT_TOS (iph->tos); + flow.flowi4_tos = iph->tos &IPTOS_RT_MASK ; flow.flowi4_scope =RT_SCOPE_UNIVERSE ; flow.flowi4_oif =l3mdev_master_ifindex_rcu (xt_in (par));
Greg Kroah-Hartman
maintainerPATCH 45/58 sh: dma: fix kconfig dependency for G2_DMA
In reply to Greg Kroah-HartmanFrom: Necip Fazil Yildiran <[email protected]>
commit f477a538c14d07f8c45e554c8c5208d588514e98 upstream.
When G2_DMA is enabled and SH_DMA is disabled, it results in the following Kbuild warning:
WARNING: unmet direct dependencies detected for SH_DMA_API
Depends on [n]: SH_DMA [=n]
Selected by [y]:
- G2_DMA [=y] && SH_DREAMCAST [=y]
The reason is that G2_DMA selects SH_DMA_API without depending on or selecting SH_DMA while SH_DMA_API depends on SH_DMA.
When G2_DMA was first introduced with commit 40f49e7ed77f ("sh: dma: Make G2 DMA configurable."), this wasn't an issue since SH_DMA_API didn't have such dependency, and this way was the only way to enable it since SH_DMA_API was non-visible. However, later SH_DMA_API was made visible and dependent on SH_DMA with commit d8902adcc1a9 ("dmaengine: sh: Add Support SuperH DMA Engine driver").
Let G2_DMA depend on SH_DMA_API instead to avoid Kbuild issues.
--- arch/sh/drivers/dma/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/sh/drivers/dma/Kconfig +1 -2
@@ -63,8 +63,7 @@ config PVR2_DMA config G2_DMA tristate "G2 Bus DMA support" - depends on SH_DREAMCAST - select SH_DMA_API + depends on SH_DREAMCAST && SH_DMA_API help This enables support for the DMA controller for the Dreamcast's G2 bus. Drivers that want this will generally enable this on
Greg Kroah-Hartman
maintainerPATCH 46/58 net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext
In reply to Greg Kroah-HartmanFrom: Rasmus Villemoes <[email protected]>
commit 87fe04367d842c4d97a77303242d4dd4ac351e46 upstream.
mv88e6xxx_port_vlan_join checks whether the VTU already contains an entry for the given vid (via mv88e6xxx_vtu_getnext), and if so, merely changes the relevant .member[] element and loads the updated entry into the VTU.
However, at least for the mv88e6250, the on-stack struct mv88e6xxx_vtu_entry vlan never has its .state[] array explicitly initialized, neither in mv88e6xxx_port_vlan_join() nor inside the getnext implementation. So the new entry has random garbage for the STU bits, breaking VLAN filtering.
When the VTU entry is initially created, those bits are all zero, and we should make sure to keep them that way when the entry is updated.
--- drivers/net/dsa/mv88e6xxx/global1_vtu.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/dsa/mv88e6xxx/global1_vtu.c +4 -0
@@ -357,6 +357,10 @@ int mv88e6185_g1_vtu_getnext(struct mv88if (err)return err; + err =mv88e6185_g1_stu_data_read (chip, entry); +if (err) +return err; +/* VTU DBNum[3:0] are located in VTU Operation 3:0 * VTU DBNum[7:4] are located in VTU Operation 11:8 */
Re: [PATCH 4.19 46/58] net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext
Quoted 4 lines · Greg Kroah-Hartman
From: Rasmus Villemoes <[email protected]>
commit
87fe04367d842c4d97a77303242d4dd4ac351e46upstream.
Greg, please drop this from 4.19-stable. Details:
drivers/net/dsa/mv88e6xxx/global1_vtu.c int mv88e6185_g1_vtu_getnext(struct mv88 · line 363
Quoted 11 lines
drivers/net/dsa/mv88e6xxx/global1_vtu.c +4
-0@@ -357,6 +357,10 @@ int mv88e6185_g1_vtu_getnext(struct mv88if (err)return err; + err =mv88e6185_g1_stu_data_read (chip, entry); +if (err) +return err; +
The function that this patch applied to in mainline did not exist in v4.19. It seems that this hunk has been applied in the similar mv88e6185_g1_vtu_getnext(), and indeed, in current 4.19.y, just one more line of context shows this:
353 err = mv88e6185_g1_stu_data_read(chip, entry);
354 if (err)
355 return err;
356
357 /* VTU DBNum[3:0] are located in VTU Operation 3:0
358 * VTU DBNum[7:4] are located in VTU Operation 11:8
359 */
360 err = mv88e6xxx_g1_read(chip,MV88E6XXX_G1_VTU_OP, &val);
361 if (err)
362 return err;
IOW, it would be a pointless noop adding the same call again.
Rasmus
Re: [PATCH 4.19 46/58] net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext
Quoted 15 lines · Rasmus Villemoes
Quoted 4 lines · Greg Kroah-Hartman
From: Rasmus Villemoes <[email protected]>
commit
87fe04367d842c4d97a77303242d4dd4ac351e46upstream.Greg, please drop this from 4.19-stable. Details:
Quoted 7 lines
drivers/net/dsa/mv88e6xxx/global1_vtu.c +0
-0@@ -357,6 +357,10 @@ int mv88e6185_g1_vtu_getnext(struct mv88if (err)return err;
Quoted 9 lines
drivers/net/dsa/mv88e6xxx/global1_vtu.c int mv88e6185_g1_vtu_getnext(struct mv88 · line 363
Quoted 4 lines
drivers/net/dsa/mv88e6xxx/global1_vtu.c +4
-0+ err =mv88e6185_g1_stu_data_read (chip, entry); +if (err) +return err; +The function that this patch applied to in mainline did not exist in v4.19. It seems that this hunk has been applied in the similar
mv88e6185_g1_vtu_getnext(), and indeed, in current 4.19.y, just one more line of context shows this:
Bah, that was from 4.14, so the line numbers are a bit off, but I see you've also added it to the 4.14 queue. Same comment for that one: Drop this from both 4.19.y and 4.14.y.
Rasmus
Greg Kroah-Hartman
maintainerRe: [PATCH 4.19 46/58] net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext
Quoted 26 lines · Rasmus Villemoes
Quoted 15 lines · Rasmus Villemoes
Quoted 4 lines · Greg Kroah-Hartman
From: Rasmus Villemoes <[email protected]>
commit
87fe04367d842c4d97a77303242d4dd4ac351e46upstream.Greg, please drop this from 4.19-stable. Details:
Quoted 7 lines
drivers/net/dsa/mv88e6xxx/global1_vtu.c +0
-0@@ -357,6 +357,10 @@ int mv88e6185_g1_vtu_getnext(struct mv88if (err)return err;Quoted 9 lines
drivers/net/dsa/mv88e6xxx/global1_vtu.c int mv88e6185_g1_vtu_getnext(struct mv88 · line 363
Quoted 4 lines
drivers/net/dsa/mv88e6xxx/global1_vtu.c +4
-0+ err =mv88e6185_g1_stu_data_read (chip, entry); +if (err) +return err; +The function that this patch applied to in mainline did not exist in v4.19. It seems that this hunk has been applied in the similar
mv88e6185_g1_vtu_getnext(), and indeed, in current 4.19.y, just one more line of context shows this:
Quoted 3 lines
Bah, that was from 4.14, so the line numbers are a bit off, but I see you've also added it to the 4.14 queue. Same comment for that one: Drop this from both 4.19.y and 4.14.y.
Odd, but ok, the Fixes: line lied :)
I'll go drop this from both trees now, thanks.
greg k-h
Re: [PATCH 4.19 46/58] net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext
Quoted 27 lines · Greg Kroah-Hartman
Quoted 26 lines · Rasmus Villemoes
Quoted 24 lines · Rasmus Villemoes
Quoted 4 lines · Greg Kroah-Hartman
From: Rasmus Villemoes <[email protected]>
commit
87fe04367d842c4d97a77303242d4dd4ac351e46upstream.Greg, please drop this from 4.19-stable. Details:
drivers/net/dsa/mv88e6xxx/global1_vtu.c int mv88e6185_g1_vtu_getnext(struct mv88 · line 363
Quoted 11 lines
drivers/net/dsa/mv88e6xxx/global1_vtu.c +4
-0@@ -357,6 +357,10 @@ int mv88e6185_g1_vtu_getnext(struct mv88if (err)return err; + err =mv88e6185_g1_stu_data_read (chip, entry); +if (err) +return err; +The function that this patch applied to in mainline did not exist in v4.19. It seems that this hunk has been applied in the similar
mv88e6185_g1_vtu_getnext(), and indeed, in current 4.19.y, just one more line of context shows this:
Quoted 5 lines
Quoted 3 lines
Bah, that was from 4.14, so the line numbers are a bit off, but I see you've also added it to the 4.14 queue. Same comment for that one: Drop this from both 4.19.y and 4.14.y.
Odd, but ok, the Fixes: line lied :)
Sorry, but no, it did not.
The commit 92307069a96c mentioned in Fixes changed the semantics of the helper mv88e6185_g1_vtu_data_read(), splitting half its functionality to a new helper mv88e6185_g1_stu_data_read(), and it also added a call of that new helper in mv88e6185_g1_vtu_getnext().
But the other user of mv88e6185_g1_vtu_data_read(), namely mv88e6250_g1_vtu_getnext(), was not updated, which is precisely what 87fe04367d842c4d97a77303242d4dd4ac351e46 fixes. However, that other user of mv88e6185_g1_vtu_data_read() did not exist in 4.19, so the backports of 92307069a96c to those earlier stable trees didn't introduce that bug.
Rasmus
Greg Kroah-Hartman
maintainerPATCH 47/58 sh_eth: Fix power down vs. is_opened flag ordering
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
commit f6a2e94b3f9d89cb40771ff746b16b5687650cbb upstream.
sh_eth_close() does a synchronous power down of the device before marking it closed. Revert the order, to make sure the device is never marked opened while suspended.
While at it, use pm_runtime_put() instead of pm_runtime_put_sync(), as there is no reason to do a synchronous power down.
--- drivers/net/ethernet/renesas/sh_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/renesas/sh_eth.c +2 -2
@@ -2620,10 +2620,10 @@ static int sh_eth_close(struct net_devic/* Free all the skbuffs in the Rx queue and the DMA buffer. */ sh_eth_ring_free (ndev); -pm_runtime_put_sync (&mdp->pdev->dev); - mdp->is_opened =0 ; +pm_runtime_put (&mdp->pdev->dev); +return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 48/58 skbuff: back tiny skbs with kmalloc() in __netdev_alloc_skb() too
In reply to Greg Kroah-HartmanFrom: Alexander Lobakin <[email protected]>
commit 66c556025d687dbdd0f748c5e1df89c977b6c02a upstream.
Commit 3226b158e67c ("net: avoid 32 x truesize under-estimation for tiny skbs") ensured that skbs with data size lower than 1025 bytes will be kmalloc'ed to avoid excessive page cache fragmentation and memory consumption.
However, the fix adressed only __napi_alloc_skb() (primarily for virtio_net and napi_get_frags()), but the issue can still be achieved through __netdev_alloc_skb(), which is still used by several drivers. Drivers often allocate a tiny skb for headers and place the rest of the frame to frags (so-called copybreak).
Mirror the condition to __netdev_alloc_skb() to handle this case too.
Since v1 [0]:
- fix "Fixes:" tag;
- refine commit message (mention copybreak usecase).
[0] https://lore.kernel.org/netdev/[email protected]
--- net/core/skbuff.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
net/core/skbuff.c +5 -1
@@ -398,7 +398,11 @@ struct sk_buff *__netdev_alloc_skb(struc len +=NET_SKB_PAD ; -if ((len >SKB_WITH_OVERHEAD (PAGE_SIZE )) || +/* If requested length is either too small or too big, +* we use kmalloc() for skb->head allocation. +*/ +if (len <=SKB_WITH_OVERHEAD (1024 ) || + len >SKB_WITH_OVERHEAD (PAGE_SIZE ) || (gfp_mask & (__GFP_DIRECT_RECLAIM |GFP_DMA ))) { skb =__alloc_skb (len, gfp_mask,SKB_ALLOC_RX ,NUMA_NO_NODE );if (!skb)
Greg Kroah-Hartman
maintainerPATCH 49/58 kasan: fix unaligned address is unhandled in kasan_remove_zero_shadow
In reply to Greg Kroah-HartmanFrom: Lecopzer Chen <[email protected]>
commit a11a496ee6e2ab6ed850233c96b94caf042af0b9 upstream.
During testing kasan_populate_early_shadow and kasan_remove_zero_shadow, if the shadow start and end address in kasan_remove_zero_shadow() is not aligned to PMD_SIZE, the remain unaligned PTE won't be removed.
In the test case for kasan_remove_zero_shadow():
shadow_start: 0xffffffb802000000, shadow end: 0xffffffbfbe000000
3-level page table:
PUD_SIZE: 0x40000000 PMD_SIZE: 0x200000 PAGE_SIZE: 4K0xffffffbf80000000 ~ 0xffffffbfbdf80000 will not be removed because in kasan_remove_pud_table(), kasan_pmd_table(*pud) is true but the next address is 0xffffffbfbdf80000 which is not aligned to PUD_SIZE.
In the correct condition, this should fallback to the next level kasan_remove_pmd_table() but the condition flow always continue to skip the unaligned part.
Fix by correcting the condition when next and addr are neither aligned.
--- mm/kasan/kasan_init.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-)
mm/kasan/kasan_init.c +12 -8
@@ -372,9 +372,10 @@ static void kasan_remove_pmd_table(pmd_tif (kasan_pte_table (*pmd)) {if (IS_ALIGNED (addr,PMD_SIZE ) && -IS_ALIGNED (next,PMD_SIZE )) +IS_ALIGNED (next,PMD_SIZE )) {pmd_clear (pmd); -continue ; +continue ; + } } pte =pte_offset_kernel (pmd, addr);kasan_remove_pte_table (pte, addr, next);
@@ -397,9 +398,10 @@ static void kasan_remove_pud_table(pud_tif (kasan_pmd_table (*pud)) {if (IS_ALIGNED (addr,PUD_SIZE ) && -IS_ALIGNED (next,PUD_SIZE )) +IS_ALIGNED (next,PUD_SIZE )) {pud_clear (pud); -continue ; +continue ; + } } pmd =pmd_offset (pud, addr); pmd_base =pmd_offset (pud,0 );
@@ -423,9 +425,10 @@ static void kasan_remove_p4d_table(p4d_tif (kasan_pud_table (*p4d)) {if (IS_ALIGNED (addr,P4D_SIZE ) && -IS_ALIGNED (next,P4D_SIZE )) +IS_ALIGNED (next,P4D_SIZE )) {p4d_clear (p4d); -continue ; +continue ; + } } pud =pud_offset (p4d, addr);kasan_remove_pud_table (pud, addr, next);
@@ -457,9 +460,10 @@ void kasan_remove_zero_shadow(void *starif (kasan_p4d_table (*pgd)) {if (IS_ALIGNED (addr,PGDIR_SIZE ) && -IS_ALIGNED (next,PGDIR_SIZE )) +IS_ALIGNED (next,PGDIR_SIZE )) {pgd_clear (pgd); -continue ; +continue ; + } } p4d =p4d_offset (pgd, addr);
Greg Kroah-Hartman
maintainerPATCH 50/58 kasan: fix incorrect arguments passing in kasan_add_zero_shadow
In reply to Greg Kroah-HartmanFrom: Lecopzer Chen <[email protected]>
commit 5dabd1712cd056814f9ab15f1d68157ceb04e741 upstream.
kasan_remove_zero_shadow() shall use original virtual address, start and size, instead of shadow address.
--- mm/kasan/kasan_init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
mm/kasan/kasan_init.c +1 -2
@@ -487,7 +487,6 @@ int kasan_add_zero_shadow(void *start, u ret =kasan_populate_zero_shadow (shadow_start, shadow_end);if (ret) -kasan_remove_zero_shadow (shadow_start, - size >>KASAN_SHADOW_SCALE_SHIFT ); +kasan_remove_zero_shadow (start, size);return ret; }
Greg Kroah-Hartman
maintainerPATCH 51/58 udp: mask TOS bits in udp_v4_early_demux()
In reply to Greg Kroah-HartmanFrom: Guillaume Nault <[email protected]>
commit 8d2b51b008c25240914984208b2ced57d1dd25a5 upstream.
udp_v4_early_demux() is the only function that calls ip_mc_validate_source() with a TOS that hasn't been masked with IPTOS_RT_MASK.
This results in different behaviours for incoming multicast UDPv4 packets, depending on if ip_mc_validate_source() is called from the early-demux path (udp_v4_early_demux) or from the regular input path (ip_route_input_noref).
ECN would normally not be used with UDP multicast packets, so the practical consequences should be limited on that side. However, IPTOS_RT_MASK is used to also masks the TOS' high order bits, to align with the non-early-demux path behaviour.
Reproducer:
Setup two netns, connected with veth:
$ ip netns add ns0 $ ip netns add ns1 $ ip -netns ns0 link set dev lo up $ ip -netns ns1 link set dev lo up $ ip link add name veth01 netns ns0 type veth peer name veth10 netns ns1 $ ip -netns ns0 link set dev veth01 up $ ip -netns ns1 link set dev veth10 up $ ip -netns ns0 address add 192.0.2.10 peer 192.0.2.11/32 dev veth01 $ ip -netns ns1 address add 192.0.2.11 peer 192.0.2.10/32 dev veth10
In ns0, add route to multicast address 224.0.2.0/24 using source address 198.51.100.10:
$ ip -netns ns0 address add 198.51.100.10/32 dev lo $ ip -netns ns0 route add 224.0.2.0/24 dev veth01 src 198.51.100.10
In ns1, define route to 198.51.100.10, only for packets with TOS 4:
$ ip -netns ns1 route add 198.51.100.10/32 tos 4 dev veth10
Also activate rp_filter in ns1, so that incoming packets not matching the above route get dropped:
$ ip netns exec ns1 sysctl -wq net.ipv4.conf.veth10.rp_filter=1
Now try to receive packets on 224.0.2.11:
$ ip netns exec ns1 socat UDP-RECVFROM:1111,ip-add-membership=224.0.2.11:veth10,ignoreeof -
In ns0, send packet to 224.0.2.11 with TOS 4 and ECT(0) (that is, tos 6 for socat):
$ echo test0 | ip netns exec ns0 socat - UDP-DATAGRAM:224.0.2.11:1111,bind=:1111,tos=6
The "test0" message is properly received by socat in ns1, because early-demux has no cached dst to use, so source address validation is done by ip_route_input_mc(), which receives a TOS that has the ECN bits masked.
Now send another packet to 224.0.2.11, still with TOS 4 and ECT(0):
$ echo test1 | ip netns exec ns0 socat - UDP-DATAGRAM:224.0.2.11:1111,bind=:1111,tos=6
The "test1" message isn't received by socat in ns1, because, now, early-demux has a cached dst to use and calls ip_mc_validate_source() immediately, without masking the ECN bits.
--- net/ipv4/udp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/ipv4/udp.c +2 -1
@@ -2416,7 +2416,8 @@ int udp_v4_early_demux(struct sk_buff *s*/ if (!inet_sk (sk)->inet_daddr && in_dev)return ip_mc_validate_source (skb, iph->daddr, - iph->saddr, iph->tos, + iph->saddr, + iph->tos &IPTOS_RT_MASK , skb->dev, in_dev, &itag); }return 0 ;
Greg Kroah-Hartman
maintainerPATCH 52/58 ipv6: create multicast route with RTPROT_KERNEL
In reply to Greg Kroah-HartmanFrom: Matteo Croce <[email protected]>
commit a826b04303a40d52439aa141035fca5654ccaccd upstream.
The ff00::/8 multicast route is created without specifying the fc_protocol field, so the default RTPROT_BOOT value is used:
$ ip -6 -d route unicast ::1 dev lo proto kernel scope global metric 256 pref medium unicast fe80::/64 dev eth0 proto kernel scope global metric 256 pref medium unicast ff00::/8 dev eth0 proto boot scope global metric 256 pref medium
As the documentation says, this value identifies routes installed during boot, but the route is created when interface is set up. Change the value to RTPROT_KERNEL which is a better value.
--- net/ipv6/addrconf.c | 1 + 1 file changed, 1 insertion(+)
net/ipv6/addrconf.c +1 -0
@@ -2397,6 +2397,7 @@ static void addrconf_add_mroute(struct n .fc_flags = RTF_UP, .fc_type = RTN_UNICAST, .fc_nlinfo.nl_net = dev_net(dev), + .fc_protocol = RTPROT_KERNEL, };ipv6_addr_set (&cfg.fc_dst,htonl (0xFF000000 ),0 ,0 ,0 );
Greg Kroah-Hartman
maintainerPATCH 53/58 net_sched: avoid shift-out-of-bounds in tcindex_set_parms()
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
commit bcd0cf19ef8258ac31b9a20248b05c15a1f4b4b0 upstream.
tc_index being 16bit wide, we need to check that TCA_TCINDEX_SHIFT attribute is not silly.
UBSAN: shift-out-of-bounds in net/sched/cls_tcindex.c:260:29 shift exponent 255 is too large for 32-bit type 'int' CPU: 0 PID: 8516 Comm: syz-executor228 Not tainted 5.10.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:395 valid_perfect_hash net/sched/cls_tcindex.c:260 [inline] tcindex_set_parms.cold+0x1b/0x215 net/sched/cls_tcindex.c:425 tcindex_change+0x232/0x340 net/sched/cls_tcindex.c:546 tc_new_tfilter+0x13fb/0x21b0 net/sched/cls_api.c:2127 rtnetlink_rcv_msg+0x8b6/0xb80 net/core/rtnetlink.c:5555 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2494 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x907/0xe40 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2336 ___sys_sendmsg+0xf3/0x170 net/socket.c:2390 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2423 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9
--- net/sched/cls_tcindex.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
net/sched/cls_tcindex.c +6 -2
@@ -339,9 +339,13 @@ tcindex_set_parms(struct net *net, strucif (tb[TCA_TCINDEX_MASK ]) cp->mask =nla_get_u16 (tb[TCA_TCINDEX_MASK ]); -if (tb[TCA_TCINDEX_SHIFT ]) +if (tb[TCA_TCINDEX_SHIFT ]) { cp->shift =nla_get_u32 (tb[TCA_TCINDEX_SHIFT ]); - +if (cp->shift >16 ) { + err = -EINVAL ; + goto errout; + } + }if (!cp->hash) {/* Hash not specified, use perfect hash if the upper limit * of the hashing index is below the threshold.
Greg Kroah-Hartman
maintainerPATCH 54/58 net_sched: reject silly cell_log in qdisc_get_rtab()
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
commit e4bedf48aaa5552bc1f49703abd17606e7e6e82a upstream.
iproute2 probably never goes beyond 8 for the cell exponent, but stick to the max shift exponent for signed 32bit.
UBSAN reported:
UBSAN: shift-out-of-bounds in net/sched/sch_api.c:389:22 shift exponent 130 is too large for 32-bit type 'int' CPU: 1 PID: 8450 Comm: syz-executor586 Not tainted 5.11.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x183/0x22e lib/dump_stack.c:120 ubsan_epilogue lib/ubsan.c:148 [inline] __ubsan_handle_shift_out_of_bounds+0x432/0x4d0 lib/ubsan.c:395 __detect_linklayer+0x2a9/0x330 net/sched/sch_api.c:389 qdisc_get_rtab+0x2b5/0x410 net/sched/sch_api.c:435 cbq_init+0x28f/0x12c0 net/sched/sch_cbq.c:1180 qdisc_create+0x801/0x1470 net/sched/sch_api.c:1246 tc_modify_qdisc+0x9e3/0x1fc0 net/sched/sch_api.c:1662 rtnetlink_rcv_msg+0xb1d/0xe60 net/core/rtnetlink.c:5564 netlink_rcv_skb+0x1f0/0x460 net/netlink/af_netlink.c:2494 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x7de/0x9b0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0xaa6/0xe90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] ____sys_sendmsg+0x5a2/0x900 net/socket.c:2345 ___sys_sendmsg net/socket.c:2399 [inline] __sys_sendmsg+0x319/0x400 net/socket.c:2432 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9
--- net/sched/sch_api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/sched/sch_api.c +2 -1
@@ -398,7 +398,8 @@ struct qdisc_rate_table *qdisc_get_rtab( {struct qdisc_rate_table *rtab; -if (tab ==NULL || r->rate ==0 || r->cell_log ==0 || +if (tab ==NULL || r->rate ==0 || + r->cell_log ==0 || r->cell_log >=32 ||nla_len (tab) !=TC_RTAB_SIZE ) {NL_SET_ERR_MSG (extack,"Invalid rate table parameters for searching" );return NULL ;
Greg Kroah-Hartman
maintainerPATCH 55/58 ipv6: set multicast flag on the multicast route
In reply to Greg Kroah-HartmanFrom: Matteo Croce <[email protected]>
commit ceed9038b2783d14e0422bdc6fd04f70580efb4c upstream.
The multicast route ff00::/8 is created with type RTN_UNICAST:
$ ip -6 -d route unicast ::1 dev lo proto kernel scope global metric 256 pref medium unicast fe80::/64 dev eth0 proto kernel scope global metric 256 pref medium unicast ff00::/8 dev eth0 proto kernel scope global metric 256 pref medium
Set the type to RTN_MULTICAST which is more appropriate.
--- net/ipv6/addrconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/addrconf.c +1 -1
@@ -2395,7 +2395,7 @@ static void addrconf_add_mroute(struct n .fc_ifindex = dev->ifindex, .fc_dst_len = 8, .fc_flags = RTF_UP, - .fc_type = RTN_UNICAST, + .fc_type = RTN_MULTICAST, .fc_nlinfo.nl_net = dev_net(dev), .fc_protocol = RTPROT_KERNEL, };
Greg Kroah-Hartman
maintainerPATCH 56/58 net: mscc: ocelot: allow offloading of bridge on top of LAG
In reply to Greg Kroah-HartmanFrom: Vladimir Oltean <[email protected]>
commit 79267ae22615496655feee2db0848f6786bcf67a upstream.
The blamed commit was too aggressive, and it made ocelot_netdevice_event react only to network interface events emitted for the ocelot switch ports.
In fact, only the PRECHANGEUPPER should have had that check.
When we ignore all events that are not for us, we miss the fact that the upper of the LAG changes, and the bonding interface gets enslaved to a bridge. This is an operation we could offload under certain conditions.
--- drivers/net/ethernet/mscc/ocelot.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/mscc/ocelot.c +1 -3
@@ -1549,10 +1549,8 @@ static int ocelot_netdevice_event(structstruct net_device *dev =netdev_notifier_info_to_dev (ptr);int ret =0 ; -if (!ocelot_netdevice_dev_check (dev)) -return 0 ; -if (event ==NETDEV_PRECHANGEUPPER && +ocelot_netdevice_dev_check (dev) &&netif_is_lag_master (info->upper_dev)) {struct netdev_lag_upper_info *lag_upper_info = info->upper_info;struct netlink_ext_ack *extack;
Greg Kroah-Hartman
maintainerPATCH 57/58 net: Disable NETIF_F_HW_TLS_RX when RXCSUM is disabled
In reply to Greg Kroah-HartmanFrom: Tariq Toukan <[email protected]>
commit a3eb4e9d4c9218476d05c52dfd2be3d6fdce6b91 upstream.
With NETIF_F_HW_TLS_RX packets are decrypted in HW. This cannot be logically done when RXCSUM offload is off.
--- net/core/dev.c | 5 +++++ 1 file changed, 5 insertions(+)
net/core/dev.c +5 -0
@@ -8351,6 +8351,11 @@ static netdev_features_t netdev_fix_feat } } +if ((features &NETIF_F_HW_TLS_RX ) && !(features &NETIF_F_RXCSUM )) { +netdev_dbg (dev,"Dropping TLS RX HW offload feature since no RXCSUM feature.\n" ); + features &= ~NETIF_F_HW_TLS_RX ; + } +return features; }
Greg Kroah-Hartman
maintainerPATCH 58/58 net: dsa: b53: fix an off by one in checking "vlan->vid"
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit 8e4052c32d6b4b39c1e13c652c7e33748d447409 upstream.
The > comparison should be >= to prevent accessing one element beyond the end of the dev->vlans[] array in the caller function, b53_vlan_add(). The "dev->vlans" array is allocated in the b53_switch_init() function and it has "dev->num_vlans" elements.
--- drivers/net/dsa/b53/b53_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dsa/b53/b53_common.c +1 -1
@@ -1142,7 +1142,7 @@ int b53_vlan_prepare(struct dsa_switch *if ((is5325 (dev) ||is5365 (dev)) && vlan->vid_begin ==0 )return -EOPNOTSUPP ; -if (vlan->vid_end > dev->num_vlans) +if (vlan->vid_end >= dev->num_vlans)return -ERANGE ;b53_enable_vlan (dev, true, dev->vlan_filtering_enabled);
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.171 release. There are 58 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 27 Jan 2021 18:31:44 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.171-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
Summary
------------------------------------------------------------------------
kernel: 4.19.171-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.19.y
git commit: 9b9e817bbee7dcb514ceba2fe100ad324cb7179b
git describe: v4.19.170-59-g9b9e817bbee7
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-4.19.y/build/v4.19.170-59-g9b9e817bbee7
No regressions (compared to build v4.19.170)
No fixes (compared to build v4.19.170)
Ran 45655 total tests in the following environments and test suites.
Environments
--------------
- arm
- arm64
- dragonboard-410c - arm64
- hi6220-hikey - arm64
- i386
- juno-r2 - arm64
- juno-r2-compat
- juno-r2-kasan
- mips
- qemu-arm64-clang
- qemu-arm64-kasan
- qemu-x86_64-clang
- qemu-x86_64-kasan
- qemu_arm
- qemu_arm64
- qemu_arm64-compat
- qemu_i386
- qemu_x86_64
- qemu_x86_64-compat
- s390
- sparc
- x15 - arm
- x86_64
- x86-kasan
- x86_64
Test Suites
-----------
* build
* linux-log-parser
* install-android-platform-tools-r2600
* kselftest
* libhugetlbfs
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-controllers-tests
* ltp-cpuhotplug-tests
* ltp-crypto-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* perf
* ltp-fs-tests
* network-basic-tests
* v4l2-compliance
* ltp-open-posix-tests
* ltp-tracing-tests
* kvm-unit-tests
* rcutorture
* fwts
* kselftest-vsyscall-mode-native
* kselftest-vsyscall-mode-none
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.171 release. There are 58 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 27 Jan 2021 18:31:44 +0000. Anything received after that time might be too late.
Build results:
total: 155 pass: 155 fail: 0 Qemu test results: total: 418 pass: 418 fail: 0
Guenter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.171 release. There are 58 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 27 Jan 2021 18:31:44 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.171-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.171 release. There are 58 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 27 Jan 2021 18:31:44 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.171-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v4.19:
12 builds: 12 pass, 0 fail
22 boots: 22 pass, 0 fail
38 tests: 38 pass, 0 failLinux version: 4.19.171-rc1-g9b9e817bbee7
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra20-ventana,
tegra210-p2371-2180, tegra30-cardhu-a04Jon