5.16.19-rc1 review
Subsystems (11)
Greg Kroah-Hartman
maintainerPATCH 952/1017 virtio: use virtio_device_ready() in virtio_device_restore()
In reply to Greg Kroah-HartmanFrom: Stefano Garzarella <[email protected]>
commit 8d65bc9a5be3f23c5e2ab36b6b8ef40095165b18 upstream.
After waking up a suspended VM, the kernel prints the following trace for virtio drivers which do not directly call virtio_device_ready() in the .restore:
PM: suspend exit
irq 22: nobody cared (try booting with the "irqpoll" option)
Call Trace:
<IRQ>
dump_stack_lvl+0x38/0x49
dump_stack+0x10/0x12
__report_bad_irq+0x3a/0xaf
note_interrupt.cold+0xb/0x60
handle_irq_event+0x71/0x80
handle_fasteoi_irq+0x95/0x1e0
__common_interrupt+0x6b/0x110
common_interrupt+0x63/0xe0
asm_common_interrupt+0x1e/0x40
? __do_softirq+0x75/0x2f3
irq_exit_rcu+0x93/0xe0
sysvec_apic_timer_interrupt+0xac/0xd0
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x12/0x20
arch_cpu_idle+0x12/0x20
default_idle_call+0x39/0xf0
do_idle+0x1b5/0x210
cpu_startup_entry+0x20/0x30
start_secondary+0xf3/0x100
secondary_startup_64_no_verify+0xc3/0xcb
</TASK>
handlers:
[<000000008f9bac49>] vp_interrupt
[<000000008f9bac49>] vp_interrupt
Disabling IRQ #22This happens because we don't invoke .enable_cbs callback in virtio_device_restore(). That callback is used by some transports (e.g. virtio-pci) to enable interrupts.
Let's fix it, by calling virtio_device_ready() as we do in virtio_dev_probe(). This function calls .enable_cts callback and sets DRIVER_OK status bit.
This fix also avoids setting DRIVER_OK twice for those drivers that call virtio_device_ready() in the .restore.
--- drivers/virtio/virtio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/virtio/virtio.c +3 -2
@@ -504,8 +504,9 @@ int virtio_device_restore(struct virtio_ goto err; } -/* Finally, tell the device we're all set */ -virtio_add_status (dev,VIRTIO_CONFIG_S_DRIVER_OK ); +/* If restore didn't do it, mark device DRIVER_OK ourselves. */ +if (!(dev->config->get_status (dev) &VIRTIO_CONFIG_S_DRIVER_OK )) +virtio_device_ready (dev);virtio_config_enable (dev);
Greg Kroah-Hartman
maintainerPATCH 953/1017 io_uring: fix memory leak of uid in files registration
In reply to Greg Kroah-HartmanFrom: Pavel Begunkov <[email protected]>
commit c86d18f4aa93e0e66cda0e55827cd03eea6bc5f8 upstream.
When there are no files for __io_sqe_files_scm() to process in the range, it'll free everything and return. However, it forgets to put uid.
--- fs/io_uring.c | 1 + 1 file changed, 1 insertion(+)
fs/io_uring.c +1 -0
@@ -8180,6 +8180,7 @@ static int __io_sqe_files_scm(struct io_fput (fpl->fp[i]); }else {kfree_skb (skb); +free_uid (fpl->user);kfree (fpl); }
Greg Kroah-Hartman
maintainerPATCH 954/1017 riscv module: remove (NOLOAD)
In reply to Greg Kroah-HartmanFrom: Fangrui Song <[email protected]>
commit 60210a3d86dc57ce4a76a366e7841dda746a33f7 upstream.
On ELF, (NOLOAD) sets the section type to SHT_NOBITS[1]. It is conceptually inappropriate for .plt, .got, and .got.plt sections which are always SHT_PROGBITS.
In GNU ld, if PLT entries are needed, .plt will be SHT_PROGBITS anyway and (NOLOAD) will be essentially ignored. In ld.lld, since
https://reviews.llvm.org/D118840 ("[ELF] Support (TYPE=<value>) to customize the output section type"), ld.lld will report a section type mismatch error (later changed to a warning). Just remove (NOLOAD) to fix the warning.
[1] https://lld.llvm.org/ELF/linker_script.html As of today, "The section should be marked as not loadable" on
https://sourceware.org/binutils/docs/ld/Output-Section-Type.html is outdated for ELF.
--- arch/riscv/include/asm/module.lds.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/riscv/include/asm/module.lds.h +3 -3
@@ -2,8 +2,8 @@/* Copyright (C) 2017 Andes Technology Corporation */ #ifdef CONFIG_MODULE_SECTIONS SECTIONS { - .plt (NOLOAD) : { BYTE(0) } - .got (NOLOAD) : { BYTE(0) } - .got.plt (NOLOAD) : { BYTE(0) } + .plt : { BYTE(0) } + .got : { BYTE(0) } + .got.plt : { BYTE(0) } } #endif
Greg Kroah-Hartman
maintainerPATCH 955/1017 ACPI: CPPC: Avoid out of bounds access when parsing _CPC data
In reply to Greg Kroah-HartmanFrom: Rafael J. Wysocki <[email protected]>
commit 40d8abf364bcab23bc715a9221a3c8623956257b upstream.
If the NumEntries field in the _CPC return package is less than 2, do not attempt to access the "Revision" element of that package, because it may not be present then.
--- drivers/acpi/cppc_acpi.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/acpi/cppc_acpi.c +5 -0
@@ -690,6 +690,11 @@ int acpi_cppc_processor_probe(struct acp cpc_obj = &out_obj->package.elements[0 ];if (cpc_obj->type ==ACPI_TYPE_INTEGER ) { num_ent = cpc_obj->integer.value; +if (num_ent <=1 ) { +pr_debug ("Unexpected _CPC NumEntries value (%d) for CPU:%d\n" , + num_ent, pr->id); + goto out_free; + } }else {pr_debug ("Unexpected entry type(%d) for NumEntries\n" , cpc_obj->type);
Greg Kroah-Hartman
maintainerPATCH 956/1017 vhost: handle error while adding split ranges to iotlb
In reply to Greg Kroah-HartmanFrom: Anirudh Rayabharam <[email protected]>
commit 03a91c9af2c42ae14afafb829a4b7e6589ab5892 upstream.
vhost_iotlb_add_range_ctx() handles the range [0, ULONG_MAX] by splitting it into two ranges and adding them separately. The return value of adding the first range to the iotlb is currently ignored. Check the return value and bail out in case of an error.
--- drivers/vhost/iotlb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/vhost/iotlb.c +5 -1
@@ -62,8 +62,12 @@ int vhost_iotlb_add_range_ctx(struct vho*/ if (start ==0 && last ==ULONG_MAX ) {u64 mid = last /2 ; +int err =vhost_iotlb_add_range_ctx (iotlb, start, mid, addr, + perm, opaque); + +if (err) +return err; -vhost_iotlb_add_range_ctx (iotlb, start, mid, addr, perm, opaque); addr += mid +1 ; start = mid +1 ; }
Greg Kroah-Hartman
maintainerPATCH 957/1017 spi: Fix Tegra QSPI example
In reply to Greg Kroah-HartmanFrom: Jon Hunter <[email protected]>
commit 320689a1b543ca1396b3ed43bb18045e4a7ffd79 upstream.
When running dt_binding_check on the nvidia,tegra210-quad.yaml binding document the following error is reported ...
nvidia,tegra210-quad.example.dt.yaml:0:0: /example-0/spi@70410000/flash@0:
failed to match any schema with compatible: ['spi-nor']
Update the example in the binding document to fix the above error.
--- Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/spi/nvidia,tegra210-quad.yaml +1 -1
@@ -106,7 +106,7 @@ examples: dma-names = "rx", "tx"; flash@0 { - compatible = "spi-nor"; + compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <104000000>; spi-tx-bus-width = <2>;
Greg Kroah-Hartman
maintainerPATCH 958/1017 platform/chrome: cros_ec_typec: Check for EC device
In reply to Greg Kroah-HartmanFrom: Prashant Malani <[email protected]>
commit ffebd90532728086007038986900426544e3df4e upstream.
The Type C ACPI device on older Chromebooks is not generated correctly (since their EC firmware doesn't support the new commands required). In such cases, the crafted ACPI device doesn't have an EC parent, and it is therefore not useful (it shouldn't be generated in the first place since the EC firmware doesn't support any of the Type C commands).
To handle devices which use these older firmware revisions, check for the parent EC device handle, and fail the probe if it's not found.
--- drivers/platform/chrome/cros_ec_typec.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/platform/chrome/cros_ec_typec.c +6 -0
@@ -1075,7 +1075,13 @@ static int cros_typec_probe(struct platfreturn -ENOMEM ; typec->dev = dev; + typec->ec =dev_get_drvdata (pdev->dev.parent); +if (!typec->ec) { +dev_err (dev,"couldn't find parent EC device\n" ); +return -ENODEV ; + } +platform_set_drvdata (pdev, typec); ret =cros_typec_get_cmd_version (typec);
Greg Kroah-Hartman
maintainerPATCH 959/1017 can: isotp: restore accidentally removed MSG_PEEK feature
In reply to Greg Kroah-HartmanFrom: Oliver Hartkopp <[email protected]>
[ Upstream commit e382fea8ae54f5bb62869c6b69b33993d43adeca ]
In commit 42bf50a1795a ("can: isotp: support MSG_TRUNC flag when reading from socket") a new check for recvmsg flags has been introduced that only checked for the flags that are handled in isotp_recvmsg() itself.
This accidentally removed the MSG_PEEK feature flag which is processed later in the call chain in __skb_try_recv_from_queue().
Add MSG_PEEK to the set of valid flags to restore the feature.
--- net/can/isotp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/can/isotp.c +1 -1
@@ -1009,7 +1009,7 @@ static int isotp_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,int noblock = flags &MSG_DONTWAIT ;int ret =0 ; -if (flags & ~(MSG_DONTWAIT |MSG_TRUNC )) +if (flags & ~(MSG_DONTWAIT |MSG_TRUNC |MSG_PEEK ))return -EINVAL ;if (!so->bound)
Signature · 1 line
2.34.1
Greg Kroah-Hartman
maintainerPATCH 960/1017 proc: bootconfig: Add null pointer check
In reply to Greg Kroah-HartmanFrom: Lv Ruyi <[email protected]>
commit bed5b60bf67ccd8957b8c0558fead30c4a3f5d3f upstream.
kzalloc is a memory allocation function which can return NULL when some internal memory errors happen. It is safer to add null pointer check.
--- fs/proc/bootconfig.c | 2 ++ 1 file changed, 2 insertions(+)
fs/proc/bootconfig.c +2 -0
@@ -32,6 +32,8 @@ static int __init copy_xbc_key_value_lisint ret =0 ; key =kzalloc (XBC_KEYLEN_MAX ,GFP_KERNEL ); +if (!key) +return -ENOMEM ;xbc_for_each_key_value (leaf, val) { ret =xbc_node_compose_key (leaf, key,XBC_KEYLEN_MAX );
Greg Kroah-Hartman
maintainerPATCH 961/1017 drm/connector: Fix typo in documentation
In reply to Greg Kroah-HartmanFrom: Maxime Ripard <[email protected]>
commit dca384a3bf5af1c781cfa6aec63904bdb5018c36 upstream.
Commit 4adc33f36d80 ("drm/edid: Split deep color modes between RGB and YUV444") introduced two new variables in struct drm_display_info and their documentation, but the documentation part had a typo resulting in a doc build warning.
--- include/drm/drm_connector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/drm/drm_connector.h +2 -2
@@ -566,13 +566,13 @@ struct drm_display_info {bool rgb_quant_range_selectable;/** -* @edid_hdmi_dc_rgb444_modes: Mask of supported hdmi deep color modes +* @edid_hdmi_rgb444_dc_modes: Mask of supported hdmi deep color modes * in RGB 4:4:4. Even more stuff redundant with @bus_formats. */ u8 edid_hdmi_rgb444_dc_modes;/** -* @edid_hdmi_dc_ycbcr444_modes: Mask of supported hdmi deep color +* @edid_hdmi_ycbcr444_dc_modes: Mask of supported hdmi deep color * modes in YCbCr 4:4:4. Even more stuff redundant with @bus_formats. */ u8 edid_hdmi_ycbcr444_dc_modes;
Greg Kroah-Hartman
maintainerPATCH 962/1017 scsi: qla2xxx: Add qla2x00_async_done() for async routines
In reply to Greg Kroah-HartmanFrom: Saurav Kashyap <[email protected]>
commit 49b729f58e7a98a006a8a0c1dcca8a1a4f58d2a8 upstream.
This done routine will delete the timer and check for its return value and decrease the reference count accordingly. This prevents boot hangs reported after commit 31e6cdbe0eae ("scsi: qla2xxx: Implement ref count for SRB") was merged.
--- drivers/scsi/qla2xxx/qla_iocb.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_iocb.c +16 -1
@@ -2560,6 +2560,20 @@ qla24xx_tm_iocb(srb_t *sp, struct tsk_mg } } +static void +qla2x00_async_done (struct srb *sp,int res) +{ +if (del_timer (&sp->u.iocb_cmd.timer)) { +/* +* Successfully cancelled the timeout handler +* ref: TMR +*/ +if (kref_put (&sp->cmd_kref, qla2x00_sp_release)) +return ; + } + sp->async_done (sp, res); +} +void qla2x00_sp_release (struct kref *kref) {
@@ -2573,7 +2587,8 @@ qla2x00_init_async_sp(srb_t *sp, unsigne void (*done)(struct srb *sp, int res)) {timer_setup (&sp->u.iocb_cmd.timer, qla2x00_sp_timeout,0 ); - sp->done = done; + sp->done = qla2x00_async_done; + sp->async_done = done; sp->free = qla2x00_sp_free; sp->u.iocb_cmd.timeout = qla2x00_async_iocb_timeout; sp->u.iocb_cmd.timer.expires = jiffies + tmo *HZ ;
Greg Kroah-Hartman
maintainerPATCH 963/1017 staging: mt7621-dts: fix pinctrl-0 items to be size-1 items on ethernet
In reply to Greg Kroah-HartmanFrom: Arınç ÜNAL <[email protected]>
commit 25e4f5220efead592c83200241e098e757d37e1f upstream.
Fix pinctrl-0 items under the ethernet node to be size-1 items. Current notation would be used on specifications with non-zero cells.
--- drivers/staging/mt7621-dts/mt7621.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/mt7621-dts/mt7621.dtsi +1 -1
@@ -364,7 +364,7 @@ mediatek,ethsys = <&sysc>; pinctrl-names = "default"; - pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>, <&rgmii2_pins>; gmac0: mac@0 { compatible = "mediatek,eth-mac";
Greg Kroah-Hartman
maintainerPATCH 964/1017 docs: fix make htmldocs warning in SCTP.rst
In reply to Greg Kroah-HartmanFrom: Wan Jiabing <[email protected]>
commit 70868c6b8fd80db585da57a264c50a69af8fd3c3 upstream.
Fix following 'make htmldocs' warnings:./Documentation/security/SCTP.rst:123: WARNING: Title underline too short. security_sctp_assoc_established()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Documentation/security/SCTP.rst:123: WARNING: Title underline too short. security_sctp_assoc_established()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Documentation/security/SCTP.rst:273: WARNING: Title underline too short. security_sctp_assoc_established()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Documentation/security/SCTP.rst:273: WARNING: Title underline too short. security_sctp_assoc_established()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- Documentation/security/SCTP.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/security/SCTP.rst +2 -2
@@ -120,7 +120,7 @@ calls **sctp_peeloff**\(3). security_sctp_assoc_established() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Called when a COOKIE ACK is received, and the peer secid will be saved into ``@asoc->peer_secid`` for client::
@@ -270,7 +270,7 @@ sockets sid and peer sid to that contain security_sctp_assoc_established() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Called when a COOKIE ACK is received where it sets the connection's peer sid to that in ``@skb``::
Greg Kroah-Hartman
maintainerPATCH 965/1017 arm64: mm: Drop const from conditional arm64_dma_phys_limit definition
In reply to Greg Kroah-HartmanFrom: Will Deacon <[email protected]>
commit 770093459b9b333380aa71f2c31c60b14895c1df upstream.
Commit 031495635b46 ("arm64: Do not defer reserve_crashkernel() for platforms with no DMA memory zones") introduced different definitions for 'arm64_dma_phys_limit' depending on CONFIG_ZONE_DMA{,32} based on a late suggestion from Pasha. Sadly, this results in a build error when passing W=1:
| arch/arm64/mm/init.c:90:19: error: conflicting type qualifiers for 'arm64_dma_phys_limit'
Drop the 'const' for now and use '__ro_after_init' consistently.
--- arch/arm64/mm/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/mm/init.c +1 -1
@@ -87,7 +87,7 @@ EXPORT_SYMBOL(memstart_addr);#if IS_ENABLED (CONFIG_ZONE_DMA ) ||IS_ENABLED (CONFIG_ZONE_DMA32 )phys_addr_t __ro_after_init arm64_dma_phys_limit;#else -const phys_addr_t arm64_dma_phys_limit =PHYS_MASK +1 ; +phys_addr_t __ro_after_init arm64_dma_phys_limit =PHYS_MASK +1 ;#endif #ifdef CONFIG_KEXEC_CORE
Greg Kroah-Hartman
maintainerPATCH 966/1017 ASoC: soc-compress: Change the check for codec_dai
In reply to Greg Kroah-HartmanFrom: Jiasheng Jiang <[email protected]>
commit ccb4214f7f2a8b75acf493f31128e464ee1a3536 upstream.
It should be better to reverse the check on codec_dai and returned early in order to be easier to understand.
--- sound/soc/soc-compress.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
sound/soc/soc-compress.c +11 -8
@@ -567,16 +567,19 @@ int snd_soc_new_compress(struct snd_soc_return -EINVAL ; } -/* check client and interface hw capabilities */ -if (codec_dai) { -if (snd_soc_dai_stream_valid (codec_dai,SNDRV_PCM_STREAM_PLAYBACK ) && -snd_soc_dai_stream_valid (cpu_dai,SNDRV_PCM_STREAM_PLAYBACK )) - playback =1 ; -if (snd_soc_dai_stream_valid (codec_dai,SNDRV_PCM_STREAM_CAPTURE ) && -snd_soc_dai_stream_valid (cpu_dai,SNDRV_PCM_STREAM_CAPTURE )) - capture =1 ; +if (!codec_dai) { +dev_err (rtd->card->dev,"Missing codec\n" ); +return -EINVAL ; } +/* check client and interface hw capabilities */ +if (snd_soc_dai_stream_valid (codec_dai,SNDRV_PCM_STREAM_PLAYBACK ) && +snd_soc_dai_stream_valid (cpu_dai,SNDRV_PCM_STREAM_PLAYBACK )) + playback =1 ; +if (snd_soc_dai_stream_valid (codec_dai,SNDRV_PCM_STREAM_CAPTURE ) && +snd_soc_dai_stream_valid (cpu_dai,SNDRV_PCM_STREAM_CAPTURE )) + capture =1 ; +/* * Compress devices are unidirectional so only one of the directions * should be set, check for that (xor)
Greg Kroah-Hartman
maintainerPATCH 967/1017 Reinstate some of "swiotlb: rework "fix info leak with DMA_FROM_DEVICE""
In reply to Greg Kroah-HartmanFrom: Linus Torvalds <[email protected]>
commit 901c7280ca0d5e2b4a8929fbe0bfb007ac2a6544 upstream.
Halil Pasic points out [1] that the full revert of that commit (revert in bddac7c1e02b), and that a partial revert that only reverts the problematic case, but still keeps some of the cleanups is probably better. 
And that partial revert [2] had already been verified by Oleksandr Natalenko to also fix the issue, I had just missed that in the long discussion.
So let's reinstate the cleanups from commit aa6f8dcbab47 ("swiotlb:
rework "fix info leak with DMA_FROM_DEVICE""), and effectively only revert the part that caused problems.
--- Documentation/core-api/dma-attributes.rst | 8 -------- include/linux/dma-mapping.h | 8 -------- kernel/dma/swiotlb.c | 12 ++++++++---- 3 files changed, 8 insertions(+), 20 deletions(-)
Documentation/core-api/dma-attributes.rst +0 -8
@@ -130,11 +130,3 @@ accesses to DMA buffers in both privileg subsystem that the buffer is fully accessible at the elevated privilege level (and ideally inaccessible or at least read-only at the lesser-privileged levels). - -DMA_ATTR_OVERWRITE ------------------- - -This is a hint to the DMA-mapping subsystem that the device is expected to -overwrite the entire mapped size, thus the caller does not require any of the -previous buffer contents to be preserved. This allows bounce-buffering -implementations to optimise DMA_FROM_DEVICE transfers.
include/linux/dma-mapping.h +0 -8
@@ -62,14 +62,6 @@#define DMA_ATTR_PRIVILEGED (1UL << 9)/* -* This is a hint to the DMA-mapping subsystem that the device is expected -* to overwrite the entire mapped size, thus the caller does not require any -* of the previous buffer contents to be preserved. This allows -* bounce-buffering implementations to optimise DMA_FROM_DEVICE transfers. -*/ -#define DMA_ATTR_OVERWRITE (1UL << 10) - -/* * A dma_addr_t can hold any valid DMA or bus address for the platform. It can * be given to a device to use as a DMA source or target. It is specific to a * given device and there may be a translation between the CPU physical address
kernel/dma/swiotlb.c +8 -4
@@ -581,10 +581,14 @@ phys_addr_t swiotlb_tbl_map_single(strucfor (i =0 ; i <nr_slots (alloc_size + offset); i++) mem->slots[index + i].orig_addr =slot_addr (orig_addr, i); tlb_addr =slot_addr (mem->start, index) + offset; -if (!(attrs &DMA_ATTR_SKIP_CPU_SYNC ) && - (!(attrs &DMA_ATTR_OVERWRITE ) || dir ==DMA_TO_DEVICE || - dir ==DMA_BIDIRECTIONAL )) -swiotlb_bounce (dev, tlb_addr, mapping_size,DMA_TO_DEVICE ); +/* +* When dir == DMA_FROM_DEVICE we could omit the copy from the orig +* to the tlb buffer, if we knew for sure the device will +* overwirte the entire current content. But we don't. Thus +* unconditional bounce may prevent leaking swiotlb content (i.e. +* kernel memory) to user-space. +*/ +swiotlb_bounce (dev, tlb_addr, mapping_size,DMA_TO_DEVICE );return tlb_addr; }
Greg Kroah-Hartman
maintainerPATCH 968/1017 tracing: Have type enum modifications copy the strings
In reply to Greg Kroah-HartmanFrom: Steven Rostedt (Google) <[email protected]>
commit 795301d3c28996219d555023ac6863401b6076bc upstream.
When an enum is used in the visible parts of a trace event that is exported to user space, the user space applications like perf and trace-cmd do not have a way to know what the value of the enum is. To solve this, at boot up (or module load) the printk formats are modified to replace the enum with their numeric value in the string output.
Array fields of the event are defined by [<nr-elements>] in the type portion of the format file so that the user space parsers can correctly parse the array into the appropriate size chunks. But in some trace events, an enum is used in defining the size of the array, which once again breaks the parsing of user space tooling.
This was solved the same way as the print formats were, but it modified the type strings of the trace event. This caused crashes in some architectures because, as supposed to the print string, is a const string value. This was not detected on x86, as it appears that const strings are still writable (at least in boot up), but other architectures this is not the case, and writing to a const string will cause a kernel fault.
To fix this, use kstrdup() to copy the type before modifying it. If the trace event is for the core kernel there's no need to free it because the string will be in use for the life of the machine being on line. For modules, create a link list to store all the strings being allocated for modules and when the module is removed, free them.
--- kernel/trace/trace_events.c | 62 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-)
kernel/trace/trace_events.c +61 -1
@@ -40,6 +40,14 @@ static LIST_HEAD(ftrace_generic_fields);static LIST_HEAD (ftrace_common_fields);static bool eventdir_initialized; +static LIST_HEAD (module_strings); + +struct module_string { +struct list_head next; +struct module *module; +char *str; +}; +#define GFP_TRACE (GFP_KERNEL | __GFP_ZERO)static struct kmem_cache *field_cachep;
@@ -2637,14 +2645,40 @@ static void update_event_printk(struct t } } +static void add_str_to_module (struct module *module,char *str) +{ +struct module_string *modstr; + + modstr =kmalloc (sizeof (*modstr),GFP_KERNEL ); + +/* +* If we failed to allocate memory here, then we'll just +* let the str memory leak when the module is removed. +* If this fails to allocate, there's worse problems than +* a leaked string on module removal. +*/ +if (WARN_ON_ONCE (!modstr)) +return ; + + modstr->module = module; + modstr->str = str; + +list_add (&modstr->next, &module_strings); +} +static void update_event_fields (struct trace_event_call *call,struct trace_eval_map *map) {struct ftrace_event_field *field;struct list_head *head;char *ptr; +char *str;int len =strlen (map->eval_string); +/* Dynamic events should never have field maps */ +if (WARN_ON_ONCE (call->flags &TRACE_EVENT_FL_DYNAMIC )) +return ; + head =trace_get_fields (call);list_for_each_entry (field, head, link) { ptr =strchr (field->type,'[' );
@@ -2658,9 +2692,26 @@ static void update_event_fields(struct tif (strncmp (map->eval_string, ptr, len) !=0 )continue ; + str =kstrdup (field->type,GFP_KERNEL ); +if (WARN_ON_ONCE (!str)) +return ; + ptr = str + (ptr - field->type); ptr =eval_replace (ptr, map, len);/* enum/sizeof string smaller than value */ -WARN_ON_ONCE (!ptr); +if (WARN_ON_ONCE (!ptr)) { +kfree (str); +continue ; + } + +/* +* If the event is part of a module, then we need to free the string +* when the module is removed. Otherwise, it will stay allocated +* until a reboot. +*/ +if (call->module) +add_str_to_module (call->module, str); + + field->type = str; } }
@@ -2885,6 +2936,7 @@ static void trace_module_add_events(strustatic void trace_module_remove_events (struct module *mod) {struct trace_event_call *call, *p; +struct module_string *modstr, *m;down_write (&trace_event_sem);list_for_each_entry_safe (call, p, &ftrace_events, list) {
@@ -2893,6 +2945,14 @@ static void trace_module_remove_events(sif (call->module == mod)__trace_remove_event_call (call); } +/* Check for any strings allocade for this module */ +list_for_each_entry_safe (modstr, m, &module_strings, next) { +if (modstr->module != mod) +continue ; +list_del (&modstr->next); +kfree (modstr->str); +kfree (modstr); + }up_write (&trace_event_sem);/*
Greg Kroah-Hartman
maintainerPATCH 969/1017 net: add skb_set_end_offset() helper
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
commit 763087dab97547230a6807c865a6a5ae53a59247 upstream.
We have multiple places where this helper is convenient, and plan using it in the following patch.
--- include/linux/skbuff.h | 10 ++++++++++ net/core/skbuff.c | 19 +++++-------------- 2 files changed, 15 insertions(+), 14 deletions(-)
include/linux/skbuff.h +10 -0
@@ -1446,6 +1446,11 @@ static inline unsigned int skb_end_offse {return skb->end; } + +static inline void skb_set_end_offset (struct sk_buff *skb,unsigned int offset) +{ + skb->end = offset; +}#else static inline unsigned char *skb_end_pointer (const struct sk_buff *skb) {
@@ -1456,6 +1461,11 @@ static inline unsigned int skb_end_offse {return skb->end - skb->head; } + +static inline void skb_set_end_offset (struct sk_buff *skb,unsigned int offset) +{ + skb->end = skb->head + offset; +}#endif /* Internal */
net/core/skbuff.c +5 -14
@@ -201,7 +201,7 @@ static void __build_skb_around(struct sk skb->head = data; skb->data = data;skb_reset_tail_pointer (skb); - skb->end = skb->tail + size; +skb_set_end_offset (skb, size); skb->mac_header = (typeof(skb->mac_header))~0U; skb->transport_header = (typeof(skb->transport_header))~0U;
@@ -1738,11 +1738,10 @@ int pskb_expand_head(struct sk_buff *skb skb->head = data; skb->head_frag =0 ; skb->data += off; + +skb_set_end_offset (skb, size);#ifdef NET_SKBUFF_DATA_USES_OFFSET - skb->end = size; off = nhead; -#else - skb->end = skb->head + size;#endif skb->tail += off;skb_headers_offset_update (skb, nhead);
@@ -6138,11 +6137,7 @@ static int pskb_carve_inside_header(stru skb->head = data; skb->data = data; skb->head_frag =0 ; -#ifdef NET_SKBUFF_DATA_USES_OFFSET - skb->end = size; -#else - skb->end = skb->head + size; -#endif +skb_set_end_offset (skb, size);skb_set_tail_pointer (skb,skb_headlen (skb));skb_headers_offset_update (skb,0 ); skb->cloned =0 ;
@@ -6280,11 +6275,7 @@ static int pskb_carve_inside_nonlinear(s skb->head = data; skb->head_frag =0 ; skb->data = data; -#ifdef NET_SKBUFF_DATA_USES_OFFSET - skb->end = size; -#else - skb->end = skb->head + size; -#endif +skb_set_end_offset (skb, size);skb_reset_tail_pointer (skb);skb_headers_offset_update (skb,0 ); skb->cloned =0 ;
Greg Kroah-Hartman
maintainerPATCH 970/1017 net: preserve skb_end_offset() in skb_unclone_keeptruesize()
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
commit 2b88cba55883eaafbc9b7cbff0b2c7cdba71ed01 upstream.
syzbot found another way to trigger the infamous WARN_ON_ONCE(delta < len) in skb_try_coalesce() [1]
I was able to root cause the issue to kfence.
When kfence is in action, the following assertion is no longer true:
int size = xxxx;
void *ptr1 = kmalloc(size, gfp);
void *ptr2 = kmalloc(size, gfp);
if (ptr1 && ptr2)
ASSERT(ksize(ptr1) == ksize(ptr2));
We attempted to fix these issues in the blamed commits, but forgot that TCP was possibly shifting data after skb_unclone_keeptruesize() has been used, notably from tcp_retrans_try_collapse().
So we not only need to keep same skb->truesize value, we also need to make sure TCP wont fill new tailroom that pskb_expand_head() was able to get from a addr = kmalloc(...) followed by ksize(addr)
Split skb_unclone_keeptruesize() into two parts:
1) Inline skb_unclone_keeptruesize() for the common case, when skb is not cloned.
2) Out of line __skb_unclone_keeptruesize() for the 'slow path'.
WARNING: CPU: 1 PID: 6490 at net/core/skbuff.c:5295 skb_try_coalesce+0x1235/0x1560 net/core/skbuff.c:5295 Modules linked in: CPU: 1 PID: 6490 Comm: syz-executor161 Not tainted 5.17.0-rc4-syzkaller-00229-g4f12b742eb2b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:skb_try_coalesce+0x1235/0x1560 net/core/skbuff.c:5295 Code: bf 01 00 00 00 0f b7 c0 89 c6 89 44 24 20 e8 62 24 4e fa 8b 44 24 20 83 e8 01 0f 85 e5 f0 ff ff e9 87 f4 ff ff e8 cb 20 4e fa <0f> 0b e9 06 f9 ff ff e8 af b2 95 fa e9 69 f0 ff ff e8 95 b2 95 fa RSP: 0018:ffffc900063af268 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 00000000ffffffd5 RCX: 0000000000000000 RDX: ffff88806fc05700 RSI: ffffffff872abd55 RDI: 0000000000000003 RBP: ffff88806e675500 R08: 00000000ffffffd5 R09: 0000000000000000 R10: ffffffff872ab659 R11: 0000000000000000 R12: ffff88806dd554e8 R13: ffff88806dd9bac0 R14: ffff88806dd9a2c0 R15: 0000000000000155 FS: 00007f18014f9700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020002000 CR3: 000000006be7a000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> tcp_try_coalesce net/ipv4/tcp_input.c:4651 [inline] tcp_try_coalesce+0x393/0x920 net/ipv4/tcp_input.c:4630 tcp_queue_rcv+0x8a/0x6e0 net/ipv4/tcp_input.c:4914 tcp_data_queue+0x11fd/0x4bb0 net/ipv4/tcp_input.c:5025 tcp_rcv_established+0x81e/0x1ff0 net/ipv4/tcp_input.c:5947 tcp_v4_do_rcv+0x65e/0x980 net/ipv4/tcp_ipv4.c:1719 sk_backlog_rcv include/net/sock.h:1037 [inline] __release_sock+0x134/0x3b0 net/core/sock.c:2779 release_sock+0x54/0x1b0 net/core/sock.c:3311 sk_wait_data+0x177/0x450 net/core/sock.c:2821 tcp_recvmsg_locked+0xe28/0x1fd0 net/ipv4/tcp.c:2457 tcp_recvmsg+0x137/0x610 net/ipv4/tcp.c:2572 inet_recvmsg+0x11b/0x5e0 net/ipv4/af_inet.c:850 sock_recvmsg_nosec net/socket.c:948 [inline] sock_recvmsg net/socket.c:966 [inline] sock_recvmsg net/socket.c:962 [inline] ____sys_recvmsg+0x2c4/0x600 net/socket.c:2632 ___sys_recvmsg+0x127/0x200 net/socket.c:2674 __sys_recvmsg+0xe2/0x1a0 net/socket.c:2704 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae
--- include/linux/skbuff.h | 18 +++++++++--------- net/core/skbuff.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 9 deletions(-)
include/linux/skbuff.h +9 -9
@@ -1705,19 +1705,19 @@ static inline int skb_unclone(struct sk_return 0 ; } -/* This variant of skb_unclone() makes sure skb->truesize is not changed */ +/* This variant of skb_unclone() makes sure skb->truesize +* and skb_end_offset() are not changed, whenever a new skb->head is needed. +* +* Indeed there is no guarantee that ksize(kmalloc(X)) == ksize(kmalloc(X)) +* when various debugging features are in place. +*/ +int __skb_unclone_keeptruesize (struct sk_buff *skb,gfp_t pri);static inline int skb_unclone_keeptruesize (struct sk_buff *skb,gfp_t pri) {might_sleep_if (gfpflags_allow_blocking (pri)); -if (skb_cloned (skb)) { -unsigned int save = skb->truesize; -int res; - - res =pskb_expand_head (skb,0 ,0 , pri); - skb->truesize = save; -return res; - } +if (skb_cloned (skb)) +return __skb_unclone_keeptruesize (skb, pri);return 0 ; }
net/core/skbuff.c +32 -0
@@ -1789,6 +1789,38 @@ struct sk_buff *skb_realloc_headroom(str }EXPORT_SYMBOL (skb_realloc_headroom); +int __skb_unclone_keeptruesize (struct sk_buff *skb,gfp_t pri) +{ +unsigned int saved_end_offset, saved_truesize; +struct skb_shared_info *shinfo; +int res; + + saved_end_offset =skb_end_offset (skb); + saved_truesize = skb->truesize; + + res =pskb_expand_head (skb,0 ,0 , pri); +if (res) +return res; + + skb->truesize = saved_truesize; + +if (likely (skb_end_offset (skb) == saved_end_offset)) +return 0 ; + + shinfo =skb_shinfo (skb); + +/* We are about to change back skb->end, +* we need to move skb_shinfo() to its new location. +*/ +memmove (skb->head + saved_end_offset, + shinfo, + offsetof(struct skb_shared_info, frags[shinfo->nr_frags])); + +skb_set_end_offset (skb, saved_end_offset); + +return 0 ; +} +/** * skb_expand_head - reallocate header of &sk_buff * @skb: buffer to reallocate
Greg Kroah-Hartman
maintainerPATCH 971/1017 mm/mmap: return 1 from stack_guard_gap __setup() handler
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
commit e6d094936988910ce6e8197570f2753898830081 upstream.
__setup() handlers should return 1 if the command line option is handled and 0 if not (or maybe never return 0; it just pollutes init's environment). This prevents:
Unknown kernel command line parameters \ "BOOT_IMAGE=/boot/bzImage-517rc5 stack_guard_gap=100", will be \ passed to user space.
Run /sbin/init as init process
with arguments:
/sbin/init
with environment:
HOME=/
TERM=linux
BOOT_IMAGE=/boot/bzImage-517rc5
stack_guard_gap=100Return 1 to indicate that the boot option has been handled.
Note that there is no warning message if someone enters:
stack_guard_gap=anything_invalid
and 'val' and stack_guard_gap are both set to 0 due to the use of simple_strtoul(). This could be improved by using kstrtoxxx() and checking for an error.
It appears that having stack_guard_gap == 0 is valid (if unexpected) since using "stack_guard_gap=0" on the kernel command line does that.
--- mm/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/mmap.c +1 -1
@@ -2550,7 +2550,7 @@ static int __init cmdline_parse_stack_guif (!*endptr) stack_guard_gap = val <<PAGE_SHIFT ; -return 0 ; +return 1 ; }__setup ("stack_guard_gap=" , cmdline_parse_stack_guard_gap);
Greg Kroah-Hartman
maintainerPATCH 972/1017 ARM: 9187/1: JIVE: fix return value of __setup handler
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
commit 8b2360c7157b462c4870d447d1e65d30ef31f9aa upstream.
__setup() handlers should return 1 to obsolete_checksetup() in init/main.c to indicate that the boot option has been handled. A return of 0 causes the boot option/value to be listed as an Unknown kernel parameter and added to init's (limited) argument or environment strings. Also, error return codes don't mean anything to obsolete_checksetup() -- only non-zero (usually 1) or zero. So return 1 from jive_mtdset().
--- arch/arm/mach-s3c/mach-jive.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-s3c/mach-jive.c +3 -3
@@ -236,11 +236,11 @@ static int __init jive_mtdset(char *optiunsigned long set;if (options ==NULL || options[0 ] =='\0' ) -return 0 ; +return 1 ;if (kstrtoul (options,10 , &set)) {printk (KERN_ERR "failed to parse mtdset=%s\n" , options); -return 0 ; +return 1 ; }switch (set) {
@@ -255,7 +255,7 @@ static int __init jive_mtdset(char *opti "using default.", set); } -return 0 ; +return 1 ; }/* parse the mtdset= option given to the kernel command line */
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Greg Kroah-Hartman
maintainerPATCH 973/1017 mm/memcontrol: return 1 from cgroup.memory __setup() handler
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
commit 460a79e18842caca6fa0c415de4a3ac1e671ac50 upstream.
__setup() handlers should return 1 if the command line option is handled and 0 if not (or maybe never return 0; it just pollutes init's environment).
The only reason that this particular __setup handler does not pollute init's environment is that the setup string contains a '.', as in "cgroup.memory". This causes init/main.c::unknown_boottoption() to consider it to be an "Unused module parameter" and ignore it. (This is for parsing of loadable module parameters any time after kernel init.) Otherwise the string "cgroup.memory=whatever" would be added to init's environment strings.
Instead of relying on this '.' quirk, just return 1 to indicate that the boot option has been handled.
Note that there is no warning message if someone enters:
cgroup.memory=anything_invalid
--- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memcontrol.c +1 -1
@@ -7038,7 +7038,7 @@ static int __init cgroup_memory(char *s)if (!strcmp (token,"nokmem" )) cgroup_memory_nokmem = true; } -return 0 ; +return 1 ; }__setup ("cgroup.memory=" , cgroup_memory);
Greg Kroah-Hartman
maintainerPATCH 974/1017 mm/usercopy: return 1 from hardened_usercopy __setup() handler
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
commit 05fe3c103f7e6b8b4fca8a7001dfc9ed4628085b upstream.
__setup() handlers should return 1 if the command line option is handled and 0 if not (or maybe never return 0; it just pollutes init's environment). This prevents:
Unknown kernel command line parameters \ "BOOT_IMAGE=/boot/bzImage-517rc5 hardened_usercopy=off", will be \ passed to user space.
Run /sbin/init as init process
with arguments:
/sbin/init
with environment:
HOME=/
TERM=linux
BOOT_IMAGE=/boot/bzImage-517rc5
hardened_usercopy=offor
hardened_usercopy=on
but when "hardened_usercopy=foo" is used, there is no Unknown kernel command line parameter.
Return 1 to indicate that the boot option has been handled. Print a warning if strtobool() returns an error on the option string, but do not mark this as in unknown command line option and do not cause init's environment to be polluted with this string.
--- mm/usercopy.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
mm/usercopy.c +4 -1
@@ -294,7 +294,10 @@ static bool enable_checks __initdata = tstatic int __init parse_hardened_usercopy (char *str) { -return strtobool (str, &enable_checks); +if (strtobool (str, &enable_checks)) +pr_warn ("Invalid option string for hardened_usercopy: '%s'\n" , + str); +return 1 ; }__setup ("hardened_usercopy=" , parse_hardened_usercopy);
Greg Kroah-Hartman
maintainerPATCH 975/1017 af_unix: Support POLLPRI for OOB.
In reply to Greg Kroah-HartmanFrom: Kuniyuki Iwashima <[email protected]>
commit d9a232d435dcc966738b0f414a86f7edf4f4c8c4 upstream.
The commit 314001f0bf92 ("af_unix: Add OOB support") introduced OOB for AF_UNIX, but it lacks some changes for POLLPRI. Let's add the missing piece.
In the selftest, normal datagrams are sent followed by OOB data, so this commit replaces POLLIN | POLLPRI with just POLLPRI in the first test case.
--- net/unix/af_unix.c | 4 ++++ tools/testing/selftests/net/af_unix/test_unix_oob.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-)
net/unix/af_unix.c +4 -0
@@ -3049,6 +3049,10 @@ static __poll_t unix_poll(struct file *f mask |=EPOLLIN |EPOLLRDNORM ;if (sk_is_readable (sk)) mask |=EPOLLIN |EPOLLRDNORM ; +#if IS_ENABLED (CONFIG_AF_UNIX_OOB ) +if (READ_ONCE (unix_sk (sk)->oob_skb)) + mask |=EPOLLPRI ; +#endif /* Connection-based need to check for termination and startup */ if ((sk->sk_type == SOCK_STREAM || sk->sk_type == SOCK_SEQPACKET) &&
tools/testing/selftests/net/af_unix/test_unix_oob.c +3 -3
@@ -218,10 +218,10 @@ main(int argc, char **argv)/* Test 1: * veriyf that SIGURG is -* delivered and 63 bytes are -* read and oob is '@' +* delivered, 63 bytes are +* read, oob is '@', and POLLPRI works. */ -wait_for_data (pfd,POLLIN |POLLPRI ); +wait_for_data (pfd,POLLPRI );read_oob (pfd, &oob); len =read_data (pfd, buf,1024 );if (!signal_recvd || len !=63 || oob !='@' ) {
Greg Kroah-Hartman
maintainerPATCH 976/1017 libbpf: Define BTF_KIND_* constants in btf.h to avoid compilation errors
In reply to Greg Kroah-HartmanFrom: Toke Høiland-Jørgensen <[email protected]>
commit eaa266d83a3730a15de2ceebcc89e8f6290e8cf6 upstream.
The btf.h header included with libbpf contains inline helper functions to check for various BTF kinds. These helpers directly reference the BTF_KIND_* constants defined in the kernel header, and because the header file is included in user applications, this happens in the user application compile units.
This presents a problem if a user application is compiled on a system with older kernel headers because the constants are not available. To avoid this, add #defines of the constants directly in btf.h before using them.
Since the kernel header moved to an enum for BTF_KIND_*, the #defines can shadow the enum values without any errors, so we only need #ifndef guards for the constants that predates the conversion to enum. We group these so there's only one guard for groups of values that were added together.
[0] Closes: https://github.com/libbpf/libbpf/issues/436
--- tools/lib/bpf/btf.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
tools/lib/bpf/btf.h +21 -1
@@ -313,8 +313,28 @@ btf_dump__dump_type_data(struct btf_dump const struct btf_dump_type_data_opts *opts);/* -* A set of helpers for easier BTF types handling +* A set of helpers for easier BTF types handling. +* +* The inline functions below rely on constants from the kernel headers which +* may not be available for applications including this header file. To avoid +* compilation errors, we define all the constants here that were added after +* the initial introduction of the BTF_KIND* constants. */ +#ifndef BTF_KIND_FUNC +#define BTF_KIND_FUNC 12/* Function */ +#define BTF_KIND_FUNC_PROTO 13/* Function Proto */ +#endif +#ifndef BTF_KIND_VAR +#define BTF_KIND_VAR 14/* Variable */ +#define BTF_KIND_DATASEC 15/* Section */ +#endif +#ifndef BTF_KIND_FLOAT +#define BTF_KIND_FLOAT 16/* Floating point */ +#endif +/* The kernel header switched to enums, so these two were never #defined */ +#define BTF_KIND_DECL_TAG 17/* Decl Tag */ +#define BTF_KIND_TYPE_TAG 18/* Type Tag */ +static inline __u16 btf_kind (const struct btf_type *t) {return BTF_INFO_KIND (t->info);
Greg Kroah-Hartman
maintainerPATCH 977/1017 bpf: Adjust BPF stack helper functions to accommodate skip > 0
In reply to Greg Kroah-HartmanFrom: Namhyung Kim <[email protected]>
commit ee2a098851bfbe8bcdd964c0121f4246f00ff41e upstream.
Let's say that the caller has storage for num_elem stack frames. Then, the BPF stack helper functions walk the stack for only num_elem frames. This means that if skip > 0, one keeps only 'num_elem - skip' frames.
This is because it sets init_nr in the perf_callchain_entry to the end of the buffer to save num_elem entries only. I believe it was because the perf callchain code unwound the stack frames until it reached the global max size (sysctl_perf_event_max_stack).
However it now has perf_callchain_entry_ctx.max_stack to limit the iteration locally. This simplifies the code to handle init_nr in the BPF callstack entries and removes the confusion with the perf_event's __PERF_SAMPLE_CALLCHAIN_EARLY which sets init_nr to 0.
Also change the comment on bpf_get_stack() in the header file to be more explicit what the return value means.
--- include/uapi/linux/bpf.h | 8 +++--- kernel/bpf/stackmap.c | 56 ++++++++++++++++++++--------------------------- 2 files changed, 28 insertions(+), 36 deletions(-)
include/uapi/linux/bpf.h +4 -4
@@ -2973,8 +2973,8 @@ union bpf_attr {* * # sysctl kernel.perf_event_max_stack=<new value> * Return -* A non-negative value equal to or less than *size* on success, -* or a negative error in case of failure. +* The non-negative copied *buf* length equal to or less than +* *size* on success, or a negative error in case of failure. * * long bpf_skb_load_bytes_relative(const void *skb, u32 offset, void *to, u32 len, u32 start_header) * Description
@@ -4277,8 +4277,8 @@ union bpf_attr {* * # sysctl kernel.perf_event_max_stack=<new value> * Return -* A non-negative value equal to or less than *size* on success, -* or a negative error in case of failure. +* The non-negative copied *buf* length equal to or less than +* *size* on success, or a negative error in case of failure. * * long bpf_load_hdr_opt(struct bpf_sock_ops *skops, void *searchby_res, u32 len, u64 flags) * Description
kernel/bpf/stackmap.c +24 -32
127 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 978/1017 bpf: Fix comment for helper bpf_current_task_under_cgroup()
In reply to Greg Kroah-HartmanFrom: Hengqi Chen <[email protected]>
commit 58617014405ad5c9f94f464444f4972dabb71ca7 upstream.
Fix the descriptions of the return values of helper bpf_current_task_under_cgroup().
--- include/uapi/linux/bpf.h | 4 ++-- tools/include/uapi/linux/bpf.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
include/uapi/linux/bpf.h +2 -2
@@ -2284,8 +2284,8 @@ union bpf_attr {* Return * The return value depends on the result of the test, and can be: * -* * 0, if current task belongs to the cgroup2. -* * 1, if current task does not belong to the cgroup2. +* * 1, if current task belongs to the cgroup2. +* * 0, if current task does not belong to the cgroup2. * * A negative error code, if an error occurred. * * long bpf_skb_change_tail(struct sk_buff *skb, u32 len, u64 flags)
tools/include/uapi/linux/bpf.h +2 -2
@@ -2284,8 +2284,8 @@ union bpf_attr {* Return * The return value depends on the result of the test, and can be: * -* * 0, if current task belongs to the cgroup2. -* * 1, if current task does not belong to the cgroup2. +* * 1, if current task belongs to the cgroup2. +* * 0, if current task does not belong to the cgroup2. * * A negative error code, if an error occurred. * * long bpf_skb_change_tail(struct sk_buff *skb, u32 len, u64 flags)
Greg Kroah-Hartman
maintainerPATCH 979/1017 nbd: fix possible overflow on first_minor in nbd_dev_add()
In reply to Greg Kroah-HartmanFrom: Zhang Wensheng <[email protected]>
commit 6d35d04a9e18990040e87d2bbf72689252669d54 upstream.
When 'index' is a big numbers, it may become negative which forced to 'int'. then 'index << part_shift' might overflow to a positive value that is not greater than '0xfffff', then sysfs might complains about duplicate creation. Because of this, move the 'index' judgment to the front will fix it and be better.
--- drivers/block/nbd.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/block/nbd.c +12 -12
@@ -1800,17 +1800,6 @@ static struct nbd_device *nbd_dev_add(inrefcount_set (&nbd->refs,0 );INIT_LIST_HEAD (&nbd->list); disk->major =NBD_MAJOR ; - -/* Too big first_minor can cause duplicate creation of -* sysfs files/links, since index << part_shift might overflow, or -* MKDEV() expect that the max bits of first_minor is 20. -*/ - disk->first_minor = index << part_shift; -if (disk->first_minor < index || disk->first_minor >MINORMASK ) { - err = -EINVAL ; - goto out_free_work; - } - disk->minors =1 << part_shift; disk->fops = &nbd_fops; disk->private_data = nbd;
@@ -1915,8 +1904,19 @@ static int nbd_genl_connect(struct sk_buif (!netlink_capable (skb,CAP_SYS_ADMIN ))return -EPERM ; -if (info->attrs[NBD_ATTR_INDEX ]) +if (info->attrs[NBD_ATTR_INDEX ]) { index =nla_get_u32 (info->attrs[NBD_ATTR_INDEX ]); + +/* +* Too big first_minor can cause duplicate creation of +* sysfs files/links, since index << part_shift might overflow, or +* MKDEV() expect that the max bits of first_minor is 20. +*/ +if (index <0 || index >MINORMASK >> part_shift) { +printk (KERN_ERR "nbd: illegal input index %d\n" , index); +return -EINVAL ; + } + }if (!info->attrs[NBD_ATTR_SOCKETS ]) {printk (KERN_ERR "nbd: must specify at least one socket\n" );return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 980/1017 mmc: rtsx: Use pm_runtime_{get,put}() to handle runtime PM
In reply to Greg Kroah-HartmanFrom: Kai-Heng Feng <[email protected]>
commit 7499b529d97f752124fa62fefa1d6d44b371215a upstream.
Commit 5b4258f6721f ("misc: rtsx: rts5249 support runtime PM") doesn't use pm_runtime_{get,put}() helpers when it should, so the RPM refcount keeps at zero, hence its parent driver, rtsx_pci, has to do lots of weird tricks to keep it from runtime suspending.
So use those helpers at right places to properly manage runtime PM.
--- drivers/mmc/host/rtsx_pci_sdmmc.c | 44 ++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 11 deletions(-)
drivers/mmc/host/rtsx_pci_sdmmc.c +33 -11
@@ -806,6 +806,7 @@ static void sd_request(struct work_strucstruct mmc_request *mrq = host->mrq;struct mmc_command *cmd = mrq->cmd;struct mmc_data *data = mrq->data; +struct device *dev = &host->pdev->dev;unsigned int data_size =0 ;int err;
@@ -822,6 +823,7 @@ static void sd_request(struct work_struc }mutex_lock (&pcr->pcr_mutex); +pm_runtime_get_sync (dev);rtsx_pci_start_run (pcr);
@@ -858,6 +860,8 @@ static void sd_request(struct work_struc data->bytes_xfered = data->blocks * data->blksz; } +pm_runtime_mark_last_busy (dev); +pm_runtime_put_autosuspend (dev);mutex_unlock (&pcr->pcr_mutex); finish:
@@ -1080,6 +1084,7 @@ static void sdmmc_set_ios(struct mmc_hos {struct realtek_pci_sdmmc *host =mmc_priv (mmc);struct rtsx_pcr *pcr = host->pcr; +struct device *dev = &host->pdev->dev;if (host->eject)return ;
@@ -1088,6 +1093,7 @@ static void sdmmc_set_ios(struct mmc_hosreturn ;mutex_lock (&pcr->pcr_mutex); +pm_runtime_get_sync (dev);rtsx_pci_start_run (pcr);
@@ -1121,6 +1127,8 @@ static void sdmmc_set_ios(struct mmc_hosrtsx_pci_switch_clock (pcr, ios->clock, host->ssc_depth, host->initial_mode, host->double_clk, host->vpclk); +pm_runtime_mark_last_busy (dev); +pm_runtime_put_autosuspend (dev);mutex_unlock (&pcr->pcr_mutex); }
@@ -1128,6 +1136,7 @@ static int sdmmc_get_ro(struct mmc_host {struct realtek_pci_sdmmc *host =mmc_priv (mmc);struct rtsx_pcr *pcr = host->pcr; +struct device *dev = &host->pdev->dev;int ro =0 ;u32 val;
@@ -1135,6 +1144,7 @@ static int sdmmc_get_ro(struct mmc_hostreturn -ENOMEDIUM ;mutex_lock (&pcr->pcr_mutex); +pm_runtime_get_sync (dev);rtsx_pci_start_run (pcr);
@@ -1144,6 +1154,8 @@ static int sdmmc_get_ro(struct mmc_hostif (val &SD_WRITE_PROTECT ) ro =1 ; +pm_runtime_mark_last_busy (dev); +pm_runtime_put_autosuspend (dev);mutex_unlock (&pcr->pcr_mutex);return ro;
@@ -1153,6 +1165,7 @@ static int sdmmc_get_cd(struct mmc_host {struct realtek_pci_sdmmc *host =mmc_priv (mmc);struct rtsx_pcr *pcr = host->pcr; +struct device *dev = &host->pdev->dev;int cd =0 ;u32 val;
@@ -1160,6 +1173,7 @@ static int sdmmc_get_cd(struct mmc_hostreturn cd;mutex_lock (&pcr->pcr_mutex); +pm_runtime_get_sync (dev);rtsx_pci_start_run (pcr);
@@ -1169,6 +1183,8 @@ static int sdmmc_get_cd(struct mmc_hostif (val &SD_EXIST ) cd =1 ; +pm_runtime_mark_last_busy (dev); +pm_runtime_put_autosuspend (dev);mutex_unlock (&pcr->pcr_mutex);return cd;
@@ -1251,6 +1267,7 @@ static int sdmmc_switch_voltage(struct m {struct realtek_pci_sdmmc *host =mmc_priv (mmc);struct rtsx_pcr *pcr = host->pcr; +struct device *dev = &host->pdev->dev;int err =0 ;u8 voltage;
@@ -1265,6 +1282,7 @@ static int sdmmc_switch_voltage(struct mreturn err;mutex_lock (&pcr->pcr_mutex); +pm_runtime_get_sync (dev);rtsx_pci_start_run (pcr);
@@ -1294,6 +1312,8 @@ out: err =rtsx_pci_write_register (pcr,SD_BUS_STAT ,SD_CLK_TOGGLE_EN |SD_CLK_FORCE_STOP ,0 ); +pm_runtime_mark_last_busy (dev); +pm_runtime_put_autosuspend (dev);mutex_unlock (&pcr->pcr_mutex);return err;
@@ -1303,6 +1323,7 @@ static int sdmmc_execute_tuning(struct m {struct realtek_pci_sdmmc *host =mmc_priv (mmc);struct rtsx_pcr *pcr = host->pcr; +struct device *dev = &host->pdev->dev;int err =0 ;if (host->eject)
@@ -1313,6 +1334,7 @@ static int sdmmc_execute_tuning(struct mreturn err;mutex_lock (&pcr->pcr_mutex); +pm_runtime_get_sync (dev);rtsx_pci_start_run (pcr);
@@ -1345,6 +1367,8 @@ static int sdmmc_execute_tuning(struct m err =sd_change_phase (host,DDR50_RX_PHASE (pcr), true); out: +pm_runtime_mark_last_busy (dev); +pm_runtime_put_autosuspend (dev);mutex_unlock (&pcr->pcr_mutex);return err;
@@ -1495,12 +1519,12 @@ static int rtsx_pci_sdmmc_drv_probe(strurealtek_init_host (host); -if (pcr->rtd3_en) { -pm_runtime_set_autosuspend_delay (&pdev->dev,5000 ); -pm_runtime_use_autosuspend (&pdev->dev); -pm_runtime_enable (&pdev->dev); - } - +pm_runtime_no_callbacks (&pdev->dev); +pm_runtime_set_active (&pdev->dev); +pm_runtime_enable (&pdev->dev); +pm_runtime_set_autosuspend_delay (&pdev->dev,200 ); +pm_runtime_mark_last_busy (&pdev->dev); +pm_runtime_use_autosuspend (&pdev->dev);mmc_add_host (mmc);
@@ -1521,11 +1545,6 @@ static int rtsx_pci_sdmmc_drv_remove(str pcr->slots[RTSX_SD_CARD ].card_event =NULL ; mmc = host->mmc; -if (pcr->rtd3_en) { -pm_runtime_dont_use_autosuspend (&pdev->dev); -pm_runtime_disable (&pdev->dev); - } -cancel_work_sync (&host->work);mutex_lock (&host->host_mutex);
@@ -1548,6 +1567,9 @@ static int rtsx_pci_sdmmc_drv_remove(strflush_work (&host->work); +pm_runtime_dont_use_autosuspend (&pdev->dev); +pm_runtime_disable (&pdev->dev); +mmc_free_host (mmc); dev_dbg(&(pdev->dev),
Greg Kroah-Hartman
maintainerPATCH 981/1017 dt-bindings: mtd: nand-controller: Fix the reg property description
In reply to Greg Kroah-HartmanFrom: Miquel Raynal <[email protected]>
commit 93f2ec9e401276fb4ea9903194a5bfcf175f9a2c upstream.
The reg property of a NAND device always references the chip-selects. The ready/busy lines are described in the nand-rb property. I believe this was a harmless copy/paste error during the conversion to yaml.
--- Documentation/devicetree/bindings/mtd/nand-controller.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/mtd/nand-controller.yaml +1 -1
@@ -55,7 +55,7 @@ patternProperties: properties: reg: description: - Contains the native Ready/Busy IDs. + Contains the chip-select IDs. nand-ecc-engine: allOf:
Greg Kroah-Hartman
maintainerPATCH 982/1017 dt-bindings: mtd: nand-controller: Fix a comment in the examples
In reply to Greg Kroah-HartmanFrom: Miquel Raynal <[email protected]>
commit 0e7f1b557974ce297e5e4c9d4245720fbb489886 upstream.
The controller properties should be in the controller 'parent' node, while properties in the children nodes are specific to the NAND *chip*. This error was already present during the yaml conversion.
--- Documentation/devicetree/bindings/mtd/nand-controller.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/mtd/nand-controller.yaml +1 -1
@@ -184,7 +184,7 @@ examples: nand-use-soft-ecc-engine; nand-ecc-algo = "bch"; - /* controller specific properties */ + /* NAND chip specific properties */ }; nand@1 {
Greg Kroah-Hartman
maintainerPATCH 983/1017 dt-bindings: spi: mxic: The interrupt property is not mandatory
In reply to Greg Kroah-HartmanFrom: Miquel Raynal <[email protected]>
commit 90c204d3195a795f77f5bce767e311dd1c59ca17 upstream.
The interrupt property is not mandatory at all, this property should not be part of the required properties list, so move it into the optional properties list.
--- Documentation/devicetree/bindings/spi/spi-mxic.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/spi/spi-mxic.txt +3 -1
@@ -8,11 +8,13 @@ Required properties: - reg: should contain 2 entries, one for the registers and one for the direct mapping area - reg-names: should contain "regs" and "dirmap" -- interrupts: interrupt line connected to the SPI controller - clock-names: should contain "ps_clk", "send_clk" and "send_dly_clk" - clocks: should contain 3 entries for the "ps_clk", "send_clk" and "send_dly_clk" clocks +Optional properties: +- interrupts: interrupt line connected to the SPI controller + Example: spi@43c30000 {
Greg Kroah-Hartman
maintainerPATCH 984/1017 media: dt-binding: media: hynix,hi846: use $defs/port-base port description
In reply to Greg Kroah-HartmanFrom: Martin Kepplinger <[email protected]>
commit 6492eba4fafb5a9715ecf78b7155e88f8f88909a upstream.
This fixes "make dt_binding_check":
Documentation/devicetree/bindings/media/i2c/hynix,hi846.example.dt.yaml:
camera@20: port:endpoint: Unevaluated properties are not allowed ('link-frequencies', 'data-lanes' were unexpected)
From schema: Documentation/devicetree/bindings/media/i2c/hynix,hi846.yaml
[Sakari Ailus: Reword commit message]
--- Documentation/devicetree/bindings/media/i2c/hynix,hi846.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/media/i2c/hynix,hi846.yaml +2 -1
@@ -49,7 +49,8 @@ properties: description: Definition of the regulator used for the VDDD power supply. port: - $ref: /schemas/graph.yaml#/properties/port + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false properties: endpoint:
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 985/1017 media: dt-bindings: media: hynix,hi846: add link-frequencies description
In reply to Greg Kroah-HartmanFrom: Martin Kepplinger <[email protected]>
commit a44b8e8c9b2615ea7cf2361cbca3c1dff8119c87 upstream.
link-frequencies is required but only mentioned in the example. Add it to the description.
--- Documentation/devicetree/bindings/media/i2c/hynix,hi846.yaml | 3 +++ 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/media/i2c/hynix,hi846.yaml +3 -0
@@ -69,8 +69,11 @@ properties: - const: 1 - const: 2 + link-frequencies: true + required: - data-lanes + - link-frequencies required: - compatible
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 986/1017 dt-bindings: memory: mtk-smi: Rename clock to clocks
In reply to Greg Kroah-HartmanFrom: Yong Wu <[email protected]>
commit 5bf7fa48374eafe29dbb30448a0b0c083853583f upstream.
The property "clock" should be rename to "clocks", and delete the "items", the minItems/maxItems should not be put under "items".
--- Documentation/devicetree/bindings/memory-controllers/mediatek,smi-common.yaml | 28 ++++------ Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml | 14 ++--- 2 files changed, 18 insertions(+), 24 deletions(-)
Documentation/devicetree/bindings/memory-controllers/mediatek,smi-common.yaml +12 -16
@@ -88,10 +88,9 @@ allOf: - mediatek,mt2701-smi-common then: properties: - clock: - items: - minItems: 3 - maxItems: 3 + clocks: + minItems: 3 + maxItems: 3 clock-names: items: - const: apb
@@ -108,10 +107,9 @@ allOf: required: - mediatek,smi properties: - clock: - items: - minItems: 3 - maxItems: 3 + clocks: + minItems: 3 + maxItems: 3 clock-names: items: - const: apb
@@ -133,10 +131,9 @@ allOf: then: properties: - clock: - items: - minItems: 4 - maxItems: 4 + clocks: + minItems: 4 + maxItems: 4 clock-names: items: - const: apb
@@ -146,10 +143,9 @@ allOf: else: # for gen2 HW that don't have gals properties: - clock: - items: - minItems: 2 - maxItems: 2 + clocks: + minItems: 2 + maxItems: 2 clock-names: items: - const: apb
Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml +6 -8
@@ -79,10 +79,9 @@ allOf: then: properties: - clock: - items: - minItems: 3 - maxItems: 3 + clocks: + minItems: 3 + maxItems: 3 clock-names: items: - const: apb
@@ -91,10 +90,9 @@ allOf: else: properties: - clock: - items: - minItems: 2 - maxItems: 2 + clocks: + minItems: 2 + maxItems: 2 clock-names: items: - const: apb
Greg Kroah-Hartman
maintainerPATCH 987/1017 dt-bindings: memory: mtk-smi: No need mediatek,larb-id for mt8167
In reply to Greg Kroah-HartmanFrom: Yong Wu <[email protected]>
commit ddc3a324889686ec9b358de20fdeec0d2668c7a8 upstream.
Mute the warning from "make dtbs_check":
larb@14016000: 'mediatek,larb-id' is a required property
arch/arm64/boot/dts/mediatek/mt8167-pumpkin.dt.yaml larb@15001000: 'mediatek,larb-id' is a required property arch/arm64/boot/dts/mediatek/mt8167-pumpkin.dt.yaml larb@16010000: 'mediatek,larb-id' is a required property arch/arm64/boot/dts/mediatek/mt8167-pumpkin.dt.yaml
As the description of mediatek,larb-id, the property is only required when the larbid is not consecutive from its IOMMU point of view.
Also, from the description of mediatek,larbs in Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml, all the larbs must sort by the larb index.
In mt8167, there is only one IOMMU HW and three larbs. The drivers already know its larb index from the mediatek,larbs property of IOMMU, thus no need this property.
--- Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml | 1 - 1 file changed, 1 deletion(-)
Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml +0 -1
@@ -106,7 +106,6 @@ allOf: - mediatek,mt2701-smi-larb - mediatek,mt2712-smi-larb - mediatek,mt6779-smi-larb - - mediatek,mt8167-smi-larb - mediatek,mt8192-smi-larb - mediatek,mt8195-smi-larb
Greg Kroah-Hartman
maintainerPATCH 988/1017 dt-bindings: memory: mtk-smi: Correct minItems to 2 for the gals clocks
In reply to Greg Kroah-HartmanFrom: Yong Wu <[email protected]>
commit 996ebc0e332bfb3091395f9bd286d8349a57be62 upstream.
Mute the warning from "make dtbs_check":
larb@14017000: clock-names: ['apb', 'smi'] is too short
arch/arm64/boot/dts/mediatek/mt8183-evb.dt.yaml arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dt.yaml ...
larb@16010000: clock-names: ['apb', 'smi'] is too short
arch/arm64/boot/dts/mediatek/mt8183-evb.dt.yaml arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dt.yaml
larb@17010000: clock-names: ['apb', 'smi'] is too short
arch/arm64/boot/dts/mediatek/mt8183-evb.dt.yaml arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-burnet.dt.yaml
If a platform's larb supports gals, there will be some larbs have one more "gals" clock while the others still only need "apb"/"smi" clocks, then the minItems for clocks and clock-names are 2.
--- Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml +2 -1
@@ -80,9 +80,10 @@ allOf: then: properties: clocks: - minItems: 3 + minItems: 2 maxItems: 3 clock-names: + minItems: 2 items: - const: apb - const: smi
Greg Kroah-Hartman
maintainerPATCH 989/1017 dt-bindings: pinctrl: pinctrl-microchip-sgpio: Fix example
In reply to Greg Kroah-HartmanFrom: Horatiu Vultur <[email protected]>
commit a6ff90f3fbd4d902aad8777f0329cef3a2768bde upstream.
The blamed commit adds support for irq, but the reqisters for irq are outside of the memory size. They are at address 0x108. Therefore update the memory size to cover all the registers used by the device.
--- Documentation/devicetree/bindings/pinctrl/microchip,sparx5-sgpio.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/pinctrl/microchip,sparx5-sgpio.yaml +1 -1
@@ -145,7 +145,7 @@ examples: clocks = <&sys_clk>; pinctrl-0 = <&sgpio2_pins>; pinctrl-names = "default"; - reg = <0x1101059c 0x100>; + reg = <0x1101059c 0x118>; microchip,sgpio-port-ranges = <0 0>, <16 18>, <28 31>; bus-frequency = <25000000>; sgpio_in2: gpio@0 {
Greg Kroah-Hartman
maintainerPATCH 990/1017 ubi: fastmap: Return error code if memory allocation fails in add_aeb()
In reply to Greg Kroah-HartmanFrom: Zhihao Cheng <[email protected]>
commit c3c07fc25f37c157fde041b3a0c3dfcb1590cbce upstream.
Abort fastmap scanning and return error code if memory allocation fails in add_aeb(). Otherwise ubi will get wrong peb statistics information after scanning.
--- drivers/mtd/ubi/fastmap.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-)
drivers/mtd/ubi/fastmap.c +19 -9
@@ -468,7 +468,9 @@ static int scan_pool(struct ubi_device *if (err ==UBI_IO_FF_BITFLIPS ) scrub =1 ; -add_aeb (ai, free, pnum, ec, scrub); + ret =add_aeb (ai, free, pnum, ec, scrub); +if (ret) + goto out;continue ; }else if (err ==0 || err ==UBI_IO_BITFLIPS ) {dbg_bld ("Found non empty PEB:%i in pool" , pnum);
@@ -638,8 +640,10 @@ static int ubi_attach_fastmap(struct ubiif (fm_pos >= fm_size) goto fail_bad; -add_aeb (ai, &ai->free,be32_to_cpu (fmec->pnum), -be32_to_cpu (fmec->ec),0 ); + ret =add_aeb (ai, &ai->free,be32_to_cpu (fmec->pnum), +be32_to_cpu (fmec->ec),0 ); +if (ret) + goto fail; }/* read EC values from used list */
@@ -649,8 +653,10 @@ static int ubi_attach_fastmap(struct ubiif (fm_pos >= fm_size) goto fail_bad; -add_aeb (ai, &used,be32_to_cpu (fmec->pnum), -be32_to_cpu (fmec->ec),0 ); + ret =add_aeb (ai, &used,be32_to_cpu (fmec->pnum), +be32_to_cpu (fmec->ec),0 ); +if (ret) + goto fail; }/* read EC values from scrub list */
@@ -660,8 +666,10 @@ static int ubi_attach_fastmap(struct ubiif (fm_pos >= fm_size) goto fail_bad; -add_aeb (ai, &used,be32_to_cpu (fmec->pnum), -be32_to_cpu (fmec->ec),1 ); + ret =add_aeb (ai, &used,be32_to_cpu (fmec->pnum), +be32_to_cpu (fmec->ec),1 ); +if (ret) + goto fail; }/* read EC values from erase list */
@@ -671,8 +679,10 @@ static int ubi_attach_fastmap(struct ubiif (fm_pos >= fm_size) goto fail_bad; -add_aeb (ai, &ai->erase,be32_to_cpu (fmec->pnum), -be32_to_cpu (fmec->ec),1 ); + ret =add_aeb (ai, &ai->erase,be32_to_cpu (fmec->pnum), +be32_to_cpu (fmec->ec),1 ); +if (ret) + goto fail; } ai->mean_ec =div_u64 (ai->ec_sum, ai->ec_count);
Greg Kroah-Hartman
maintainerPATCH 991/1017 ASoC: SOF: Intel: Fix build error without SND_SOC_SOF_PCI_DEV
In reply to Greg Kroah-HartmanFrom: Zheng Bin <[email protected]>
commit 664d66dc0a64b32e60a5ad59a9aebb08676a612b upstream.
If SND_SOC_SOF_PCI_DEV is n, bulding fails:
sound/soc/sof/intel/pci-tng.o:(.data+0x1c0): undefined reference to sof_pci_probe' sound/soc/sof/intel/pci-tng.o:(.data+0x1c8): undefined reference to sof_pci_remove' sound/soc/sof/intel/pci-tng.o:(.data+0x1e0): undefined reference to sof_pci_shutdown' sound/soc/sof/intel/pci-tng.o:(.data+0x290): undefined reference to sof_pci_pm'
Make SND_SOC_SOF_MERRIFIELD select SND_SOC_SOF_PCI_DEV to fix this.
--- sound/soc/sof/intel/Kconfig | 1 + 1 file changed, 1 insertion(+)
sound/soc/sof/intel/Kconfig +1 -0
@@ -84,6 +84,7 @@ if SND_SOC_SOF_PCI config SND_SOC_SOF_MERRIFIELD tristate "SOF support for Tangier/Merrifield" default SND_SOC_SOF_PCI + select SND_SOC_SOF_PCI_DEV select SND_SOC_SOF_INTEL_ATOM_HIFI_EP help This adds support for Sound Open Firmware for Intel(R) platforms
Greg Kroah-Hartman
maintainerPATCH 992/1017 ASoC: topology: Allow TLV control to be either read or write
In reply to Greg Kroah-HartmanFrom: Amadeusz Sławiński <[email protected]>
commit feb00b736af64875560f371fe7f58b0b7f239046 upstream.
There is no reason to force readwrite access on TLV controls. It can be either read, write or both. This is further evidenced in code where it performs following checks:
if ((k->access & SNDRV_CTL_ELEM_ACCESS_TLV_READ) && !sbe->get)
return -EINVAL;
if ((k->access & SNDRV_CTL_ELEM_ACCESS_TLV_WRITE) && !sbe->put)
return -EINVAL;--- sound/soc/soc-topology.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/soc-topology.c +2 -1
@@ -512,7 +512,8 @@ static int soc_tplg_kcontrol_bind_io(strif (le32_to_cpu (hdr->ops.info) ==SND_SOC_TPLG_CTL_BYTES && k->iface &SNDRV_CTL_ELEM_IFACE_MIXER - && k->access &SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE + && (k->access &SNDRV_CTL_ELEM_ACCESS_TLV_READ + || k->access &SNDRV_CTL_ELEM_ACCESS_TLV_WRITE ) && k->access &SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK ) {struct soc_bytes_ext *sbe;struct snd_soc_tplg_bytes_control *be;
Greg Kroah-Hartman
maintainerPATCH 993/1017 perf vendor events: Update metrics for SkyLake Server
In reply to Greg Kroah-HartmanFrom: Ian Rogers <[email protected]>
commit 3bad20d7d129c3b3063658a0f83974dfe6dac5c4 upstream.
Based on TMA_metrics-full.csv version 4.3 at 01.org:
https://download.01.org/perfmon/ Events are updated to version 1.26: https://download.01.org/perfmon/SKX
Json files generated by:
https://github.com/intel/event-converter-for-linux-perf
Fixes were made that allow the skx-metrics.json to successfully generate, bringing back TopdownL1 metrics.
Tested:
$ perf test
...
6: Parse event definition strings : Ok
7: Simple expression parser : Ok
...
9: Parse perf pmu format : Ok
10: PMU events :
10.1: PMU event table sanity : Ok
10.2: PMU event map aliases : Ok
10.3: Parsing of PMU event table metrics : Ok
10.4: Parsing of PMU event table metrics with fake PMUs : Ok
...
68: Parse and process metrics : Ok
...
88: perf stat metrics (shadow stat) test : Ok
89: perf all metricgroups test : Ok
90: perf all metrics test : Skip
91: perf all PMU test : Ok
...90 skips due to a lack of floating point samples, which is understandable.
--- tools/perf/pmu-events/arch/x86/skylakex/cache.json | 111 +- tools/perf/pmu-events/arch/x86/skylakex/floating-point.json | 24 tools/perf/pmu-events/arch/x86/skylakex/frontend.json | 18 tools/perf/pmu-events/arch/x86/skylakex/memory.json | 96 +- tools/perf/pmu-events/arch/x86/skylakex/pipeline.json | 11 tools/perf/pmu-events/arch/x86/skylakex/skx-metrics.json | 461 ++++++++++-- tools/perf/pmu-events/arch/x86/skylakex/uncore-other.json | 23 7 files changed, 591 insertions(+), 153 deletions(-)
tools/perf/pmu-events/arch/x86/skylakex/cache.json +63 -48
@@ -315,6 +315,19 @@ "UMask": "0x82" }, { + "BriefDescription": "All retired memory instructions.", + "Counter": "0,1,2,3", + "CounterHTOff": "0,1,2,3", + "Data_LA": "1", + "EventCode": "0xD0", + "EventName": "MEM_INST_RETIRED.ANY", + "L1_Hit_Indication": "1", + "PEBS": "1", + "PublicDescription": "Counts all retired memory instructions - loads and stores.", + "SampleAfterValue": "2000003", + "UMask": "0x83" + }, + { "BriefDescription": "Retired load instructions with locked access.", "Counter": "0,1,2,3", "CounterHTOff": "0,1,2,3",
@@ -358,6 +371,7 @@ "EventCode": "0xD0", "EventName": "MEM_INST_RETIRED.STLB_MISS_LOADS", "PEBS": "1", + "PublicDescription": "Number of retired load instructions that (start a) miss in the 2nd-level TLB (STLB).", "SampleAfterValue": "100003", "UMask": "0x11" },
@@ -370,6 +384,7 @@ "EventName": "MEM_INST_RETIRED.STLB_MISS_STORES", "L1_Hit_Indication": "1", "PEBS": "1", + "PublicDescription": "Number of retired store instructions that (start a) miss in the 2nd-level TLB (STLB).", "SampleAfterValue": "100003", "UMask": "0x12" },
@@ -733,7 +748,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.ANY_RESPONSE", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x0000010491", + "MSRValue": "0x10491", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -772,7 +787,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_HIT.HIT_OTHER_CORE_NO_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x04003C0491", + "MSRValue": "0x4003C0491", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -785,7 +800,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_HIT.NO_SNOOP_NEEDED", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x01003C0491", + "MSRValue": "0x1003C0491", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -798,7 +813,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.ALL_DATA_RD.L3_HIT.SNOOP_HIT_WITH_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x08003C0491", + "MSRValue": "0x8003C0491", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -811,7 +826,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.ANY_RESPONSE", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x0000010490", + "MSRValue": "0x10490", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -850,7 +865,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_HIT.HIT_OTHER_CORE_NO_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x04003C0490", + "MSRValue": "0x4003C0490", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -863,7 +878,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_HIT.NO_SNOOP_NEEDED", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x01003C0490", + "MSRValue": "0x1003C0490", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -876,7 +891,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.ALL_PF_DATA_RD.L3_HIT.SNOOP_HIT_WITH_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x08003C0490", + "MSRValue": "0x8003C0490", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -889,7 +904,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.ANY_RESPONSE", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x0000010120", + "MSRValue": "0x10120", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -928,7 +943,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_HIT.HIT_OTHER_CORE_NO_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x04003C0120", + "MSRValue": "0x4003C0120", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -941,7 +956,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_HIT.NO_SNOOP_NEEDED", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x01003C0120", + "MSRValue": "0x1003C0120", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -954,7 +969,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.ALL_PF_RFO.L3_HIT.SNOOP_HIT_WITH_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x08003C0120", + "MSRValue": "0x8003C0120", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -967,7 +982,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.ALL_RFO.ANY_RESPONSE", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x0000010122", + "MSRValue": "0x10122", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1006,7 +1021,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_HIT.HIT_OTHER_CORE_NO_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x04003C0122", + "MSRValue": "0x4003C0122", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1019,7 +1034,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_HIT.NO_SNOOP_NEEDED", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x01003C0122", + "MSRValue": "0x1003C0122", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1032,7 +1047,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.ALL_RFO.L3_HIT.SNOOP_HIT_WITH_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x08003C0122", + "MSRValue": "0x8003C0122", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1045,7 +1060,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.ANY_RESPONSE", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x0000010004", + "MSRValue": "0x10004", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1084,7 +1099,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.HIT_OTHER_CORE_NO_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x04003C0004", + "MSRValue": "0x4003C0004", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1097,7 +1112,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.NO_SNOOP_NEEDED", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x01003C0004", + "MSRValue": "0x1003C0004", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1110,7 +1125,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_HIT_WITH_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x08003C0004", + "MSRValue": "0x8003C0004", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1123,7 +1138,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.ANY_RESPONSE", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x0000010001", + "MSRValue": "0x10001", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1162,7 +1177,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.HIT_OTHER_CORE_NO_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x04003C0001", + "MSRValue": "0x4003C0001", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1175,7 +1190,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.NO_SNOOP_NEEDED", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x01003C0001", + "MSRValue": "0x1003C0001", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1188,7 +1203,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.SNOOP_HIT_WITH_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x08003C0001", + "MSRValue": "0x8003C0001", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1201,7 +1216,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.ANY_RESPONSE", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x0000010002", + "MSRValue": "0x10002", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1240,7 +1255,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.HIT_OTHER_CORE_NO_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x04003C0002", + "MSRValue": "0x4003C0002", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1253,7 +1268,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.NO_SNOOP_NEEDED", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x01003C0002", + "MSRValue": "0x1003C0002", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1266,7 +1281,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_HIT_WITH_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x08003C0002", + "MSRValue": "0x8003C0002", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1279,7 +1294,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.ANY_RESPONSE", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x0000010400", + "MSRValue": "0x10400", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1318,7 +1333,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_HIT.HIT_OTHER_CORE_NO_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x04003C0400", + "MSRValue": "0x4003C0400", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1331,7 +1346,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_HIT.NO_SNOOP_NEEDED", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x01003C0400", + "MSRValue": "0x1003C0400", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1344,7 +1359,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L1D_AND_SW.L3_HIT.SNOOP_HIT_WITH_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x08003C0400", + "MSRValue": "0x8003C0400", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1357,7 +1372,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.ANY_RESPONSE", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x0000010010", + "MSRValue": "0x10010", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1396,7 +1411,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_HIT.HIT_OTHER_CORE_NO_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x04003C0010", + "MSRValue": "0x4003C0010", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1409,7 +1424,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_HIT.NO_SNOOP_NEEDED", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x01003C0010", + "MSRValue": "0x1003C0010", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1422,7 +1437,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L2_DATA_RD.L3_HIT.SNOOP_HIT_WITH_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x08003C0010", + "MSRValue": "0x8003C0010", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1435,7 +1450,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.ANY_RESPONSE", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x0000010020", + "MSRValue": "0x10020", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1474,7 +1489,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_HIT.HIT_OTHER_CORE_NO_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x04003C0020", + "MSRValue": "0x4003C0020", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1487,7 +1502,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_HIT.NO_SNOOP_NEEDED", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x01003C0020", + "MSRValue": "0x1003C0020", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1500,7 +1515,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L2_RFO.L3_HIT.SNOOP_HIT_WITH_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x08003C0020", + "MSRValue": "0x8003C0020", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1513,7 +1528,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.ANY_RESPONSE", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x0000010080", + "MSRValue": "0x10080", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1552,7 +1567,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.HIT_OTHER_CORE_NO_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x04003C0080", + "MSRValue": "0x4003C0080", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1565,7 +1580,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.NO_SNOOP_NEEDED", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x01003C0080", + "MSRValue": "0x1003C0080", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1578,7 +1593,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L3_DATA_RD.L3_HIT.SNOOP_HIT_WITH_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x08003C0080", + "MSRValue": "0x8003C0080", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1591,7 +1606,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.ANY_RESPONSE", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x0000010100", + "MSRValue": "0x10100", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1630,7 +1645,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.HIT_OTHER_CORE_NO_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x04003C0100", + "MSRValue": "0x4003C0100", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1643,7 +1658,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.NO_SNOOP_NEEDED", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x01003C0100", + "MSRValue": "0x1003C0100", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
@@ -1656,7 +1671,7 @@ "EventCode": "0xB7, 0xBB", "EventName": "OFFCORE_RESPONSE.PF_L3_RFO.L3_HIT.SNOOP_HIT_WITH_FWD", "MSRIndex": "0x1a6,0x1a7", - "MSRValue": "0x08003C0100", + "MSRValue": "0x8003C0100", "Offcore": "1", "PublicDescription": "Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", "SampleAfterValue": "100003",
tools/perf/pmu-events/arch/x86/skylakex/floating-point.json +16 -8
@@ -1,73 +1,81 @@ [ { - "BriefDescription": "Number of SSE/AVX computational 128-bit packed double precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 2 computation operations, one for each element. Applies to SSE* and AVX* packed double precision floating-point instructions: ADD SUB HADD HSUB SUBADD MUL DIV MIN MAX SQRT RSQRT14 RCP14 DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element.", + "BriefDescription": "Counts once for most SIMD 128-bit packed computational double precision floating-point instructions retired. Counts twice for DPP and FM(N)ADD/SUB instructions retired.", "Counter": "0,1,2,3", "CounterHTOff": "0,1,2,3,4,5,6,7", "EventCode": "0xC7", "EventName": "FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE", + "PublicDescription": "Counts once for most SIMD 128-bit packed computational double precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 2 computation operations, one for each element. Applies to packed double precision floating-point instructions: ADD SUB HADD HSUB SUBADD MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element. The DAZ and FTZ flags in the MXCSR register need to be set when using these events.", "SampleAfterValue": "2000003", "UMask": "0x4" }, { - "BriefDescription": "Number of SSE/AVX computational 128-bit packed single precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 4 computation operations, one for each element. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP14 RSQRT14 SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element.", + "BriefDescription": "Counts once for most SIMD 128-bit packed computational single precision floating-point instruction retired. Counts twice for DPP and FM(N)ADD/SUB instructions retired.", "Counter": "0,1,2,3", "CounterHTOff": "0,1,2,3,4,5,6,7", "EventCode": "0xC7", "EventName": "FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE", + "PublicDescription": "Counts once for most SIMD 128-bit packed computational single precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 4 computation operations, one for each element. Applies to packed single precision floating-point instructions: ADD SUB HADD HSUB SUBADD MUL DIV MIN MAX SQRT RSQRT RCP DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element. The DAZ and FTZ flags in the MXCSR register need to be set when using these events.", "SampleAfterValue": "2000003", "UMask": "0x8" }, { - "BriefDescription": "Number of SSE/AVX computational 256-bit packed double precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 4 computation operations, one for each element. Applies to SSE* and AVX* packed double precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP14 RSQRT14 SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element.", + "BriefDescription": "Counts once for most SIMD 256-bit packed double computational precision floating-point instructions retired. Counts twice for DPP and FM(N)ADD/SUB instructions retired.", "Counter": "0,1,2,3", "CounterHTOff": "0,1,2,3,4,5,6,7", "EventCode": "0xC7", "EventName": "FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE", + "PublicDescription": "Counts once for most SIMD 256-bit packed double computational precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 4 computation operations, one for each element. Applies to packed double precision floating-point instructions: ADD SUB HADD HSUB SUBADD MUL DIV MIN MAX SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element. The DAZ and FTZ flags in the MXCSR register need to be set when using these events.", "SampleAfterValue": "2000003", "UMask": "0x10" }, { - "BriefDescription": "Number of SSE/AVX computational 256-bit packed single precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 8 computation operations, one for each element. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP14 RSQRT14 SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element.", + "BriefDescription": "Counts once for most SIMD 256-bit packed single computational precision floating-point instructions retired. Counts twice for DPP and FM(N)ADD/SUB instructions retired.", "Counter": "0,1,2,3", "CounterHTOff": "0,1,2,3,4,5,6,7", "EventCode": "0xC7", "EventName": "FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE", + "PublicDescription": "Counts once for most SIMD 256-bit packed single computational precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 8 computation operations, one for each element. Applies to packed single precision floating-point instructions: ADD SUB HADD HSUB SUBADD MUL DIV MIN MAX SQRT RSQRT RCP DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element. The DAZ and FTZ flags in the MXCSR register need to be set when using these events.", "SampleAfterValue": "2000003", "UMask": "0x20" }, { - "BriefDescription": "Number of SSE/AVX computational 512-bit packed double precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 8 computation operations, one for each element. Applies to SSE* and AVX* packed double precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP14 RSQRT14 SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform 8 calculations per element.", + "BriefDescription": "Counts number of SSE/AVX computational 512-bit packed double precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 8 computation operations, one for each element. Applies to SSE* and AVX* packed double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT RSQRT14 RCP14 FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element.", "Counter": "0,1,2,3", "CounterHTOff": "0,1,2,3,4,5,6,7", "EventCode": "0xC7", "EventName": "FP_ARITH_INST_RETIRED.512B_PACKED_DOUBLE", + "PublicDescription": "Number of SSE/AVX computational 512-bit packed double precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 8 computation operations, one for each element. Applies to SSE* and AVX* packed double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT RSQRT14 RCP14 FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element. The DAZ and FTZ flags in the MXCSR register need to be set when using these events.", "SampleAfterValue": "2000003", "UMask": "0x40" }, { - "BriefDescription": "Number of SSE/AVX computational 512-bit packed single precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 16 computation operations, one for each element. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP14 RSQRT14 SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform 16 calculations per element.", + "BriefDescription": "Counts number of SSE/AVX computational 512-bit packed single precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 16 computation operations, one for each element. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT RSQRT14 RCP14 FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element.", "Counter": "0,1,2,3", "CounterHTOff": "0,1,2,3,4,5,6,7", "EventCode": "0xC7", "EventName": "FP_ARITH_INST_RETIRED.512B_PACKED_SINGLE", + "PublicDescription": "Number of SSE/AVX computational 512-bit packed single precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 16 computation operations, one for each element. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT RSQRT14 RCP14 FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element. The DAZ and FTZ flags in the MXCSR register need to be set when using these events.", "SampleAfterValue": "2000003", "UMask": "0x80" }, { - "BriefDescription": "Number of SSE/AVX computational scalar double precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 1 computation. Applies to SSE* and AVX* scalar double precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP14 RSQRT14 SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element.", + "BriefDescription": "Counts once for most SIMD scalar computational double precision floating-point instructions retired. Counts twice for DPP and FM(N)ADD/SUB instructions retired.", "Counter": "0,1,2,3", "CounterHTOff": "0,1,2,3,4,5,6,7", "EventCode": "0xC7", "EventName": "FP_ARITH_INST_RETIRED.SCALAR_DOUBLE", + "PublicDescription": "Counts once for most SIMD scalar computational double precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 1 computational operation. Applies to SIMD scalar double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element. The DAZ and FTZ flags in the MXCSR register need to be set when using these events.", "SampleAfterValue": "2000003", "UMask": "0x1" }, { - "BriefDescription": "Number of SSE/AVX computational scalar single precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 1 computation. Applies to SSE* and AVX* scalar single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP14 RSQRT14 SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element.", + "BriefDescription": "Counts once for most SIMD scalar computational single precision floating-point instructions retired. Counts twice for DPP and FM(N)ADD/SUB instructions retired.", "Counter": "0,1,2,3", "CounterHTOff": "0,1,2,3,4,5,6,7", "EventCode": "0xC7", "EventName": "FP_ARITH_INST_RETIRED.SCALAR_SINGLE", + "PublicDescription": "Counts once for most SIMD scalar computational single precision floating-point instructions retired; some instructions will count twice as noted below. Each count represents 1 computational operation. Applies to SIMD scalar single precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT RSQRT RCP FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform 2 calculations per element. The DAZ and FTZ flags in the MXCSR register need to be set when using these events.", "SampleAfterValue": "2000003", "UMask": "0x2" },
tools/perf/pmu-events/arch/x86/skylakex/frontend.json +16 -2
@@ -30,7 +30,21 @@ "UMask": "0x2" }, { - "BriefDescription": "Retired Instructions who experienced decode stream buffer (DSB - the decoded instruction-cache) miss.", + "BriefDescription": "Retired Instructions who experienced DSB miss.", + "Counter": "0,1,2,3", + "CounterHTOff": "0,1,2,3", + "EventCode": "0xC6", + "EventName": "FRONTEND_RETIRED.ANY_DSB_MISS", + "MSRIndex": "0x3F7", + "MSRValue": "0x1", + "PEBS": "1", + "PublicDescription": "Counts retired Instructions that experienced DSB (Decode stream buffer i.e. the decoded instruction-cache) miss.", + "SampleAfterValue": "100007", + "TakenAlone": "1", + "UMask": "0x1" + }, + { + "BriefDescription": "Retired Instructions who experienced a critical DSB miss.", "Counter": "0,1,2,3", "CounterHTOff": "0,1,2,3", "EventCode": "0xC6",
@@ -38,7 +52,7 @@ "MSRIndex": "0x3F7", "MSRValue": "0x11", "PEBS": "1", - "PublicDescription": "Counts retired Instructions that experienced DSB (Decode stream buffer i.e. the decoded instruction-cache) miss.", + "PublicDescription": "Number of retired Instructions that experienced a critical DSB (Decode stream buffer i.e. the decoded instruction-cache) miss. Critical means stalls were exposed to the back-end as a result of the DSB miss.", "SampleAfterValue": "100007", "TakenAlone": "1", "UMask": "0x1"
tools/perf/pmu-events/arch/x86/skylakex/memory.json +48 -48
384 lines not on this page · raw message
tools/perf/pmu-events/arch/x86/skylakex/pipeline.json +11 -0
@@ -436,6 +436,17 @@ "SampleAfterValue": "2000003" }, { + "BriefDescription": "Number of all retired NOP instructions.", + "Counter": "0,1,2,3", + "CounterHTOff": "0,1,2,3,4,5,6,7", + "Errata": "SKL091, SKL044", + "EventCode": "0xC0", + "EventName": "INST_RETIRED.NOP", + "PEBS": "1", + "SampleAfterValue": "2000003", + "UMask": "0x2" + }, + { "BriefDescription": "Precise instruction retired event with HW to reduce effect of PEBS shadow in IP distribution", "Counter": "1", "CounterHTOff": "1",
tools/perf/pmu-events/arch/x86/skylakex/skx-metrics.json +414 -47
647 lines not on this page · raw message
tools/perf/pmu-events/arch/x86/skylakex/uncore-other.json +23 -0
@@ -538,6 +538,18 @@ "Unit": "IIO" }, { + "BriefDescription": "PCIe Completion Buffer Inserts of completions with data: Part 0-3", + "Counter": "0,1,2,3", + "EventCode": "0xC2", + "EventName": "UNC_IIO_COMP_BUF_INSERTS.CMPD.ALL_PARTS", + "FCMask": "0x4", + "PerPkg": "1", + "PortMask": "0x0f", + "PublicDescription": "PCIe Completion Buffer Inserts of completions with data: Part 0-3", + "UMask": "0x03", + "Unit": "IIO" + }, + { "BriefDescription": "PCIe Completion Buffer Inserts of completions with data: Part 0", "Counter": "0,1,2,3", "EventCode": "0xC2",
@@ -586,6 +598,17 @@ "Unit": "IIO" }, { + "BriefDescription": "PCIe Completion Buffer occupancy of completions with data: Part 0-3", + "Counter": "2,3", + "EventCode": "0xD5", + "EventName": "UNC_IIO_COMP_BUF_OCCUPANCY.CMPD.ALL_PARTS", + "FCMask": "0x04", + "PerPkg": "1", + "PublicDescription": "PCIe Completion Buffer occupancy of completions with data: Part 0-3", + "UMask": "0x0f", + "Unit": "IIO" + }, + { "BriefDescription": "PCIe Completion Buffer occupancy of completions with data: Part 0", "Counter": "2,3", "EventCode": "0xD5",
Greg Kroah-Hartman
maintainerPATCH 994/1017 media: ov6650: Add try support to selection API operations
In reply to Greg Kroah-HartmanFrom: Janusz Krzysztofik <[email protected]>
commit c74052646496ffe0bc606152e6b9653137020cbf upstream.
Try requests are now only supported by format processing pad operations implemented by the driver. The driver selection API operations currently respond to them with -EINVAL. While that is correct, it constraints video device drivers to not use subdevice cropping at all while processing user requested active frame size, otherwise their set try format results might differ from active. As a consequence, we can't fix set format pad operation as not to touch crop rectangle since that would affect users not being able to set arbitrary frame sizes. Moreover, without a working set try selection support we are not able to use pad config crop rectangle as a reference while processing set try format requests.
Implement missing try selection support. Moreover, as it will be now possible to maintain the pad config crop rectangle via selection API, start using it instead of the active one as a reference while processing set try format requests.
is_unscaled_ok() helper, now also called from set selection operation, has been just moved up in the source file to avoid a prototype, with no functional changes.
[Sakari Ailus: Rebase on subdev state patches]
--- drivers/media/i2c/ov6650.c | 54 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 11 deletions(-)
drivers/media/i2c/ov6650.c +43 -11
@@ -472,9 +472,16 @@ static int ov6650_get_selection(struct v {struct i2c_client *client =v4l2_get_subdevdata (sd);struct ov6650 *priv =to_ov6650 (client); +struct v4l2_rect *rect; -if (sel->which !=V4L2_SUBDEV_FORMAT_ACTIVE ) -return -EINVAL ; +if (sel->which ==V4L2_SUBDEV_FORMAT_TRY ) { +/* pre-select try crop rectangle */ + rect = &sd_state->pads->try_crop; + + }else { +/* pre-select active crop rectangle */ + rect = &priv->rect; + }switch (sel->target) {case V4L2_SEL_TGT_CROP_BOUNDS :
@@ -483,14 +490,22 @@ static int ov6650_get_selection(struct v sel->r.width =W_CIF ; sel->r.height =H_CIF ;return 0 ; +case V4L2_SEL_TGT_CROP : - sel->r = priv->rect; +/* use selected crop rectangle */ + sel->r = *rect;return 0 ; +default :return -EINVAL ; } } +static bool is_unscaled_ok (int width,int height,struct v4l2_rect *rect) +{ +return width > rect->width >>1 || height > rect->height >>1 ; +} +static void ov6650_bind_align_crop_rectangle (struct v4l2_rect *rect) { v4l_bound_align_image(&rect->width, 2, W_CIF, 1,
@@ -510,12 +525,30 @@ static int ov6650_set_selection(struct vstruct ov6650 *priv =to_ov6650 (client);int ret; -if (sel->which !=V4L2_SUBDEV_FORMAT_ACTIVE || - sel->target !=V4L2_SEL_TGT_CROP ) +if (sel->target !=V4L2_SEL_TGT_CROP )return -EINVAL ;ov6650_bind_align_crop_rectangle (&sel->r); +if (sel->which ==V4L2_SUBDEV_FORMAT_TRY ) { +struct v4l2_rect *crop = &sd_state->pads->try_crop; +struct v4l2_mbus_framefmt *mf = &sd_state->pads->try_fmt; +/* detect current pad config scaling factor */ +bool half_scale = !is_unscaled_ok (mf->width, mf->height, crop); + +/* store new crop rectangle */ + *crop = sel->r; + +/* adjust frame size */ + mf->width = crop->width >> half_scale; + mf->height = crop->height >> half_scale; + +return 0 ; + } + +/* V4L2_SUBDEV_FORMAT_ACTIVE */ + +/* apply new crop rectangle */ ret =ov6650_reg_write (client,REG_HSTRT , sel->r.left >>1 );if (!ret) { priv->rect.width += priv->rect.left - sel->r.left;
@@ -567,11 +600,6 @@ static int ov6650_get_fmt(struct v4l2_sureturn 0 ; } -static bool is_unscaled_ok (int width,int height,struct v4l2_rect *rect) -{ -return width > rect->width >>1 || height > rect->height >>1 ; -} -#define to_clkrc (div) ((div) - 1)/* set the format we will capture in */
@@ -692,7 +720,11 @@ static int ov6650_set_fmt(struct v4l2_subreak ; } - *crop = priv->rect; +if (format->which ==V4L2_SUBDEV_FORMAT_TRY ) + *crop = sd_state->pads->try_crop; +else + *crop = priv->rect; + half_scale = !is_unscaled_ok (mf->width, mf->height, crop);/* adjust new crop rectangle position against its current center */
Greg Kroah-Hartman
maintainerPATCH 995/1017 media: ov6650: Fix crop rectangle affected by set format
In reply to Greg Kroah-HartmanFrom: Janusz Krzysztofik <[email protected]>
commit 985d2d7a482e9b64ef9643702b066da9cbd6ae8e upstream.
According to subdevice interface specification found in V4L2 API documentation, set format pad operations should not affect image geometry set in preceding image processing steps. Unfortunately, that requirement is not respected by the driver implementation of set format as it was not the case when that code was still implementing a pair of now obsolete .s_mbus_fmt() / .try_mbus_fmt() video operations before they have been merged and reused as an implementation of .set_fmt() pad operation by commit 717fd5b4907a ("[media] v4l2: replace try_mbus_fmt by set_fmt").
Exclude non-compliant crop rectangle adjustments from set format try, as well as a call to .set_selection() from set format active processing path, so only frame scaling is applied as needed and crop rectangle is no longer modified.
[Sakari Ailus: Rebase on subdev state patches]
--- drivers/media/i2c/ov6650.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-)
drivers/media/i2c/ov6650.c +4 -24
@@ -693,11 +693,7 @@ static int ov6650_set_fmt(struct v4l2_sustruct v4l2_mbus_framefmt *mf = &format->format;struct i2c_client *client =v4l2_get_subdevdata (sd);struct ov6650 *priv =to_ov6650 (client); -struct v4l2_subdev_selection sel = { - .which =V4L2_SUBDEV_FORMAT_ACTIVE , - .target =V4L2_SEL_TGT_CROP , - }; -struct v4l2_rect *crop = &sel.r; +struct v4l2_rect *crop;bool half_scale;if (format->pad)
@@ -721,24 +717,13 @@ static int ov6650_set_fmt(struct v4l2_su }if (format->which ==V4L2_SUBDEV_FORMAT_TRY ) - *crop = sd_state->pads->try_crop; + crop = &sd_state->pads->try_crop;else - *crop = priv->rect; + crop = &priv->rect; half_scale = !is_unscaled_ok (mf->width, mf->height, crop); -/* adjust new crop rectangle position against its current center */ - crop->left += (crop->width - (mf->width << half_scale)) /2 ; - crop->top += (crop->height - (mf->height << half_scale)) /2 ; -/* adjust new crop rectangle size */ - crop->width = mf->width << half_scale; - crop->height = mf->height << half_scale; -if (format->which ==V4L2_SUBDEV_FORMAT_TRY ) { -/* store new crop rectangle, hadware bound, in pad config */ -ov6650_bind_align_crop_rectangle (crop); - sd_state->pads->try_crop = *crop; -/* store new mbus frame format code and size in pad config */ sd_state->pads->try_fmt.width = crop->width >> half_scale; sd_state->pads->try_fmt.height = crop->height >> half_scale;
@@ -751,12 +736,7 @@ static int ov6650_set_fmt(struct v4l2_su mf->code = sd_state->pads->try_fmt.code; }else { -int ret; - -/* apply new crop rectangle */ - ret =ov6650_set_selection (sd,NULL , &sel); -if (ret) -return ret; +int ret =0 ;/* apply new media bus frame format and scaling if changed */ if (mf->code != priv->code || half_scale != priv->half_scale)
Greg Kroah-Hartman
maintainerPATCH 996/1017 pinctrl: canonical rsel resistance selection property
In reply to Greg Kroah-HartmanFrom: Guodong Liu <[email protected]>
commit 7966c5051fc7d52425155ab30ad568d9d97f3b02 upstream.
Change "mediatek,rsel_resistance_in_si_unit" to "mediatek,rsel-resistance-in-si-unit"
--- drivers/pinctrl/mediatek/pinctrl-paris.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/mediatek/pinctrl-paris.c +1 -1
@@ -985,7 +985,7 @@ int mtk_paris_pinctrl_probe(struct platf hw->nbase = hw->soc->nbase_names;if (of_find_property (hw->dev->of_node, -"mediatek,rsel_resistance_in_si_unit" ,NULL )) +"mediatek,rsel-resistance-in-si-unit" ,NULL )) hw->rsel_si_unit = true;else hw->rsel_si_unit = false;
Greg Kroah-Hartman
maintainerPATCH 997/1017 spi: mediatek: support tick_delay without enhance_timing
In reply to Greg Kroah-HartmanFrom: Leilk Liu <[email protected]>
commit 03b1be379dcee2e9c866c2a455a1a4a9581b3efd upstream.
this patch support tick_delay bit[31:30] without enhance_timing feature.
--- drivers/spi/spi-mt65xx.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
drivers/spi/spi-mt65xx.c +12 -3
@@ -43,8 +43,11 @@#define SPI_CFG1_PACKET_LOOP_OFFSET 8#define SPI_CFG1_PACKET_LENGTH_OFFSET 16#define SPI_CFG1_GET_TICK_DLY_OFFSET 29 +#define SPI_CFG1_GET_TICK_DLY_OFFSET_V1 30#define SPI_CFG1_GET_TICK_DLY_MASK 0xe0000000 +#define SPI_CFG1_GET_TICK_DLY_MASK_V1 0xc0000000 +#define SPI_CFG1_CS_IDLE_MASK 0xff#define SPI_CFG1_PACKET_LOOP_MASK 0xff00#define SPI_CFG1_PACKET_LENGTH_MASK 0x3ff0000
@@ -346,9 +349,15 @@ static int mtk_spi_prepare_message(struc/* tick delay */ reg_val =readl (mdata->base +SPI_CFG1_REG ); - reg_val &= ~SPI_CFG1_GET_TICK_DLY_MASK ; - reg_val |= ((chip_config->tick_delay &0x7 ) - <<SPI_CFG1_GET_TICK_DLY_OFFSET ); +if (mdata->dev_comp->enhance_timing) { + reg_val &= ~SPI_CFG1_GET_TICK_DLY_MASK ; + reg_val |= ((chip_config->tick_delay &0x7 ) + <<SPI_CFG1_GET_TICK_DLY_OFFSET ); + }else { + reg_val &= ~SPI_CFG1_GET_TICK_DLY_MASK_V1 ; + reg_val |= ((chip_config->tick_delay &0x3 ) + <<SPI_CFG1_GET_TICK_DLY_OFFSET_V1 ); + }writel (reg_val, mdata->base +SPI_CFG1_REG );/* set hw cs timing */
Greg Kroah-Hartman
maintainerPATCH 998/1017 ARM: dts: spear1340: Update serial node properties
In reply to Greg Kroah-HartmanFrom: Kuldeep Singh <[email protected]>
commit 583d6b0062640def86f3265aa1042ecb6672516e upstream.
Reorder dma and dma-names property for serial node to make it compliant with bindings.
--- arch/arm/boot/dts/spear1340.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/spear1340.dtsi +3 -3
@@ -134,9 +134,9 @@ reg = <0xb4100000 0x1000>; interrupts = <0 105 0x4>; status = "disabled"; - dmas = <&dwdma0 12 0 1>, - <&dwdma0 13 1 0>; - dma-names = "tx", "rx"; + dmas = <&dwdma0 13 0 1>, + <&dwdma0 12 1 0>; + dma-names = "rx", "tx"; }; thermal@e07008c4 {
Greg Kroah-Hartman
maintainerPATCH 999/1017 ARM: dts: spear13xx: Update SPI dma properties
In reply to Greg Kroah-HartmanFrom: Kuldeep Singh <[email protected]>
commit 31d3687d6017c7ce6061695361598d9cda70807a upstream.
Reorder dmas and dma-names property for spi controller node to make it compliant with bindings.
--- arch/arm/boot/dts/spear13xx.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/spear13xx.dtsi +3 -3
@@ -284,9 +284,9 @@ #size-cells = <0>; interrupts = <0 31 0x4>; status = "disabled"; - dmas = <&dwdma0 4 0 0>, - <&dwdma0 5 0 0>; - dma-names = "tx", "rx"; + dmas = <&dwdma0 5 0 0>, + <&dwdma0 4 0 0>; + dma-names = "rx", "tx"; }; rtc@e0580000 {
Greg Kroah-Hartman
maintainerPATCH 1000/1017 arm64: dts: ls1043a: Update i2c dma properties
In reply to Greg Kroah-HartmanFrom: Kuldeep Singh <[email protected]>
commit aa4df840d1c5eab2bb33695efe4409b3e5526749 upstream.
Reorder dmas and dma-names properties for i2c controller node to make it compliant with bindings.
--- arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi +3 -3
@@ -536,9 +536,9 @@ clock-names = "i2c"; clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(1)>; - dmas = <&edma0 1 39>, - <&edma0 1 38>; - dma-names = "tx", "rx"; + dmas = <&edma0 1 38>, + <&edma0 1 39>; + dma-names = "rx", "tx"; status = "disabled"; };
Greg Kroah-Hartman
maintainerPATCH 1001/1017 arm64: dts: ls1046a: Update i2c node dma properties
In reply to Greg Kroah-HartmanFrom: Kuldeep Singh <[email protected]>
commit eeeb4f1075d71d67083c75f69247206e9b3d9f4a upstream.
Reorder dmas and dma-names properties for i2c controller node to make it compliant with bindings.
--- arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi +3 -3
@@ -499,9 +499,9 @@ interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL QORIQ_CLK_PLL_DIV(2)>; - dmas = <&edma0 1 39>, - <&edma0 1 38>; - dma-names = "tx", "rx"; + dmas = <&edma0 1 38>, + <&edma0 1 39>; + dma-names = "rx", "tx"; status = "disabled"; };
Greg Kroah-Hartman
maintainerPATCH 1002/1017 um: Fix uml_mconsole stop/go
In reply to Greg Kroah-HartmanFrom: Anton Ivanov <[email protected]>
commit 1a3a6a2a035bb6c3a7ef4c788d8fd69a7b2d6284 upstream.
Moving to an EPOLL based IRQ controller broke uml_mconsole stop/go commands. This fixes it and restores stop/go functionality.
--- arch/um/drivers/mconsole_kern.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/um/drivers/mconsole_kern.c +2 -1
@@ -224,7 +224,7 @@ void mconsole_go(struct mc_request *req)void mconsole_stop (struct mc_request *req) { -deactivate_fd (req->originating_fd,MCONSOLE_IRQ ); +block_signals ();os_set_fd_block (req->originating_fd,1 );mconsole_reply (req,"stopped" ,0 ,0 );for (;;) {
@@ -247,6 +247,7 @@ void mconsole_stop(struct mc_request *re }os_set_fd_block (req->originating_fd,0 );mconsole_reply (req,"" ,0 ,0 ); +unblock_signals (); }static DEFINE_SPINLOCK (mc_devices_lock);
Greg Kroah-Hartman
maintainerPATCH 1003/1017 docs: sysctl/kernel: add missing bit to panic_print
In reply to Greg Kroah-HartmanFrom: Guilherme G. Piccoli <[email protected]>
commit a1ff1de00db21ecb956213f046b79741b64c6b65 upstream.
Patch series "Some improvements on panic_print".
This is a mix of a documentation fix with some additions to the "panic_print" syscall / parameter. The goal here is being able to collect all CPUs backtraces during a panic event and also to enable "panic_print" in a kdump event - details of the reasoning and design choices in the patches.
This patch (of 3):
Commit de6da1e8bcf0 ("panic: add an option to replay all the printk message in buffer") added a new bit to the sysctl/kernel parameter "panic_print", but the documentation was added only in kernel-parameters.txt, not in the sysctl guide.
Fix it here by adding bit 5 to sysctl admin-guide documentation.
--- Documentation/admin-guide/sysctl/kernel.rst | 1 + 1 file changed, 1 insertion(+)
Documentation/admin-guide/sysctl/kernel.rst +1 -0
@@ -795,6 +795,7 @@ bit 1 print system memory info bit 2 print timer info bit 3 print locks info if ``CONFIG_LOCKDEP`` is on bit 4 print ftrace buffer +bit 5 print all printk messages in buffer ===== ============================================ So for example to print tasks and memory info on panic, user can::
Greg Kroah-Hartman
maintainerPATCH 1004/1017 xsk: Do not write NULL in SW ring at allocation failure
In reply to Greg Kroah-HartmanFrom: Magnus Karlsson <[email protected]>
commit a95a4d9b39b0324402569ed7395aae59b8fd2b11 upstream.
For the case when xp_alloc_batch() is used but the batched allocation cannot be used, there is a slow path that uses the non-batched xp_alloc(). When it fails to allocate an entry, it returns NULL. The current code wrote this NULL into the entry of the provided results array (pointer to the driver SW ring usually) and returned. This might not be what the driver expects and to make things simpler, just write successfully allocated xdp_buffs into the SW ring,. The driver might have information in there that is still important after an allocation failure.
Note that at this point in time, there are no drivers using xp_alloc_batch() that could trigger this slow path. But one might get added.
--- net/xdp/xsk_buff_pool.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
net/xdp/xsk_buff_pool.c +6 -2
@@ -584,9 +584,13 @@ u32 xp_alloc_batch(struct xsk_buff_poolu32 nb_entries1 =0 , nb_entries2;if (unlikely (pool->dma_need_sync)) { +struct xdp_buff *buff; +/* Slow path */ - *xdp =xp_alloc (pool); -return !!*xdp; + buff =xp_alloc (pool); +if (buff) + *xdp = buff; +return !!buff; }if (unlikely (pool->free_list_cnt)) {
Greg Kroah-Hartman
maintainerPATCH 1005/1017 ice: xsk: Fix indexing in ice_tx_xsk_pool()
In reply to Greg Kroah-HartmanFrom: Maciej Fijalkowski <[email protected]>
commit 1ac2524de7b366633fc336db6c94062768d0ab03 upstream.
Ice driver tries to always create XDP rings array to be num_possible_cpus() sized, regardless of user's queue count setting that can be changed via ethtool -L for example.
Currently, ice_tx_xsk_pool() calculates the qid by decrementing the ring->q_index by the count of XDP queues, but ring->q_index is set to 'i
+ vsi->alloc_txq'.
When user did ethtool -L $IFACE combined 1, alloc_txq is 1, but vsi->num_xdp_txq is still num_possible_cpus(). Then, ice_tx_xsk_pool() will do OOB access and in the final result ring would not get xsk_pool pointer assigned. Then, each ice_xsk_wakeup() call will fail with error and it will not be possible to get into NAPI and do the processing from driver side.
Fix this by decrementing vsi->alloc_txq instead of vsi->num_xdp_txq from ring-q_index in ice_tx_xsk_pool() so the calculation is reflected to the setting of ring->q_index.
--- drivers/net/ethernet/intel/ice/ice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice.h +1 -1
@@ -709,7 +709,7 @@ static inline struct xsk_buff_pool *ice_struct ice_vsi *vsi = ring->vsi;u16 qid; - qid = ring->q_index - vsi->num_xdp_txq; + qid = ring->q_index - vsi->alloc_txq;if (!ice_is_xdp_ena_vsi (vsi) || !test_bit (qid, vsi->af_xdp_zc_qps))return NULL ;
Greg Kroah-Hartman
maintainerPATCH 1006/1017 vdpa/mlx5: Avoid processing works if workqueue was destroyed
In reply to Greg Kroah-HartmanFrom: Eli Cohen <[email protected]>
commit ad6dc1daaf29f97f23cc810d60ee01c0e83f4c6b upstream.
If mlx5_vdpa gets unloaded while a VM is running, the workqueue will be destroyed. However, vhost might still have reference to the kick function and might attempt to push new works. This could lead to null pointer dereference.
To fix this, set mvdev->wq to NULL just before destroying and verify that the workqueue is not NULL in mlx5_vdpa_kick_vq before attempting to push a new work.
--- drivers/vdpa/mlx5/net/mlx5_vnet.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/vdpa/mlx5/net/mlx5_vnet.c +5 -2
@@ -1680,7 +1680,7 @@ static void mlx5_vdpa_kick_vq(struct vdpreturn ;if (unlikely (is_ctrl_vq_idx (mvdev, idx))) { -if (!mvdev->cvq.ready) +if (!mvdev->wq || !mvdev->cvq.ready)return ; wqent =kzalloc (sizeof (*wqent),GFP_ATOMIC );
@@ -2673,9 +2673,12 @@ static void mlx5_vdpa_dev_del(struct vdp struct mlx5_vdpa_mgmtdev *mgtdev = container_of(v_mdev, struct mlx5_vdpa_mgmtdev, mgtdev);struct mlx5_vdpa_dev *mvdev =to_mvdev (dev);struct mlx5_vdpa_net *ndev =to_mlx5_vdpa_ndev (mvdev); +struct workqueue_struct *wq;mlx5_notifier_unregister (mvdev->mdev, &ndev->nb); -destroy_workqueue (mvdev->wq); + wq = mvdev->wq; + mvdev->wq =NULL ; +destroy_workqueue (wq);_vdpa_unregister_device (dev); mgtdev->ndev =NULL ; }
Greg Kroah-Hartman
maintainerPATCH 1007/1017 openvswitch: Fixed nd target mask field in the flow dump.
In reply to Greg Kroah-HartmanFrom: Martin Varghese <[email protected]>
commit f19c44452b58a84d95e209b847f5495d91c9983a upstream.
IPv6 nd target mask was not getting populated in flow dump.
In the function __ovs_nla_put_key the icmp code mask field was checked instead of icmp code key field to classify the flow as neighbour discovery.
ufid:bdfbe3e5-60c2-43b0-a5ff-dfcac1c37328, recirc_id(0),dp_hash(0/0), skb_priority(0/0),in_port(ovs-nm1),skb_mark(0/0),ct_state(0/0), ct_zone(0/0),ct_mark(0/0),ct_label(0/0), eth(src=00:00:00:00:00:00/00:00:00:00:00:00, dst=00:00:00:00:00:00/00:00:00:00:00:00),eth_type(0x86dd), ipv6(src=::/::,dst=::/::,label=0/0,proto=58,tclass=0/0,hlimit=0/0,frag=no), icmpv6(type=135,code=0),
nd(target=2001::2/::,
sll=00:00:00:00:00:00/00:00:00:00:00:00, tll=00:00:00:00:00:00/00:00:00:00:00:00),
packets:10, bytes:860, used:0.504s, dp:ovs, actions:ovs-nm2
--- net/openvswitch/flow_netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/openvswitch/flow_netlink.c +2 -2
@@ -2201,8 +2201,8 @@ static int __ovs_nla_put_key(const struc icmpv6_key->icmpv6_type =ntohs (output->tp.src); icmpv6_key->icmpv6_code =ntohs (output->tp.dst); -if (icmpv6_key->icmpv6_type ==NDISC_NEIGHBOUR_SOLICITATION || - icmpv6_key->icmpv6_type ==NDISC_NEIGHBOUR_ADVERTISEMENT ) { +if (swkey->tp.src ==htons (NDISC_NEIGHBOUR_SOLICITATION ) || + swkey->tp.src ==htons (NDISC_NEIGHBOUR_ADVERTISEMENT )) {struct ovs_key_nd *nd_key; nla =nla_reserve (skb,OVS_KEY_ATTR_ND ,sizeof (*nd_key));
Greg Kroah-Hartman
maintainerPATCH 1008/1017 torture: Make torture.sh help message match reality
In reply to Greg Kroah-HartmanFrom: Paul E. McKenney <[email protected]>
commit f233673cd32a048f2eed69e56b61174c33fb740b upstream.
This commit fixes a couple of typos: s/--doall/--do-all/ and s/--doallmodconfig/--do-allmodconfig/.
[ paulmck: Add Fixes: supplied by Paul Menzel. ]
--- tools/testing/selftests/rcutorture/bin/torture.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/rcutorture/bin/torture.sh +2 -2
@@ -71,8 +71,8 @@ usage () { echo " --configs-rcutorture \"config-file list w/ repeat factor (3*TINY01)\"" echo " --configs-locktorture \"config-file list w/ repeat factor (10*LOCK01)\"" echo " --configs-scftorture \"config-file list w/ repeat factor (2*CFLIST)\"" - echo " --doall" - echo " --doallmodconfig / --do-no-allmodconfig" + echo " --do-all" + echo " --do-allmodconfig / --do-no-allmodconfig" echo " --do-clocksourcewd / --do-no-clocksourcewd" echo " --do-kasan / --do-no-kasan" echo " --do-kcsan / --do-no-kcsan"
Greg Kroah-Hartman
maintainerPATCH 1009/1017 n64cart: convert bi_disk to bi_bdev->bd_disk fix build
In reply to Greg Kroah-HartmanFrom: Jackie Liu <[email protected]>
commit b2479de38d8fc7ef13d5c78ff5ded6e5a1a4eac0 upstream.
My kernel robot report below:
drivers/block/n64cart.c: In function ‘n64cart_submit_bio’:
drivers/block/n64cart.c:91:26: error: ‘struct bio’ has no member named ‘bi_disk’
91 | struct device *dev = bio->bi_disk->private_data;
| ^~
CC drivers/slimbus/qcom-ctrl.o
CC drivers/auxdisplay/hd44780.o
CC drivers/watchdog/watchdog_core.o
CC drivers/nvme/host/fault_inject.o
AR drivers/accessibility/braille/built-in.a make[2]: *** [scripts/Makefile.build:288: drivers/block/n64cart.o] Error 1
--- drivers/block/n64cart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/n64cart.c +1 -1
@@ -88,7 +88,7 @@ static void n64cart_submit_bio(struct bi {struct bio_vec bvec;struct bvec_iter iter; -struct device *dev = bio->bi_disk->private_data; +struct device *dev = bio->bi_bdev->bd_disk->private_data;u32 pos = bio->bi_iter.bi_sector <<SECTOR_SHIFT ;bio_for_each_segment (bvec, bio, iter) {
Greg Kroah-Hartman
maintainerPATCH 1010/1017 Revert "nbd: fix possible overflow on first_minor in nbd_dev_add()"
In reply to Greg Kroah-HartmanFrom: Jens Axboe <[email protected]>
commit 7198bfc2017644c6b92d2ecef9b8b8e0363bb5fd upstream.
This reverts commit 6d35d04a9e18990040e87d2bbf72689252669d54.
Both Gabriel and Borislav report that this commit casues a regression with nbd:
sysfs: cannot create duplicate filename '/dev/block/43:0'
Revert it before 5.18-rc1 and we'll investigage this separately in due time.
--- drivers/block/nbd.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/block/nbd.c +12 -12
@@ -1800,6 +1800,17 @@ static struct nbd_device *nbd_dev_add(inrefcount_set (&nbd->refs,0 );INIT_LIST_HEAD (&nbd->list); disk->major =NBD_MAJOR ; + +/* Too big first_minor can cause duplicate creation of +* sysfs files/links, since index << part_shift might overflow, or +* MKDEV() expect that the max bits of first_minor is 20. +*/ + disk->first_minor = index << part_shift; +if (disk->first_minor < index || disk->first_minor >MINORMASK ) { + err = -EINVAL ; + goto out_free_work; + } + disk->minors =1 << part_shift; disk->fops = &nbd_fops; disk->private_data = nbd;
@@ -1904,19 +1915,8 @@ static int nbd_genl_connect(struct sk_buif (!netlink_capable (skb,CAP_SYS_ADMIN ))return -EPERM ; -if (info->attrs[NBD_ATTR_INDEX ]) { +if (info->attrs[NBD_ATTR_INDEX ]) index =nla_get_u32 (info->attrs[NBD_ATTR_INDEX ]); - -/* -* Too big first_minor can cause duplicate creation of -* sysfs files/links, since index << part_shift might overflow, or -* MKDEV() expect that the max bits of first_minor is 20. -*/ -if (index <0 || index >MINORMASK >> part_shift) { -printk (KERN_ERR "nbd: illegal input index %d\n" , index); -return -EINVAL ; - } - }if (!info->attrs[NBD_ATTR_SOCKETS ]) {printk (KERN_ERR "nbd: must specify at least one socket\n" );return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 1011/1017 mmc: rtsx: Let MMC core handle runtime PM
In reply to Greg Kroah-HartmanFrom: Kai-Heng Feng <[email protected]>
commit 7570fb41e450ba37bf9335fe3751fa9f502c30fa upstream.
Since MMC core handles runtime PM reference counting, we can avoid doing redundant runtime PM work in the driver. That means the only thing commit 5b4258f6721f ("misc: rtsx: rts5249 support runtime PM") misses is to always enable runtime PM, to let its parent driver enable ASPM in the runtime idle routine.
--- drivers/mmc/host/rtsx_pci_sdmmc.c | 18 ------------------ 1 file changed, 18 deletions(-)
drivers/mmc/host/rtsx_pci_sdmmc.c +0 -18
@@ -823,7 +823,6 @@ static void sd_request(struct work_struc }mutex_lock (&pcr->pcr_mutex); -pm_runtime_get_sync (dev);rtsx_pci_start_run (pcr);
@@ -860,8 +859,6 @@ static void sd_request(struct work_struc data->bytes_xfered = data->blocks * data->blksz; } -pm_runtime_mark_last_busy (dev); -pm_runtime_put_autosuspend (dev);mutex_unlock (&pcr->pcr_mutex); finish:
@@ -1093,7 +1090,6 @@ static void sdmmc_set_ios(struct mmc_hosreturn ;mutex_lock (&pcr->pcr_mutex); -pm_runtime_get_sync (dev);rtsx_pci_start_run (pcr);
@@ -1127,8 +1123,6 @@ static void sdmmc_set_ios(struct mmc_hosrtsx_pci_switch_clock (pcr, ios->clock, host->ssc_depth, host->initial_mode, host->double_clk, host->vpclk); -pm_runtime_mark_last_busy (dev); -pm_runtime_put_autosuspend (dev);mutex_unlock (&pcr->pcr_mutex); }
@@ -1144,7 +1138,6 @@ static int sdmmc_get_ro(struct mmc_hostreturn -ENOMEDIUM ;mutex_lock (&pcr->pcr_mutex); -pm_runtime_get_sync (dev);rtsx_pci_start_run (pcr);
@@ -1154,8 +1147,6 @@ static int sdmmc_get_ro(struct mmc_hostif (val &SD_WRITE_PROTECT ) ro =1 ; -pm_runtime_mark_last_busy (dev); -pm_runtime_put_autosuspend (dev);mutex_unlock (&pcr->pcr_mutex);return ro;
@@ -1173,7 +1164,6 @@ static int sdmmc_get_cd(struct mmc_hostreturn cd;mutex_lock (&pcr->pcr_mutex); -pm_runtime_get_sync (dev);rtsx_pci_start_run (pcr);
@@ -1183,8 +1173,6 @@ static int sdmmc_get_cd(struct mmc_hostif (val &SD_EXIST ) cd =1 ; -pm_runtime_mark_last_busy (dev); -pm_runtime_put_autosuspend (dev);mutex_unlock (&pcr->pcr_mutex);return cd;
@@ -1282,7 +1270,6 @@ static int sdmmc_switch_voltage(struct mreturn err;mutex_lock (&pcr->pcr_mutex); -pm_runtime_get_sync (dev);rtsx_pci_start_run (pcr);
@@ -1312,8 +1299,6 @@ out: err =rtsx_pci_write_register (pcr,SD_BUS_STAT ,SD_CLK_TOGGLE_EN |SD_CLK_FORCE_STOP ,0 ); -pm_runtime_mark_last_busy (dev); -pm_runtime_put_autosuspend (dev);mutex_unlock (&pcr->pcr_mutex);return err;
@@ -1334,7 +1319,6 @@ static int sdmmc_execute_tuning(struct mreturn err;mutex_lock (&pcr->pcr_mutex); -pm_runtime_get_sync (dev);rtsx_pci_start_run (pcr);
@@ -1367,8 +1351,6 @@ static int sdmmc_execute_tuning(struct m err =sd_change_phase (host,DDR50_RX_PHASE (pcr), true); out: -pm_runtime_mark_last_busy (dev); -pm_runtime_put_autosuspend (dev);mutex_unlock (&pcr->pcr_mutex);return err;
Greg Kroah-Hartman
maintainerPATCH 1012/1017 mmc: rtsx: Fix build errors/warnings for unused variable
In reply to Greg Kroah-HartmanFrom: Ulf Hansson <[email protected]>
commit 3dd9a926ec2308e49445f22abef149fc64e9332e upstream.
The struct device *dev, is no longer needed at various functions, let's therefore drop it to fix the build errors/warnings.
--- drivers/mmc/host/rtsx_pci_sdmmc.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/mmc/host/rtsx_pci_sdmmc.c +0 -6
@@ -806,7 +806,6 @@ static void sd_request(struct work_strucstruct mmc_request *mrq = host->mrq;struct mmc_command *cmd = mrq->cmd;struct mmc_data *data = mrq->data; -struct device *dev = &host->pdev->dev;unsigned int data_size =0 ;int err;
@@ -1081,7 +1080,6 @@ static void sdmmc_set_ios(struct mmc_hos {struct realtek_pci_sdmmc *host =mmc_priv (mmc);struct rtsx_pcr *pcr = host->pcr; -struct device *dev = &host->pdev->dev;if (host->eject)return ;
@@ -1130,7 +1128,6 @@ static int sdmmc_get_ro(struct mmc_host {struct realtek_pci_sdmmc *host =mmc_priv (mmc);struct rtsx_pcr *pcr = host->pcr; -struct device *dev = &host->pdev->dev;int ro =0 ;u32 val;
@@ -1156,7 +1153,6 @@ static int sdmmc_get_cd(struct mmc_host {struct realtek_pci_sdmmc *host =mmc_priv (mmc);struct rtsx_pcr *pcr = host->pcr; -struct device *dev = &host->pdev->dev;int cd =0 ;u32 val;
@@ -1255,7 +1251,6 @@ static int sdmmc_switch_voltage(struct m {struct realtek_pci_sdmmc *host =mmc_priv (mmc);struct rtsx_pcr *pcr = host->pcr; -struct device *dev = &host->pdev->dev;int err =0 ;u8 voltage;
@@ -1308,7 +1303,6 @@ static int sdmmc_execute_tuning(struct m {struct realtek_pci_sdmmc *host =mmc_priv (mmc);struct rtsx_pcr *pcr = host->pcr; -struct device *dev = &host->pdev->dev;int err =0 ;if (host->eject)
Greg Kroah-Hartman
maintainerPATCH 1013/1017 KVM: x86/mmu: do compare-and-exchange of gPTE via the user address
In reply to Greg Kroah-HartmanFrom: Paolo Bonzini <[email protected]>
commit 2a8859f373b0a86f0ece8ec8312607eacf12485d upstream.
FNAME(cmpxchg_gpte) is an inefficient mess. It is at least decent if it can go through get_user_pages_fast(), but if it cannot then it tries to use memremap(); that is not just terribly slow, it is also wrong because it assumes that the VM_PFNMAP VMA is contiguous.
The right way to do it would be to do the same thing as hva_to_pfn_remapped() does since commit add6a0cd1c5b ("KVM: MMU: try to fix up page faults before giving up", 2016-07-05), using follow_pte() and fixup_user_fault() to determine the correct address to use for memremap(). To do this, one could for example extract hva_to_pfn() for use outside virt/kvm/kvm_main.c. But really there is no reason to do that either, because there is already a perfectly valid address to do the cmpxchg() on, only it is a userspace address. That means doing user_access_begin()/user_access_end() and writing the code in assembly to handle exceptions correctly. Worse, the guest PTE can be 8-byte even on i686 so there is the extra complication of using cmpxchg8b to account for. But at least it is an efficient mess.
(Thanks to Linus for suggesting improvement on the inline assembly).
--- arch/x86/kvm/mmu/paging_tmpl.h | 77 +++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 40 deletions(-)
arch/x86/kvm/mmu/paging_tmpl.h +37 -40
@@ -34,9 +34,8 @@#define PT_HAVE_ACCESSED_DIRTY (mmu) true#ifdef CONFIG_X86_64 #define PT_MAX_FULL_LEVELS PT64_ROOT_MAX_LEVEL -#define CMPXCHG cmpxchg +#define CMPXCHG "cmpxchgq"#else -#define CMPXCHG cmpxchg64#define PT_MAX_FULL_LEVELS 2#endif #elif PTTYPE ==32
@@ -52,7 +51,7 @@#define PT_GUEST_DIRTY_SHIFT PT_DIRTY_SHIFT#define PT_GUEST_ACCESSED_SHIFT PT_ACCESSED_SHIFT#define PT_HAVE_ACCESSED_DIRTY (mmu) true -#define CMPXCHG cmpxchg +#define CMPXCHG "cmpxchgl"#elif PTTYPE ==PTTYPE_EPT #define pt_element_t u64#define guest_walker guest_walkerEPT
@@ -65,7 +64,9 @@#define PT_GUEST_DIRTY_SHIFT 9#define PT_GUEST_ACCESSED_SHIFT 8#define PT_HAVE_ACCESSED_DIRTY (mmu) ((mmu)->ept_ad) -#define CMPXCHG cmpxchg64 +#ifdef CONFIG_X86_64 +#define CMPXCHG "cmpxchgq" +#endif #define PT_MAX_FULL_LEVELS PT64_ROOT_MAX_LEVEL#else #error Invalid PTTYPE value
@@ -147,43 +148,39 @@ static int FNAME(cmpxchg_gpte)(struct kv pt_element_t __user *ptep_user, unsigned index, pt_element_t orig_pte, pt_element_t new_pte) { - int npages; -pt_element_t ret; -pt_element_t *table; -struct page *page; - - npages =get_user_pages_fast ((unsigned long )ptep_user,1 ,FOLL_WRITE , &page); -if (likely (npages ==1 )) { - table =kmap_atomic (page); - ret =CMPXCHG (&table[index], orig_pte, new_pte); -kunmap_atomic (table); - -kvm_release_page_dirty (page); - }else { -struct vm_area_struct *vma; -unsigned long vaddr = (unsigned long )ptep_user &PAGE_MASK ; -unsigned long pfn; -unsigned long paddr; - -mmap_read_lock (current->mm); - vma =find_vma_intersection (current->mm, vaddr, vaddr +PAGE_SIZE ); -if (!vma || !(vma->vm_flags &VM_PFNMAP )) { -mmap_read_unlock (current->mm); -return -EFAULT ; - } - pfn = ((vaddr - vma->vm_start) >>PAGE_SHIFT ) + vma->vm_pgoff; - paddr = pfn <<PAGE_SHIFT ; - table =memremap (paddr,PAGE_SIZE ,MEMREMAP_WB ); -if (!table) { -mmap_read_unlock (current->mm); -return -EFAULT ; - } - ret =CMPXCHG (&table[index], orig_pte, new_pte); -memunmap (table); -mmap_read_unlock (current->mm); - } + int r = -EFAULT; + +if (!user_access_begin (ptep_user,sizeof (pt_element_t))) +return -EFAULT ; + +#ifdef CMPXCHG + asmvolatile ("1:" LOCK_PREFIX CMPXCHG " %[new], %[ptr]\n" +"mov $0, %[r]\n" +"setnz %b[r]\n" +"2:" + _ASM_EXTABLE_UA(1b, 2b) + : [ptr] "+m" (*ptep_user), + [old] "+a" (orig_pte), + [r] "+q" (r) + : [new] "r" (new_pte) + : "memory"); +#else + asmvolatile ("1:" LOCK_PREFIX "cmpxchg8b %[ptr]\n" +"movl $0, %[r]\n" +"jz 2f\n" +"incl %[r]\n" +"2:" + _ASM_EXTABLE_UA(1b, 2b) + : [ptr] "+m" (*ptep_user), + [old] "+A" (orig_pte), + [r] "+rm" (r) + : [new_lo] "b" ((u32)new_pte), + [new_hi] "c" ((u32)(new_pte >> 32)) + : "memory"); +#endif -return (ret != orig_pte); +user_access_end (); +return r; } static bool FNAME(prefetch_invalid_gpte)(struct kvm_vcpu *vcpu,
Greg Kroah-Hartman
maintainerPATCH 1014/1017 coredump: Snapshot the vmas in do_coredump
In reply to Greg Kroah-HartmanFrom: Eric W. Biederman <[email protected]>
commit 95c5436a4883841588dae86fb0b9325f47ba5ad3 upstream.
Move the call of dump_vma_snapshot and kvfree(vma_meta) out of the individual coredump routines into do_coredump itself. This makes the code less error prone and easier to maintain.
Make the vma snapshot available to the coredump routines in struct coredump_params. This makes it easier to change and update what is captures in the vma snapshot and will be needed for fixing fill_file_notes.
--- fs/binfmt_elf.c | 20 +++++++------------- fs/binfmt_elf_fdpic.c | 18 ++++++------------ fs/coredump.c | 41 +++++++++++++++++++++++------------------ include/linux/binfmts.h | 3 +++ include/linux/coredump.h | 3 --- 5 files changed, 39 insertions(+), 46 deletions(-)
fs/binfmt_elf.c +7 -13
@@ -2192,8 +2192,7 @@ static void fill_extnum_info(struct elfhstatic int elf_core_dump (struct coredump_params *cprm) {int has_dumped =0 ; -int vma_count, segs, i; -size_t vma_data_size; +int segs, i;struct elfhdr elf;loff_t offset =0 , dataoff;struct elf_note_info info = { };
@@ -2201,16 +2200,12 @@ static int elf_core_dump(struct coredumpstruct elf_shdr *shdr4extnum =NULL ;Elf_Half e_phnum;elf_addr_t e_shoff; -struct core_vma_metadata *vma_meta; - -if (dump_vma_snapshot (cprm, &vma_count, &vma_meta, &vma_data_size)) -return 0 ;/* * The number of segs are recored into ELF header as 16bit value. * Please check DEFAULT_MAX_MAP_COUNT definition when you modify here. */ - segs = vma_count +elf_core_extra_phdrs (); + segs = cprm->vma_count +elf_core_extra_phdrs ();/* for notes section */ segs++;
@@ -2249,7 +2244,7 @@ static int elf_core_dump(struct coredump dataoff = offset =roundup (offset,ELF_EXEC_PAGESIZE ); - offset += vma_data_size; + offset += cprm->vma_data_size; offset +=elf_core_extra_data_size (); e_shoff = offset;
@@ -2269,8 +2264,8 @@ static int elf_core_dump(struct coredump goto end_coredump;/* Write program headers for segments dump */ -for (i =0 ; i < vma_count; i++) { -struct core_vma_metadata *meta = vma_meta + i; +for (i =0 ; i < cprm->vma_count; i++) { +struct core_vma_metadata *meta = cprm->vma_meta + i;struct elf_phdr phdr; phdr.p_type =PT_LOAD ;
@@ -2307,8 +2302,8 @@ static int elf_core_dump(struct coredump/* Align to page */ dump_skip_to (cprm, dataoff); -for (i =0 ; i < vma_count; i++) { -struct core_vma_metadata *meta = vma_meta + i; +for (i =0 ; i < cprm->vma_count; i++) { +struct core_vma_metadata *meta = cprm->vma_meta + i;if (!dump_user_range (cprm, meta->start, meta->dump_size)) goto end_coredump;
@@ -2325,7 +2320,6 @@ static int elf_core_dump(struct coredump end_coredump:free_note_info (&info);kfree (shdr4extnum); -kvfree (vma_meta);kfree (phdr4note);return has_dumped; }
fs/binfmt_elf_fdpic.c +6 -12
@@ -1465,7 +1465,7 @@ static bool elf_fdpic_dump_segments(strustatic int elf_fdpic_core_dump (struct coredump_params *cprm) {int has_dumped =0 ; -int vma_count, segs; +int segs;int i;struct elfhdr *elf =NULL ;loff_t offset =0 , dataoff;
@@ -1480,8 +1480,6 @@ static int elf_fdpic_core_dump(struct coelf_addr_t e_shoff;struct core_thread *ct;struct elf_thread_status *tmp; -struct core_vma_metadata *vma_meta =NULL ; -size_t vma_data_size;/* alloc memory for large data structures: too large to be on stack */ elf =kmalloc (sizeof (*elf),GFP_KERNEL );
@@ -1491,9 +1489,6 @@ static int elf_fdpic_core_dump(struct coif (!psinfo) goto end_coredump; -if (dump_vma_snapshot (cprm, &vma_count, &vma_meta, &vma_data_size)) - goto end_coredump; -for (ct = current->signal->core_state->dumper.next; ct; ct = ct->next) { tmp = elf_dump_thread_status(cprm->siginfo->si_signo,
@@ -1513,7 +1508,7 @@ static int elf_fdpic_core_dump(struct co tmp->next = thread_list; thread_list = tmp; - segs = vma_count +elf_core_extra_phdrs (); + segs = cprm->vma_count +elf_core_extra_phdrs ();/* for notes section */ segs++;
@@ -1558,7 +1553,7 @@ static int elf_fdpic_core_dump(struct co/* Page-align dumped data */ dataoff = offset =roundup (offset,ELF_EXEC_PAGESIZE ); - offset += vma_data_size; + offset += cprm->vma_data_size; offset +=elf_core_extra_data_size (); e_shoff = offset;
@@ -1578,8 +1573,8 @@ static int elf_fdpic_core_dump(struct co goto end_coredump;/* write program headers for segments dump */ -for (i =0 ; i < vma_count; i++) { -struct core_vma_metadata *meta = vma_meta + i; +for (i =0 ; i < cprm->vma_count; i++) { +struct core_vma_metadata *meta = cprm->vma_meta + i;struct elf_phdr phdr;size_t sz;
@@ -1628,7 +1623,7 @@ static int elf_fdpic_core_dump(struct codump_skip_to (cprm, dataoff); -if (!elf_fdpic_dump_segments (cprm, vma_meta, vma_count)) +if (!elf_fdpic_dump_segments (cprm, cprm->vma_meta, cprm->vma_count)) goto end_coredump;if (!elf_core_write_extra_data (cprm))
@@ -1652,7 +1647,6 @@ end_coredump: thread_list = thread_list->next;kfree (tmp); } -kvfree (vma_meta);kfree (phdr4note);kfree (elf);kfree (psinfo);
fs/coredump.c +23 -18
103 lines not on this page · raw message
include/linux/binfmts.h +3 -0
@@ -87,6 +87,9 @@ struct coredump_params {loff_t written;loff_t pos;loff_t to_skip; +int vma_count; +size_t vma_data_size; +struct core_vma_metadata *vma_meta; };/*
include/linux/coredump.h +0 -3
@@ -29,9 +29,6 @@ extern int dump_emit(struct coredump_parextern int dump_align (struct coredump_params *cprm,int align);int dump_user_range (struct coredump_params *cprm,unsigned long start,unsigned long len); -int dump_vma_snapshot (struct coredump_params *cprm,int *vma_count, -struct core_vma_metadata **vma_meta, -size_t *vma_data_size_ptr);extern void do_coredump (const kernel_siginfo_t *siginfo);#else static inline void do_coredump (const kernel_siginfo_t *siginfo) {}
Greg Kroah-Hartman
maintainerPATCH 1015/1017 coredump: Remove the WARN_ON in dump_vma_snapshot
In reply to Greg Kroah-HartmanFrom: Eric W. Biederman <[email protected]>
commit 49c1866348f364478a0c4d3dd13fd08bb82d3a5b upstream.
The condition is impossible and to the best of my knowledge has never triggered.
We are in deep trouble if that conditions happens and we walk past the end of our allocated array.
So delete the WARN_ON and the code that makes it look like the kernel can handle the case of walking past the end of it's vma_meta array.
--- fs/coredump.c | 6 ------ 1 file changed, 6 deletions(-)
fs/coredump.c +0 -6
@@ -1085,12 +1085,6 @@ static bool dump_vma_snapshot(struct cormmap_write_unlock (mm); -if (WARN_ON (i != cprm->vma_count)) { -kvfree (cprm->vma_meta); -return false; - } - -for (i =0 ; i < cprm->vma_count; i++) {struct core_vma_metadata *m = cprm->vma_meta + i;
Greg Kroah-Hartman
maintainerPATCH 1016/1017 coredump/elf: Pass coredump_params into fill_note_info
In reply to Greg Kroah-HartmanFrom: Eric W. Biederman <[email protected]>
commit 9ec7d3230717b4fe9b6c7afeb4811909c23fa1d7 upstream.
Instead of individually passing cprm->siginfo and cprm->regs into fill_note_info pass all of struct coredump_params.
This is preparation to allow fill_files_note to use the existing vma snapshot.
--- fs/binfmt_elf.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
fs/binfmt_elf.c +11 -11
@@ -1823,7 +1823,7 @@ static int fill_thread_core_info(structstatic int fill_note_info (struct elfhdr *elf,int phdrs,struct elf_note_info *info, -const kernel_siginfo_t *siginfo,struct pt_regs *regs) +struct coredump_params *cprm) {struct task_struct *dump_task = current;const struct user_regset_view *view =task_user_regset_view (dump_task);
@@ -1895,7 +1895,7 @@ static int fill_note_info(struct elfhdr* Now fill in each thread's information. */ for (t = info->thread; t !=NULL ; t = t->next) -if (!fill_thread_core_info (t, view, siginfo->si_signo, &info->size)) +if (!fill_thread_core_info (t, view, cprm->siginfo->si_signo, &info->size))return 0 ;/*
@@ -1904,7 +1904,7 @@ static int fill_note_info(struct elfhdrfill_psinfo (psinfo, dump_task->group_leader, dump_task->mm); info->size +=notesize (&info->psinfo); -fill_siginfo_note (&info->signote, &info->csigdata, siginfo); +fill_siginfo_note (&info->signote, &info->csigdata, cprm->siginfo); info->size +=notesize (&info->signote);fill_auxv_note (&info->auxv, current->mm);
@@ -2052,7 +2052,7 @@ static int elf_note_info_init(struct elfstatic int fill_note_info (struct elfhdr *elf,int phdrs,struct elf_note_info *info, -const kernel_siginfo_t *siginfo,struct pt_regs *regs) +struct coredump_params *cprm) {struct core_thread *ct;struct elf_thread_status *ets;
@@ -2073,13 +2073,13 @@ static int fill_note_info(struct elfhdrlist_for_each_entry (ets, &info->thread_list, list) {int sz; - sz =elf_dump_thread_status (siginfo->si_signo, ets); + sz =elf_dump_thread_status (cprm->siginfo->si_signo, ets); info->thread_status_size += sz; }/* now collect the dump for the current */ memset (info->prstatus,0 ,sizeof (*info->prstatus)); -fill_prstatus (&info->prstatus->common, current, siginfo->si_signo); -elf_core_copy_regs (&info->prstatus->pr_reg, regs); +fill_prstatus (&info->prstatus->common, current, cprm->siginfo->si_signo); +elf_core_copy_regs (&info->prstatus->pr_reg, cprm->regs);/* Set up header */ fill_elf_header (elf, phdrs,ELF_ARCH ,ELF_CORE_EFLAGS );
@@ -2095,7 +2095,7 @@ static int fill_note_info(struct elfhdrfill_note (info->notes +1 ,"CORE" ,NT_PRPSINFO ,sizeof (*info->psinfo), info->psinfo); -fill_siginfo_note (info->notes +2 , &info->csigdata, siginfo); +fill_siginfo_note (info->notes +2 , &info->csigdata, cprm->siginfo);fill_auxv_note (info->notes +3 , current->mm); info->numnote =4 ;
@@ -2105,8 +2105,8 @@ static int fill_note_info(struct elfhdr }/* Try to dump the FPU. */ - info->prstatus->pr_fpvalid =elf_core_copy_task_fpregs (current, regs, - info->fpu); + info->prstatus->pr_fpvalid = +elf_core_copy_task_fpregs (current, cprm->regs, info->fpu);if (info->prstatus->pr_fpvalid)fill_note (info->notes + info->numnote++,"CORE" ,NT_PRFPREG ,sizeof (*info->fpu), info->fpu);
@@ -2219,7 +2219,7 @@ static int elf_core_dump(struct coredump* Collect all the non-memory information about the process for the * notes. This also sets up the file header. */ -if (!fill_note_info (&elf, e_phnum, &info, cprm->siginfo, cprm->regs)) +if (!fill_note_info (&elf, e_phnum, &info, cprm)) goto end_coredump; has_dumped =1 ;
Greg Kroah-Hartman
maintainerPATCH 1017/1017 coredump: Use the vma snapshot in fill_files_note
In reply to Greg Kroah-HartmanFrom: Eric W. Biederman <[email protected]>
commit 390031c942116d4733310f0684beb8db19885fe6 upstream.
Matthew Wilcox reported that there is a missing mmap_lock in file_files_note that could possibly lead to a user after free.
Solve this by using the existing vma snapshot for consistency and to avoid the need to take the mmap_lock anywhere in the coredump code except for dump_vma_snapshot.
Update the dump_vma_snapshot to capture vm_pgoff and vm_file that are neeeded by fill_files_note.
Add free_vma_snapshot to free the captured values of vm_file.
--- fs/binfmt_elf.c | 24 ++++++++++++------------ fs/coredump.c | 22 +++++++++++++++++++++- include/linux/coredump.h | 2 ++ 3 files changed, 35 insertions(+), 13 deletions(-)
fs/binfmt_elf.c +12 -12
@@ -1642,17 +1642,16 @@ static void fill_siginfo_note(struct mem* long file_ofs * followed by COUNT filenames in ASCII: "FILE1" NUL "FILE2" NUL... */ -static int fill_files_note (struct memelfnote *note) +static int fill_files_note (struct memelfnote *note,struct coredump_params *cprm) { -struct mm_struct *mm = current->mm; -struct vm_area_struct *vma;unsigned count, size, names_ofs, remaining, n;user_long_t *data;user_long_t *start_end_ofs;char *name_base, *name_curpos; +int i;/* *Estimated* file count and total data size needed */ - count = mm->map_count; + count = cprm->vma_count;if (count >UINT_MAX /64 )return -EINVAL ; size = count *64 ;
@@ -1674,11 +1673,12 @@ static int fill_files_note(struct memelf name_base = name_curpos = ((char *)data) + names_ofs; remaining = size - names_ofs; count =0 ; -for (vma = mm->mmap; vma !=NULL ; vma = vma->vm_next) { +for (i =0 ; i < cprm->vma_count; i++) { +struct core_vma_metadata *m = &cprm->vma_meta[i];struct file *file;const char *filename; - file = vma->vm_file; + file = m->file;if (!file)continue ; filename =file_path (file, name_curpos, remaining);
@@ -1698,9 +1698,9 @@ static int fill_files_note(struct memelfmemmove (name_curpos, filename, n); name_curpos += n; - *start_end_ofs++ = vma->vm_start; - *start_end_ofs++ = vma->vm_end; - *start_end_ofs++ = vma->vm_pgoff; + *start_end_ofs++ = m->start; + *start_end_ofs++ = m->end; + *start_end_ofs++ = m->pgoff; count++; }
@@ -1711,7 +1711,7 @@ static int fill_files_note(struct memelf* Count usually is less than mm->map_count, * we need to move filenames down. */ - n = mm->map_count - count; + n = cprm->vma_count - count;if (n !=0 ) {unsigned shift_bytes = n *3 *sizeof (data[0 ]); memmove(name_base - shift_bytes, name_base,
@@ -1910,7 +1910,7 @@ static int fill_note_info(struct elfhdrfill_auxv_note (&info->auxv, current->mm); info->size +=notesize (&info->auxv); -if (fill_files_note (&info->files) ==0 ) +if (fill_files_note (&info->files, cprm) ==0 ) info->size +=notesize (&info->files);return 1 ;
@@ -2099,7 +2099,7 @@ static int fill_note_info(struct elfhdrfill_auxv_note (info->notes +3 , current->mm); info->numnote =4 ; -if (fill_files_note (info->notes + info->numnote) ==0 ) { +if (fill_files_note (info->notes + info->numnote, cprm) ==0 ) { info->notes_files = info->notes + info->numnote; info->numnote++; }
fs/coredump.c +21 -1
@@ -54,6 +54,7 @@#include <trace/events/sched.h> static bool dump_vma_snapshot (struct coredump_params *cprm); +static void free_vma_snapshot (struct coredump_params *cprm);int core_uses_pid;unsigned int core_pipe_limit;
@@ -768,7 +769,7 @@ void do_coredump(const kernel_siginfo_tdump_emit (&cprm,"" ,1 ); }file_end_write (cprm.file); -kvfree (cprm.vma_meta); +free_vma_snapshot (&cprm); }if (ispipe && core_pipe_limit)wait_for_dump_helpers (cprm.file);
@@ -1045,6 +1046,20 @@ static struct vm_area_struct *next_vma(sreturn gate_vma; } +static void free_vma_snapshot (struct coredump_params *cprm) +{ +if (cprm->vma_meta) { +int i; +for (i =0 ; i < cprm->vma_count; i++) { +struct file *file = cprm->vma_meta[i].file; +if (file) +fput (file); + } +kvfree (cprm->vma_meta); + cprm->vma_meta =NULL ; + } +} +/* * Under the mmap_lock, take a snapshot of relevant information about the task's * VMAs.
@@ -1081,6 +1096,11 @@ static bool dump_vma_snapshot(struct cor m->end = vma->vm_end; m->flags = vma->vm_flags; m->dump_size =vma_dump_size (vma, cprm->mm_flags); + m->pgoff = vma->vm_pgoff; + + m->file = vma->vm_file; +if (m->file) +get_file (m->file); }mmap_write_unlock (mm);
include/linux/coredump.h +2 -0
@@ -12,6 +12,8 @@ struct core_vma_metadata {unsigned long start, end;unsigned long flags;unsigned long dump_size; +unsigned long pgoff; +struct file *file; };extern int core_uses_pid;
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.16.19 release. There are 1017 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 Thu, 07 Apr 2022 07:01:33 +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/v5.x/stable-review/patch-5.16.19-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.16.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels:
Signature · 1 line
Florian
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.16.19 release. There are 1017 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 Thu, 07 Apr 2022 07:01:33 +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/v5.x/stable-review/patch-5.16.19-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.16.y
and the diffstat can be found below.thanks,
greg k-h
Build failed on my system. The following is the problem commit. There are no changes to the config between 5.16.18 and this build.
Ranjani Sridharan <[email protected]>
ASoC: SOF: Intel: hda: Remove link assignment limitation
CC [M] sound/soc/sof/intel/hda-dai.osound/soc/sof/intel/hda-dai.c: In function ‘hda_link_stream_assign’:sound/soc/sof/intel/hda-dai.c:86:24: error: implicit declaration of function ‘get_chip_info’; did you mean ‘get_group_info’? [-Werror=implicit-function-declaration]
86 | chip = get_chip_info(sdev->pdata);
| ^~~~~~~~~~~~~
| get_group_infosound/soc/sof/intel/hda-dai.c:86:22: error: assignment to ‘const struct sof_intel_dsp_desc *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
86 | chip = get_chip_info(sdev->pdata);
| ^sound/soc/sof/intel/hda-dai.c:94:35: error: ‘const struct sof_intel_dsp_desc’ has no member named ‘quirks’
94 | if (!(chip->quirks & SOF_INTEL_PROCEN_FMT_QUIRK)) {
| ^~sound/soc/sof/intel/hda-dai.c:94:46: error: ‘SOF_INTEL_PROCEN_FMT_QUIRK’ undeclared (first use in this function)
94 | if (!(chip->quirks & SOF_INTEL_PROCEN_FMT_QUIRK)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~sound/soc/sof/intel/hda-dai.c:94:46: note: each undeclared identifier is reported only once for each function it appears in
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:287: sound/soc/sof/intel/hda-dai.o] Error 1
make[3]: *** [scripts/Makefile.build:549: sound/soc/sof/intel] Error 2
make[2]: *** [scripts/Makefile.build:549: sound/soc/sof] Error 2
make[1]: *** [scripts/Makefile.build:549: sound/soc] Error 2
make: *** [Makefile:1846: sound] Error 2
thanks,
-- Shuah
Quoted 18 lines · Shuah Khan
Quoted 16 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.16.19 release. There are 1017 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 Thu, 07 Apr 2022 07:01:33 +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/v5.x/stable-review/patch-5.16.19-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.16.y
and the diffstat can be found below.thanks,
Quoted 8 lines
Quoted 2 lines
greg k-h
Build failed on my system. The following is the problem commit. There are no changes to the config between 5.16.18 and this build.
Ranjani Sridharan <[email protected]>
ASoC: SOF: Intel: hda: Remove link assignment limitation
I saw the same build error, after applying the following patches it builds fine again.198fa4bcf6a1 ("ASoC: SOF: intel: add snd_sof_dsp_check_sdw_irq ops") 81ed6770ba67 ("ASoC: SOF: Intel: hda: expose get_chip_info()")
Cheers,
Anders
Quoted 26 lines
CC [M]
sound/soc/sof/intel/hda-dai.osound/soc/sof/intel/hda-dai.c: In function ‘hda_link_stream_assign’:sound/soc/sof/intel/hda-dai.c:86:24: error: implicit declaration of function ‘get_chip_info’; did you mean ‘get_group_info’? [-Werror=implicit-function-declaration]86 | chip = get_chip_info(sdev->pdata); | ^~~~~~~~~~~~~ | get_group_info sound/soc/sof/intel/hda-dai.c:86:22: error: assignment to ‘const struct sof_intel_dsp_desc *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion] 86 | chip = get_chip_info(sdev->pdata); | ^ sound/soc/sof/intel/hda-dai.c:94:35: error: ‘const struct sof_intel_dsp_desc’ has no member named ‘quirks’ 94 | if (!(chip->quirks & SOF_INTEL_PROCEN_FMT_QUIRK)) { | ^~ sound/soc/sof/intel/hda-dai.c:94:46: error: ‘SOF_INTEL_PROCEN_FMT_QUIRK’ undeclared (first use in this function) 94 | if (!(chip->quirks & SOF_INTEL_PROCEN_FMT_QUIRK)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/sof/intel/hda-dai.c:94:46: note: each undeclared identifier is reported only once for each function it appears in
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:287:sound/soc/sof/intel/hda-dai.o] Error 1
make[3]: *** [scripts/Makefile.build:549:sound/soc/sof/intel] Error 2
make[2]: *** [scripts/Makefile.build:549:sound/soc/sof] Error 2
make[1]: *** [scripts/Makefile.build:549:sound/soc] Error 2
make: *** [Makefile:1846: sound] Error 2thanks,
-- Shuah
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org
Quoted 23 lines · Anders Roxell
Quoted 21 lines · Shuah Khan
Quoted 18 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.16.19 release. There are 1017 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 Thu, 07 Apr 2022 07:01:33 +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/v5.x/stable-review/patch-5.16.19-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.16.y
and the diffstat can be found below.thanks,
greg k-h
Quoted 8 lines
Quoted 5 lines
Build failed on my system. The following is the problem commit. There are no changes to the config between 5.16.18 and this build.
Ranjani Sridharan <[email protected]>
ASoC: SOF: Intel: hda: Remove link assignment limitationI saw the same build error, after applying the following patches it builds fine again.
I'm sorry managed to grab the wrong commit, This is the two commits:a792bfc1c2bc ("ASoC: SOF: Intel: hda-stream: limit PROCEN workaround") 81ed6770ba67 ("ASoC: SOF: Intel: hda: expose get_chip_info()")
Quoted 34 lines
Cheers,
AndersQuoted 24 lines
CC [M]
sound/soc/sof/intel/hda-dai.osound/soc/sof/intel/hda-dai.c: In function ‘hda_link_stream_assign’:sound/soc/sof/intel/hda-dai.c:86:24: error: implicit declaration of function ‘get_chip_info’; did you mean ‘get_group_info’? [-Werror=implicit-function-declaration]86 | chip = get_chip_info(sdev->pdata); | ^~~~~~~~~~~~~ | get_group_info sound/soc/sof/intel/hda-dai.c:86:22: error: assignment to ‘const struct sof_intel_dsp_desc *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion] 86 | chip = get_chip_info(sdev->pdata); | ^ sound/soc/sof/intel/hda-dai.c:94:35: error: ‘const struct sof_intel_dsp_desc’ has no member named ‘quirks’ 94 | if (!(chip->quirks & SOF_INTEL_PROCEN_FMT_QUIRK)) { | ^~ sound/soc/sof/intel/hda-dai.c:94:46: error: ‘SOF_INTEL_PROCEN_FMT_QUIRK’ undeclared (first use in this function) 94 | if (!(chip->quirks & SOF_INTEL_PROCEN_FMT_QUIRK)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/sof/intel/hda-dai.c:94:46: note: each undeclared identifier is reported only once for each function it appears in
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:287:sound/soc/sof/intel/hda-dai.o] Error 1
make[3]: *** [scripts/Makefile.build:549:sound/soc/sof/intel] Error 2
make[2]: *** [scripts/Makefile.build:549:sound/soc/sof] Error 2
make[1]: *** [scripts/Makefile.build:549:sound/soc] Error 2
make: *** [Makefile:1846: sound] Error 2Quoted 2 lines
thanks,
-- Shuah--
Linaro LKFT
https://lkft.linaro.org
Greg Kroah-Hartman
maintainerQuoted 17 lines · Shuah Khan
Quoted 16 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.16.19 release. There are 1017 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 Thu, 07 Apr 2022 07:01:33 +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/v5.x/stable-review/patch-5.16.19-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.16.y
and the diffstat can be found below.thanks,
Quoted 7 lines
Quoted 2 lines
greg k-h
Build failed on my system. The following is the problem commit. There are no changes to the config between 5.16.18 and this build.
Ranjani Sridharan <[email protected]>
ASoC: SOF: Intel: hda: Remove link assignment limitation
Now dropped from 5.10, 5.15, and 5.16 queues, thanks!
greg k-h
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.16.19 release. There are 1017 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 Thu, 07 Apr 2022 07:01:33 +0000. Anything received after that time might be too late.
Build results:
total: 155 pass: 155 fail: 0 Qemu test results: total: 488 pass: 488 fail: 0
Guenter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.16.19 release. There are 1017 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 Thu, 07 Apr 2022 07:01:33 +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/v5.x/stable-review/patch-5.16.19-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.16.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v5.16:
10 builds: 10 pass, 0 fail
28 boots: 28 pass, 0 fail
122 tests: 122 pass, 0 failLinux version: 5.16.19-rc1-gef4d007f65de
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04Jon
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.16.19 release. There are 1017 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 Thu, 07 Apr 2022 07:01:33 +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/v5.x/stable-review/patch-5.16.19-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.16.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v5.16:
10 builds: 10 pass, 0 fail
28 boots: 28 pass, 0 fail
122 tests: 122 pass, 0 failLinux version: 5.16.19-rc1-g5d3da1624789
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04Jon
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.16.19 release. There are 1017 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 Thu, 07 Apr 2022 07:01:33 +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/v5.x/stable-review/patch-5.16.19-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.16.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.16.19 release. There are 1017 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 Thu, 07 Apr 2022 07:01:33 +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/v5.x/stable-review/patch-5.16.19-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.16.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.
NOTE:
Anders enabled extra kconfigs to reproduce Shuah reported build regression and proposed two additional two commits for the fix.
## Build
* kernel: 5.16.19-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git branch: linux-5.16.y
* git commit: 5d3da1624789df6fa741a30aa6cd98c541f25528
* git describe: v5.16.18-1018-g5d3da1624789
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.16.y/build/v5.16.18-1018-g5d3da1624789
## Test Regressions (compared to v5.16.18-959-gef4d007f65de) No test regressions found.
## Metric Regressions (compared to v5.16.18-959-gef4d007f65de) No metric regressions found.
## Test Fixes (compared to v5.16.18-959-gef4d007f65de) No test fixes found.
## Metric Fixes (compared to v5.16.18-959-gef4d007f65de) No metric fixes found.
## Test result summary
total: 105413, pass: 88695, fail: 1159, skip: 14378, xfail: 1181
## Build Summary
* arc: 10 total, 10 passed, 0 failed
* arm: 291 total, 291 passed, 0 failed
* arm64: 41 total, 41 passed, 0 failed
* dragonboard-410c: 1 total, 1 passed, 0 failed
* hi6220-hikey: 1 total, 1 passed, 0 failed
* i386: 40 total, 40 passed, 0 failed
* juno-r2: 1 total, 1 passed, 0 failed
* mips: 37 total, 37 passed, 0 failed
* parisc: 12 total, 12 passed, 0 failed
* powerpc: 60 total, 54 passed, 6 failed
* riscv: 27 total, 22 passed, 5 failed
* s390: 21 total, 21 passed, 0 failed
* sh: 24 total, 24 passed, 0 failed
* sparc: 12 total, 12 passed, 0 failed
* x15: 1 total, 1 passed, 0 failed
* x86: 1 total, 1 passed, 0 failed
* x86_64: 41 total, 41 passed, 0 failed
## Test suites summary
* fwts
* igt-gpu-tools
* kselftest-
* kselftest-android
* kselftest-arm64
* kselftest-bpf
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-drivers
* kselftest-efivarfs
* kselftest-filesystems
* kselftest-firmware
* kselftest-fpu
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-kvm
* kselftest-lib
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mount
* kselftest-mqueue
* kselftest-net
* kselftest-netfilter
* kselftest-nsfs
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-splice
* kselftest-static_keys
* kselftest-sync
* kselftest-sysctl
* kselftest-tc-testing
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-vm
* kselftest-x86
* kselftest-zram
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* linux-log-parser
* 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-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-open-posix-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* ltp-tracin[
* ltp-tracing-tests
* network-basic-tests
* packetdrill
* perf
* perf/Zstd-perf.data-compression
* rcutorture
* ssuite
* v4l2-compliance
* vdso
--
Linaro LKFT
https://lkft.linaro.org
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.16.19 release. There are 1017 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 Thu, 07 Apr 2022 07:01:33 +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/v5.x/stable-review/patch-5.16.19-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.16.y
and the diffstat can be found below.thanks,
greg k-h
5.16.19-rc1 Successfully Compiled and booted on my Raspberry PI 4b (8g) (bcm2711)
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.16.19 release. There are 1017 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.
Successfully cross-compiled for arm64 (bcm2711_defconfig, gcc 10.2.0) and powerpc (ps3_defconfig, gcc 11.2.0).
Signature · 1 line
An old man doll... just what I always wanted! - Clara