Commit a264cf5e81c7 ("scsi: ibmvfc: Fix command state accounting and stale response detection")
introduced a regression in detecting duplicate responses. This was observed
in test where a command was sent to the VIOS and completed before
ibmvfc_send_event set the active flag to 1, which resulted in the
atomic_dec_if_positive call in ibmvfc_handle_crq thinking this was a
duplicate response, which resulted in scsi_done not getting called, so we
then hit a scsi command timeout for this command once the timeout expires.
This simply ensures the active flag gets set prior to making the hcall to
send the command to the VIOS, in order to close this window.
Fixes: a264cf5e81c7 ("scsi: ibmvfc: Fix command state accounting and stale response detection")
Cc: stable(a)vger.kernel.org
Signed-off-by: Brian King <brking(a)linux.vnet.ibm.com>
---
drivers/scsi/ibmvscsi/ibmvfc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index a4b0a12f8a97..d0eab5700dc5 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -1696,6 +1696,7 @@ static int ibmvfc_send_event(struct ibmvfc_event *evt,
spin_lock_irqsave(&evt->queue->l_lock, flags);
list_add_tail(&evt->queue_list, &evt->queue->sent);
+ atomic_set(&evt->active, 1);
mb();
@@ -1710,6 +1711,7 @@ static int ibmvfc_send_event(struct ibmvfc_event *evt,
be64_to_cpu(crq_as_u64[1]));
if (rc) {
+ atomic_set(&evt->active, 0);
list_del(&evt->queue_list);
spin_unlock_irqrestore(&evt->queue->l_lock, flags);
del_timer(&evt->timer);
@@ -1737,7 +1739,6 @@ static int ibmvfc_send_event(struct ibmvfc_event *evt,
evt->done(evt);
} else {
- atomic_set(&evt->active, 1);
spin_unlock_irqrestore(&evt->queue->l_lock, flags);
ibmvfc_trc_start(evt);
}
--
2.27.0
The function s5p_aes_probe() does not perform sufficient error
checking after executing platform_get_resource(), thus fix it.
Fixes: c2afad6c6105 ("crypto: s5p-sss - Add HASH support for Exynos")
Signed-off-by: Tang Bin <tangbin(a)cmss.chinamobile.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski(a)canonical.com>
---
Changes from v1
- add fixed title
---
drivers/crypto/s5p-sss.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
index 55aa3a711..7717e9e59 100644
--- a/drivers/crypto/s5p-sss.c
+++ b/drivers/crypto/s5p-sss.c
@@ -2171,6 +2171,8 @@ static int s5p_aes_probe(struct platform_device *pdev)
variant = find_s5p_sss_version(pdev);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res)
+ return -EINVAL;
/*
* Note: HASH and PRNG uses the same registers in secss, avoid
--
2.20.1.windows.1
From: Herve Codina <herve.codina(a)bootlin.com>
[ Upstream commit 6636fec29cdf6665bd219564609e8651f6ddc142 ]
On SPEAr3xx, ethernet driver is not compatible with the SPEAr600
one.
Indeed, SPEAr3xx uses an earlier version of this IP (v3.40) and
needs some driver tuning compare to SPEAr600.
The v3.40 IP support was added to stmmac driver and this patch
fixes this issue and use the correct compatible string for
SPEAr3xx
Signed-off-by: Herve Codina <herve.codina(a)bootlin.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
arch/arm/boot/dts/spear3xx.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/spear3xx.dtsi b/arch/arm/boot/dts/spear3xx.dtsi
index 118135d75899..4e4166d96b26 100644
--- a/arch/arm/boot/dts/spear3xx.dtsi
+++ b/arch/arm/boot/dts/spear3xx.dtsi
@@ -53,7 +53,7 @@ dma@fc400000 {
};
gmac: eth@e0800000 {
- compatible = "st,spear600-gmac";
+ compatible = "snps,dwmac-3.40a";
reg = <0xe0800000 0x8000>;
interrupts = <23 22>;
interrupt-names = "macirq", "eth_wake_irq";
--
2.33.0
From: Herve Codina <herve.codina(a)bootlin.com>
[ Upstream commit 6636fec29cdf6665bd219564609e8651f6ddc142 ]
On SPEAr3xx, ethernet driver is not compatible with the SPEAr600
one.
Indeed, SPEAr3xx uses an earlier version of this IP (v3.40) and
needs some driver tuning compare to SPEAr600.
The v3.40 IP support was added to stmmac driver and this patch
fixes this issue and use the correct compatible string for
SPEAr3xx
Signed-off-by: Herve Codina <herve.codina(a)bootlin.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
arch/arm/boot/dts/spear3xx.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/spear3xx.dtsi b/arch/arm/boot/dts/spear3xx.dtsi
index 118135d75899..4e4166d96b26 100644
--- a/arch/arm/boot/dts/spear3xx.dtsi
+++ b/arch/arm/boot/dts/spear3xx.dtsi
@@ -53,7 +53,7 @@ dma@fc400000 {
};
gmac: eth@e0800000 {
- compatible = "st,spear600-gmac";
+ compatible = "snps,dwmac-3.40a";
reg = <0xe0800000 0x8000>;
interrupts = <23 22>;
interrupt-names = "macirq", "eth_wake_irq";
--
2.33.0
From: Filipe Manana <fdmanana(a)suse.com>
[ Upstream commit 77a5b9e3d14cbce49ceed2766b2003c034c066dc ]
Currently inode_in_dir() ignores errors returned from
btrfs_lookup_dir_index_item() and from btrfs_lookup_dir_item(), treating
any errors as if the directory entry does not exists in the fs/subvolume
tree, which is obviously not correct, as we can get errors such as -EIO
when reading extent buffers while searching the fs/subvolume's tree.
Fix that by making inode_in_dir() return the errors and making its only
caller, add_inode_ref(), deal with returned errors as well.
Signed-off-by: Filipe Manana <fdmanana(a)suse.com>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
fs/btrfs/tree-log.c | 47 ++++++++++++++++++++++++++++-----------------
1 file changed, 29 insertions(+), 18 deletions(-)
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index fbcfee38583b..31946b4fa5ba 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -901,9 +901,11 @@ static noinline int drop_one_dir_item(struct btrfs_trans_handle *trans,
}
/*
- * helper function to see if a given name and sequence number found
- * in an inode back reference are already in a directory and correctly
- * point to this inode
+ * See if a given name and sequence number found in an inode back reference are
+ * already in a directory and correctly point to this inode.
+ *
+ * Returns: < 0 on error, 0 if the directory entry does not exists and 1 if it
+ * exists.
*/
static noinline int inode_in_dir(struct btrfs_root *root,
struct btrfs_path *path,
@@ -912,29 +914,35 @@ static noinline int inode_in_dir(struct btrfs_root *root,
{
struct btrfs_dir_item *di;
struct btrfs_key location;
- int match = 0;
+ int ret = 0;
di = btrfs_lookup_dir_index_item(NULL, root, path, dirid,
index, name, name_len, 0);
- if (di && !IS_ERR(di)) {
+ if (IS_ERR(di)) {
+ if (PTR_ERR(di) != -ENOENT)
+ ret = PTR_ERR(di);
+ goto out;
+ } else if (di) {
btrfs_dir_item_key_to_cpu(path->nodes[0], di, &location);
if (location.objectid != objectid)
goto out;
- } else
+ } else {
goto out;
- btrfs_release_path(path);
+ }
+ btrfs_release_path(path);
di = btrfs_lookup_dir_item(NULL, root, path, dirid, name, name_len, 0);
- if (di && !IS_ERR(di)) {
- btrfs_dir_item_key_to_cpu(path->nodes[0], di, &location);
- if (location.objectid != objectid)
- goto out;
- } else
+ if (IS_ERR(di)) {
+ ret = PTR_ERR(di);
goto out;
- match = 1;
+ } else if (di) {
+ btrfs_dir_item_key_to_cpu(path->nodes[0], di, &location);
+ if (location.objectid == objectid)
+ ret = 1;
+ }
out:
btrfs_release_path(path);
- return match;
+ return ret;
}
/*
@@ -1314,10 +1322,12 @@ static noinline int add_inode_ref(struct btrfs_trans_handle *trans,
if (ret)
goto out;
- /* if we already have a perfect match, we're done */
- if (!inode_in_dir(root, path, btrfs_ino(BTRFS_I(dir)),
- btrfs_ino(BTRFS_I(inode)), ref_index,
- name, namelen)) {
+ ret = inode_in_dir(root, path, btrfs_ino(BTRFS_I(dir)),
+ btrfs_ino(BTRFS_I(inode)), ref_index,
+ name, namelen);
+ if (ret < 0) {
+ goto out;
+ } else if (ret == 0) {
/*
* look for a conflicting back reference in the
* metadata. if we find one we have to unlink that name
@@ -1350,6 +1360,7 @@ static noinline int add_inode_ref(struct btrfs_trans_handle *trans,
btrfs_update_inode(trans, root, inode);
}
+ /* Else, ret == 1, we already have a perfect match, we're done. */
ref_ptr = (unsigned long)(ref_ptr + ref_struct_size) + namelen;
kfree(name);
--
2.33.0
The patch titled
Subject: mm: filemap: check if THP has hwpoisoned subpage for PMD page fault
has been added to the -mm tree. Its filename is
mm-filemap-check-if-thp-has-hwpoisoned-subpage-for-pmd-page-fault.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-filemap-check-if-thp-has-hwpoiβ¦
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-filemap-check-if-thp-has-hwpoiβ¦
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Yang Shi <shy828301(a)gmail.com>
Subject: mm: filemap: check if THP has hwpoisoned subpage for PMD page fault
When handling shmem page fault the THP with corrupted subpage could be PMD
mapped if certain conditions are satisfied. But kernel is supposed to
send SIGBUS when trying to map hwpoisoned page.
There are two paths which may do PMD map: fault around and regular fault.
Before commit f9ce0be71d1f ("mm: Cleanup faultaround and finish_fault()
codepaths") the thing was even worse in fault around path. The THP could
be PMD mapped as long as the VMA fits regardless what subpage is accessed
and corrupted. After this commit as long as head page is not corrupted
the THP could be PMD mapped.
In the regular fault path the THP could be PMD mapped as long as the
corrupted page is not accessed and the VMA fits.
This loophole could be fixed by iterating every subpage to check if any of
them is hwpoisoned or not, but it is somewhat costly in page fault path.
So introduce a new page flag called HasHWPoisoned on the first tail page.
It indicates the THP has hwpoisoned subpage(s). It is set if any subpage
of THP is found hwpoisoned by memory failure and after the refcount is
bumped successfully, then cleared when the THP is freed or split.
The soft offline path doesn't need this since soft offline handler just
marks a subpage hwpoisoned when the subpage is migrated successfully. But
shmem THP didn't get split then migrated at all.
Link: https://lkml.kernel.org/r/20211020210755.23964-3-shy828301@gmail.com
Fixes: 800d8c63b2e9 ("shmem: add huge pages support")
Signed-off-by: Yang Shi <shy828301(a)gmail.com>
Reviewed-by: Naoya Horiguchi <naoya.horiguchi(a)nec.com>
Suggested-by: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Cc: <stable(a)vger.kernel.org>
Cc: Hugh Dickins <hughd(a)google.com>
Cc: Matthew Wilcox <willy(a)infradead.org>
Cc: Oscar Salvador <osalvador(a)suse.de>
Cc: Peter Xu <peterx(a)redhat.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/page-flags.h | 23 +++++++++++++++++++++++
mm/huge_memory.c | 2 ++
mm/memory-failure.c | 14 ++++++++++++++
mm/memory.c | 9 +++++++++
mm/page_alloc.c | 4 +++-
5 files changed, 51 insertions(+), 1 deletion(-)
--- a/include/linux/page-flags.h~mm-filemap-check-if-thp-has-hwpoisoned-subpage-for-pmd-page-fault
+++ a/include/linux/page-flags.h
@@ -171,6 +171,15 @@ enum pageflags {
/* Compound pages. Stored in first tail page's flags */
PG_double_map = PG_workingset,
+#ifdef CONFIG_MEMORY_FAILURE
+ /*
+ * Compound pages. Stored in first tail page's flags.
+ * Indicates that at least one subpage is hwpoisoned in the
+ * THP.
+ */
+ PG_has_hwpoisoned = PG_mappedtodisk,
+#endif
+
/* non-lru isolated movable page */
PG_isolated = PG_reclaim,
@@ -668,6 +677,20 @@ PAGEFLAG_FALSE(DoubleMap)
TESTSCFLAG_FALSE(DoubleMap)
#endif
+#if defined(CONFIG_MEMORY_FAILURE) && defined(CONFIG_TRANSPARENT_HUGEPAGE)
+/*
+ * PageHasHWPoisoned indicates that at least one subpage is hwpoisoned in the
+ * compound page.
+ *
+ * This flag is set by hwpoison handler. Cleared by THP split or free page.
+ */
+PAGEFLAG(HasHWPoisoned, has_hwpoisoned, PF_SECOND)
+ TESTSCFLAG(HasHWPoisoned, has_hwpoisoned, PF_SECOND)
+#else
+PAGEFLAG_FALSE(HasHWPoisoned)
+ TESTSCFLAG_FALSE(HasHWPoisoned)
+#endif
+
/*
* Check if a page is currently marked HWPoisoned. Note that this check is
* best effort only and inherently racy: there is no way to synchronize with
--- a/mm/huge_memory.c~mm-filemap-check-if-thp-has-hwpoisoned-subpage-for-pmd-page-fault
+++ a/mm/huge_memory.c
@@ -2426,6 +2426,8 @@ static void __split_huge_page(struct pag
/* lock lru list/PageCompound, ref frozen by page_ref_freeze */
lruvec = lock_page_lruvec(head);
+ ClearPageHasHWPoisoned(head);
+
for (i = nr - 1; i >= 1; i--) {
__split_huge_page_tail(head, i, lruvec, list);
/* Some pages can be beyond EOF: drop them from page cache */
--- a/mm/memory.c~mm-filemap-check-if-thp-has-hwpoisoned-subpage-for-pmd-page-fault
+++ a/mm/memory.c
@@ -3907,6 +3907,15 @@ vm_fault_t do_set_pmd(struct vm_fault *v
return ret;
/*
+ * Just backoff if any subpage of a THP is corrupted otherwise
+ * the corrupted page may mapped by PMD silently to escape the
+ * check. This kind of THP just can be PTE mapped. Access to
+ * the corrupted subpage should trigger SIGBUS as expected.
+ */
+ if (unlikely(PageHasHWPoisoned(page)))
+ return ret;
+
+ /*
* Archs like ppc64 need additional space to store information
* related to pte entry. Use the preallocated table for that.
*/
--- a/mm/memory-failure.c~mm-filemap-check-if-thp-has-hwpoisoned-subpage-for-pmd-page-fault
+++ a/mm/memory-failure.c
@@ -1694,6 +1694,20 @@ try_again:
}
if (PageTransHuge(hpage)) {
+ /*
+ * The flag must be set after the refcount is bumped
+ * otherwise it may race with THP split.
+ * And the flag can't be set in get_hwpoison_page() since
+ * it is called by soft offline too and it is just called
+ * for !MF_COUNT_INCREASE. So here seems to be the best
+ * place.
+ *
+ * Don't need care about the above error handling paths for
+ * get_hwpoison_page() since they handle either free page
+ * or unhandlable page. The refcount is bumped iff the
+ * page is a valid handlable page.
+ */
+ SetPageHasHWPoisoned(hpage);
if (try_to_split_thp_page(p, "Memory Failure") < 0) {
action_result(pfn, MF_MSG_UNSPLIT_THP, MF_IGNORED);
res = -EBUSY;
--- a/mm/page_alloc.c~mm-filemap-check-if-thp-has-hwpoisoned-subpage-for-pmd-page-fault
+++ a/mm/page_alloc.c
@@ -1312,8 +1312,10 @@ static __always_inline bool free_pages_p
VM_BUG_ON_PAGE(compound && compound_order(page) != order, page);
- if (compound)
+ if (compound) {
ClearPageDoubleMap(page);
+ ClearPageHasHWPoisoned(page);
+ }
for (i = 1; i < (1 << order); i++) {
if (compound)
bad += free_tail_pages_check(page, page + i);
_
Patches currently in -mm which might be from shy828301(a)gmail.com are
mm-hwpoison-remove-the-unnecessary-thp-check.patch
mm-filemap-check-if-thp-has-hwpoisoned-subpage-for-pmd-page-fault.patch
mm-migrate-make-demotion-knob-depend-on-migration.patch
mm-filemap-coding-style-cleanup-for-filemap_map_pmd.patch
mm-hwpoison-refactor-refcount-check-handling.patch
mm-shmem-dont-truncate-page-if-memory-failure-happens.patch
mm-hwpoison-handle-non-anonymous-thp-correctly.patch
The patch titled
Subject: mm: hwpoison: remove the unnecessary THP check
has been added to the -mm tree. Its filename is
mm-hwpoison-remove-the-unnecessary-thp-check.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-hwpoison-remove-the-unnecessarβ¦
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-hwpoison-remove-the-unnecessarβ¦
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Yang Shi <shy828301(a)gmail.com>
Subject: mm: hwpoison: remove the unnecessary THP check
When handling THP hwpoison checked if the THP is in allocation or free
stage since hwpoison may mistreat it as hugetlb page. After commit
415c64c1453a ("mm/memory-failure: split thp earlier in memory error
handling") the problem has been fixed, so this check is no longer needed.
Remove it. The side effect of the removal is hwpoison may report unsplit
THP instead of unknown error for shmem THP. It seems not like a big deal.
The following patch "mm: filemap: check if THP has hwpoisoned subpage for
PMD page fault" depends on this, which fixes shmem THP with hwpoisoned
subpage(s) are mapped PMD wrongly. So this patch needs to be backported
to -stable as well.
Link: https://lkml.kernel.org/r/20211020210755.23964-2-shy828301@gmail.com
Signed-off-by: Yang Shi <shy828301(a)gmail.com>
Suggested-by: Naoya Horiguchi <naoya.horiguchi(a)nec.com>
Acked-by: Naoya Horiguchi <naoya.horiguchi(a)nec.com>
Cc: Hugh Dickins <hughd(a)google.com>
Cc: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Cc: Matthew Wilcox <willy(a)infradead.org>
Cc: Oscar Salvador <osalvador(a)suse.de>
Cc: Peter Xu <peterx(a)redhat.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/memory-failure.c | 14 --------------
1 file changed, 14 deletions(-)
--- a/mm/memory-failure.c~mm-hwpoison-remove-the-unnecessary-thp-check
+++ a/mm/memory-failure.c
@@ -1147,20 +1147,6 @@ static int __get_hwpoison_page(struct pa
if (!HWPoisonHandlable(head))
return -EBUSY;
- if (PageTransHuge(head)) {
- /*
- * Non anonymous thp exists only in allocation/free time. We
- * can't handle such a case correctly, so let's give it up.
- * This should be better than triggering BUG_ON when kernel
- * tries to touch the "partially handled" page.
- */
- if (!PageAnon(head)) {
- pr_err("Memory failure: %#lx: non anonymous thp\n",
- page_to_pfn(page));
- return 0;
- }
- }
-
if (get_page_unless_zero(head)) {
if (head == compound_head(page))
return 1;
_
Patches currently in -mm which might be from shy828301(a)gmail.com are
mm-hwpoison-remove-the-unnecessary-thp-check.patch
mm-filemap-check-if-thp-has-hwpoisoned-subpage-for-pmd-page-fault.patch
mm-migrate-make-demotion-knob-depend-on-migration.patch
mm-filemap-coding-style-cleanup-for-filemap_map_pmd.patch
mm-hwpoison-refactor-refcount-check-handling.patch
mm-shmem-dont-truncate-page-if-memory-failure-happens.patch
mm-hwpoison-handle-non-anonymous-thp-correctly.patch
Hello,
We ran automated tests on a recent commit from this kernel tree:
Kernel repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Commit: fe024e004fa3 - Linux 5.14.14
The results of these automated tests are provided below.
Overall result: PASSED
Merge: OK
Compile: OK
Tests: OK
Targeted tests: NO
All kernel binaries, config files, and logs are available for download here:
https://arr-cki-prod-datawarehouse-public.s3.amazonaws.com/index.html?prefiβ¦
Please reply to this email if you have any questions about the tests that we
ran or if you have any suggestions on how to make future tests more effective.
,-. ,-.
( C ) ( K ) Continuous
`-',-.`-' Kernel
( I ) Integration
`-'
______________________________________________________________________________
Compile testing
---------------
We compiled the kernel for 4 architectures:
aarch64:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
ppc64le:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
s390x:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
x86_64:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
Hardware testing
----------------
We booted each kernel and ran the following tests:
aarch64:
Host 1:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ Networking bridge: sanity - mlx5
β‘β‘β‘ Ethernet drivers sanity - mlx5
Host 2:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 3:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β Boot test
β Reboot test
β ACPI table test
β ACPI enabled test
β‘β‘β‘ LTP - cve
β‘β‘β‘ LTP - sched
β‘β‘β‘ LTP - syscalls
β‘β‘β‘ LTP - can
β‘β‘β‘ LTP - commands
β‘β‘β‘ LTP - containers
β‘β‘β‘ LTP - dio
β‘β‘β‘ LTP - fs
β‘β‘β‘ LTP - fsx
β‘β‘β‘ LTP - math
β‘β‘β‘ LTP - hugetlb
β‘β‘β‘ LTP - mm
β‘β‘β‘ LTP - nptl
β‘β‘β‘ LTP - pty
β‘β‘β‘ LTP - ipc
β‘β‘β‘ LTP - tracing
β‘β‘β‘ LTP: openposix test suite
β‘β‘β‘ CIFS Connectathon
β‘β‘β‘ POSIX pjd-fstest suites
β‘β‘β‘ NFS Connectathon
β‘β‘β‘ Loopdev Sanity
β‘β‘β‘ jvm - jcstress tests
β‘β‘β‘ Memory: fork_mem
β‘β‘β‘ Memory function: memfd_create
β‘β‘β‘ AMTU (Abstract Machine Test Utility)
β‘β‘β‘ Networking bridge: sanity
β‘β‘β‘ Ethernet drivers sanity
β‘β‘β‘ Networking socket: fuzz
β‘β‘β‘ Networking route: pmtu
β‘β‘β‘ Networking route_func - local
β‘β‘β‘ Networking route_func - forward
β‘β‘β‘ Networking TCP: keepalive test
β‘β‘β‘ Networking UDP: socket
β‘β‘β‘ Networking cki netfilter test
β‘β‘β‘ Networking tunnel: geneve basic test
β‘β‘β‘ Networking tunnel: gre basic
β‘β‘β‘ L2TP basic test
β‘β‘β‘ Networking tunnel: vxlan basic
β‘β‘β‘ Networking ipsec: basic netns - transport
β‘β‘β‘ Networking ipsec: basic netns - tunnel
β‘β‘β‘ Libkcapi AF_ALG test
β‘β‘β‘ pciutils: update pci ids test
β‘β‘β‘ ALSA PCM loopback test
β‘β‘β‘ ALSA Control (mixer) Userspace Element test
β‘β‘β‘ storage: dm/common
β‘β‘β‘ lvm snapper test
β‘β‘β‘ storage: SCSI VPD
β‘β‘β‘ trace: ftrace/tracer
π§ β‘β‘β‘ xarray-idr-radixtree-test
π§ β‘β‘β‘ i2c: i2cdetect sanity
π§ β‘β‘β‘ Firmware test suite
π§ β‘β‘β‘ Memory function: kaslr
π§ β‘β‘β‘ Networking: igmp conformance test
π§ β‘β‘β‘ audit: audit testsuite test
π§ β‘β‘β‘ lvm cache test
Host 4:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β Boot test
β Reboot test
β‘β‘β‘ xfstests - ext4
β‘β‘β‘ xfstests - xfs
β‘β‘β‘ IPMI driver test
β‘β‘β‘ IPMItool loop stress test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
β‘β‘β‘ stress: stress-ng - interrupt
β‘β‘β‘ stress: stress-ng - cpu
β‘β‘β‘ stress: stress-ng - cpu-cache
β‘β‘β‘ stress: stress-ng - memory
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ stress: stress-ng - os
Host 5:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ Networking bridge: sanity - mlx5
β‘β‘β‘ Ethernet drivers sanity - mlx5
Host 6:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - srp
ppc64le:
Host 1:
β Boot test
β Reboot test
π§ β Storage blktests - srp
Host 2:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ xfstests - ext4
β‘β‘β‘ xfstests - xfs
β‘β‘β‘ IPMI driver test
β‘β‘β‘ IPMItool loop stress test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ Storage: lvm device-mapper test - upstream
Host 3:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 4:
β Boot test
β Reboot test
β LTP - cve
β LTP - sched
β LTP - syscalls
β LTP - can
β LTP - commands
β LTP - containers
β LTP - dio
β LTP - fs
β LTP - fsx
β LTP - math
β LTP - hugetlb
β LTP - mm
β LTP - nptl
β LTP - pty
β LTP - ipc
β LTP - tracing
β LTP: openposix test suite
β CIFS Connectathon
β POSIX pjd-fstest suites
β NFS Connectathon
β Loopdev Sanity
β jvm - jcstress tests
β Memory: fork_mem
β Memory function: memfd_create
β AMTU (Abstract Machine Test Utility)
β Networking bridge: sanity
β Ethernet drivers sanity
β Networking socket: fuzz
β Networking route: pmtu
β Networking route_func - local
β Networking route_func - forward
β Networking TCP: keepalive test
β Networking UDP: socket
β Networking cki netfilter test
β Networking tunnel: geneve basic test
β Networking tunnel: gre basic
β L2TP basic test
β Networking tunnel: vxlan basic
β Networking ipsec: basic netns - tunnel
β Libkcapi AF_ALG test
β pciutils: update pci ids test
β ALSA PCM loopback test
β ALSA Control (mixer) Userspace Element test
β storage: dm/common
β lvm snapper test
β trace: ftrace/tracer
π§ β xarray-idr-radixtree-test
π§ β Memory function: kaslr
π§ β audit: audit testsuite test
π§ β lvm cache test
Host 5:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β Boot test
β Reboot test
β xfstests - ext4
β xfstests - xfs
β IPMI driver test
β IPMItool loop stress test
β selinux-policy: serge-testsuite
β Storage blktests - blk
β Storage block - filesystem fio test
β Storage block - queue scheduler test
β storage: software RAID testing
β Storage: swraid mdadm raid_module test
π§ β Podman system test - as root
π§ β Podman system test - as user
π§ β xfstests - btrfs
π§ β Storage blktests - nvme-tcp
π§ β‘β‘β‘ Storage: lvm device-mapper test - upstream
s390x:
Host 1:
β Boot test
β Reboot test
π§ β Storage blktests - srp
Host 2:
β Boot test
β Reboot test
β LTP - cve
β LTP - sched
β LTP - syscalls
β LTP - can
β LTP - commands
β LTP - containers
β LTP - dio
β LTP - fs
β LTP - fsx
β LTP - math
β LTP - hugetlb
β LTP - mm
β LTP - nptl
β LTP - pty
β LTP - ipc
β LTP - tracing
β LTP: openposix test suite
β CIFS Connectathon
β POSIX pjd-fstest suites
β NFS Connectathon
β Loopdev Sanity
β jvm - jcstress tests
β Memory: fork_mem
β Memory function: memfd_create
β AMTU (Abstract Machine Test Utility)
β Networking bridge: sanity
β Ethernet drivers sanity
β Networking route: pmtu
β Networking route_func - local
β Networking route_func - forward
β Networking TCP: keepalive test
β Networking UDP: socket
β Networking cki netfilter test
β Networking tunnel: geneve basic test
β Networking tunnel: gre basic
β L2TP basic test
β Networking tunnel: vxlan basic
β Networking ipsec: basic netns - transport
β Networking ipsec: basic netns - tunnel
β Libkcapi AF_ALG test
β storage: dm/common
β lvm snapper test
β trace: ftrace/tracer
π§ β xarray-idr-radixtree-test
π§ β Memory function: kaslr
π§ β audit: audit testsuite test
π§ β lvm cache test
Host 3:
β Boot test
β Reboot test
β selinux-policy: serge-testsuite
β Storage blktests - blk
β Storage: swraid mdadm raid_module test
β stress: stress-ng - interrupt
β stress: stress-ng - cpu
β stress: stress-ng - cpu-cache
β stress: stress-ng - memory
π§ β Podman system test - as root
π§ β Podman system test - as user
π§ β Storage blktests - nvme-tcp
π§ β stress: stress-ng - os
Host 4:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
x86_64:
Host 1:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ xfstests - ext4
β‘β‘β‘ xfstests - xfs
β‘β‘β‘ xfstests - nfsv4.2
β‘β‘β‘ xfstests - cifsv3.11
β‘β‘β‘ IPMI driver test
β‘β‘β‘ IPMItool loop stress test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ power-management: cpupower/sanity test
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
β‘β‘β‘ stress: stress-ng - interrupt
β‘β‘β‘ stress: stress-ng - cpu
β‘β‘β‘ stress: stress-ng - cpu-cache
β‘β‘β‘ stress: stress-ng - memory
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ CPU: Idle Test
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ Storage: lvm device-mapper test - upstream
π§ β‘β‘β‘ stress: stress-ng - os
Host 2:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - srp
Host 3:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 4:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β Boot test
β Reboot test
β ACPI table test
β LTP - cve
β LTP - sched
β‘β‘β‘ LTP - syscalls
β‘β‘β‘ LTP - can
β‘β‘β‘ LTP - commands
β‘β‘β‘ LTP - containers
β‘β‘β‘ LTP - dio
β‘β‘β‘ LTP - fs
β‘β‘β‘ LTP - fsx
β‘β‘β‘ LTP - math
β‘β‘β‘ LTP - hugetlb
β‘β‘β‘ LTP - mm
β‘β‘β‘ LTP - nptl
β‘β‘β‘ LTP - pty
β‘β‘β‘ LTP - ipc
β‘β‘β‘ LTP - tracing
β‘β‘β‘ LTP: openposix test suite
β‘β‘β‘ CIFS Connectathon
β‘β‘β‘ POSIX pjd-fstest suites
β‘β‘β‘ NFS Connectathon
β‘β‘β‘ Loopdev Sanity
β‘β‘β‘ jvm - jcstress tests
β‘β‘β‘ Memory: fork_mem
β‘β‘β‘ Memory function: memfd_create
β‘β‘β‘ AMTU (Abstract Machine Test Utility)
β‘β‘β‘ Networking bridge: sanity
β‘β‘β‘ Ethernet drivers sanity
β‘β‘β‘ Networking socket: fuzz
β‘β‘β‘ Networking route: pmtu
β‘β‘β‘ Networking route_func - local
β‘β‘β‘ Networking route_func - forward
β‘β‘β‘ Networking TCP: keepalive test
β‘β‘β‘ Networking UDP: socket
β‘β‘β‘ Networking cki netfilter test
β‘β‘β‘ Networking tunnel: geneve basic test
β‘β‘β‘ Networking tunnel: gre basic
β‘β‘β‘ L2TP basic test
β‘β‘β‘ Networking tunnel: vxlan basic
β‘β‘β‘ Networking ipsec: basic netns - transport
β‘β‘β‘ Networking ipsec: basic netns - tunnel
β‘β‘β‘ Libkcapi AF_ALG test
β‘β‘β‘ pciutils: sanity smoke test
β‘β‘β‘ pciutils: update pci ids test
β‘β‘β‘ ALSA PCM loopback test
β‘β‘β‘ ALSA Control (mixer) Userspace Element test
β‘β‘β‘ storage: dm/common
β‘β‘β‘ lvm snapper test
β‘β‘β‘ storage: SCSI VPD
β‘β‘β‘ trace: ftrace/tracer
π§ β‘β‘β‘ xarray-idr-radixtree-test
π§ β‘β‘β‘ i2c: i2cdetect sanity
π§ β‘β‘β‘ Firmware test suite
π§ β‘β‘β‘ Memory function: kaslr
π§ β‘β‘β‘ Networking: igmp conformance test
π§ β‘β‘β‘ audit: audit testsuite test
π§ β‘β‘β‘ lvm cache test
Host 5:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - srp
Host 6:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - srp
Test sources: https://gitlab.com/cki-project/kernel-tests
π Pull requests are welcome for new tests or improvements to existing tests!
Aborted tests
-------------
Tests that didn't complete running successfully are marked with β‘β‘β‘.
If this was caused by an infrastructure issue, we try to mark that
explicitly in the report.
Waived tests
------------
If the test run included waived tests, they are marked with π§. Such tests are
executed but their results are not taken into account. Tests are waived when
their results are not reliable enough, e.g. when they're just introduced or are
being fixed.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running yet are marked with β±.
Targeted tests
--------------
Test runs for patches always include a set of base tests, plus some
tests chosen based on the file paths modified by the patch. The latter
are called "targeted tests". If no targeted tests are run, that means
no patch-specific tests are available. Please, consider contributing a
targeted test for related patches to increase test coverage. See
https://docs.engineering.redhat.com/x/_wEZB for more details.
This simply adds proper support for panel backlights that can be controlled
via VESA's backlight control protocol, but which also require that we
enable and disable the backlight via PWM instead of via the DPCD interface.
We also enable this by default, in order to fix some people's backlights
that were broken by not having this enabled.
For reference, backlights that require this and use VESA's backlight
interface tend to be laptops with hybrid GPUs, but this very well may
change in the future.
Signed-off-by: Lyude Paul <lyude(a)redhat.com>
Link: https://gitlab.freedesktop.org/drm/intel/-/issues/3680
Fixes: fe7d52bccab6 ("drm/i915/dp: Don't use DPCD backlights that need PWM enable/disable")
Cc: <stable(a)vger.kernel.org> # v5.12+
---
.../drm/i915/display/intel_dp_aux_backlight.c | 24 ++++++++++++++-----
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
index 569d17b4d00f..594fdc7453ca 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
@@ -293,6 +293,10 @@ intel_dp_aux_vesa_enable_backlight(const struct intel_crtc_state *crtc_state,
struct intel_panel *panel = &connector->panel;
struct intel_dp *intel_dp = enc_to_intel_dp(connector->encoder);
+ if (!panel->backlight.edp.vesa.info.aux_enable)
+ panel->backlight.pwm_funcs->enable(crtc_state, conn_state,
+ panel->backlight.pwm_level_max);
+
drm_edp_backlight_enable(&intel_dp->aux, &panel->backlight.edp.vesa.info, level);
}
@@ -304,6 +308,10 @@ static void intel_dp_aux_vesa_disable_backlight(const struct drm_connector_state
struct intel_dp *intel_dp = enc_to_intel_dp(connector->encoder);
drm_edp_backlight_disable(&intel_dp->aux, &panel->backlight.edp.vesa.info);
+
+ if (!panel->backlight.edp.vesa.info.aux_enable)
+ panel->backlight.pwm_funcs->disable(old_conn_state,
+ intel_backlight_invert_pwm_level(connector, 0));
}
static int intel_dp_aux_vesa_setup_backlight(struct intel_connector *connector, enum pipe pipe)
@@ -321,6 +329,15 @@ static int intel_dp_aux_vesa_setup_backlight(struct intel_connector *connector,
if (ret < 0)
return ret;
+ if (!panel->backlight.edp.vesa.info.aux_enable) {
+ ret = panel->backlight.pwm_funcs->setup(connector, pipe);
+ if (ret < 0) {
+ drm_err(&i915->drm,
+ "Failed to setup PWM backlight controls for eDP backlight: %d\n",
+ ret);
+ return ret;
+ }
+ }
panel->backlight.max = panel->backlight.edp.vesa.info.max;
panel->backlight.min = 0;
if (current_mode == DP_EDP_BACKLIGHT_CONTROL_MODE_DPCD) {
@@ -340,12 +357,7 @@ intel_dp_aux_supports_vesa_backlight(struct intel_connector *connector)
struct intel_dp *intel_dp = intel_attached_dp(connector);
struct drm_i915_private *i915 = dp_to_i915(intel_dp);
- /* TODO: We currently only support AUX only backlight configurations, not backlights which
- * require a mix of PWM and AUX controls to work. In the mean time, these machines typically
- * work just fine using normal PWM controls anyway.
- */
- if ((intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_CAP) &&
- drm_edp_backlight_supported(intel_dp->edp_dpcd)) {
+ if (drm_edp_backlight_supported(intel_dp->edp_dpcd)) {
drm_dbg_kms(&i915->drm, "AUX Backlight Control Supported!\n");
return true;
}
--
2.31.1
Hello,
We ran automated tests on a recent commit from this kernel tree:
Kernel repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Commit: 851c79201e9d - ionic: don't remove netdev->dev_addr when syncing uc list
The results of these automated tests are provided below.
Overall result: PASSED
Merge: OK
Compile: OK
Tests: OK
Targeted tests: NO
All kernel binaries, config files, and logs are available for download here:
https://arr-cki-prod-datawarehouse-public.s3.amazonaws.com/index.html?prefiβ¦
Please reply to this email if you have any questions about the tests that we
ran or if you have any suggestions on how to make future tests more effective.
,-. ,-.
( C ) ( K ) Continuous
`-',-.`-' Kernel
( I ) Integration
`-'
______________________________________________________________________________
Compile testing
---------------
We compiled the kernel for 4 architectures:
aarch64:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
ppc64le:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
s390x:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
x86_64:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
Hardware testing
----------------
We booted each kernel and ran the following tests:
aarch64:
Host 1:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ Networking bridge: sanity - mlx5
β‘β‘β‘ Ethernet drivers sanity - mlx5
Host 2:
β Boot test
β Reboot test
π§ β Storage blktests - srp
Host 3:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ ACPI table test
β‘β‘β‘ ACPI enabled test
β‘β‘β‘ LTP - cve
β‘β‘β‘ LTP - sched
β‘β‘β‘ LTP - syscalls
β‘β‘β‘ LTP - can
β‘β‘β‘ LTP - commands
β‘β‘β‘ LTP - containers
β‘β‘β‘ LTP - dio
β‘β‘β‘ LTP - fs
β‘β‘β‘ LTP - fsx
β‘β‘β‘ LTP - math
β‘β‘β‘ LTP - hugetlb
β‘β‘β‘ LTP - mm
β‘β‘β‘ LTP - nptl
β‘β‘β‘ LTP - pty
β‘β‘β‘ LTP - ipc
β‘β‘β‘ LTP - tracing
β‘β‘β‘ LTP: openposix test suite
β‘β‘β‘ CIFS Connectathon
β‘β‘β‘ POSIX pjd-fstest suites
β‘β‘β‘ NFS Connectathon
β‘β‘β‘ Loopdev Sanity
β‘β‘β‘ jvm - jcstress tests
β‘β‘β‘ Memory: fork_mem
β‘β‘β‘ Memory function: memfd_create
β‘β‘β‘ AMTU (Abstract Machine Test Utility)
β‘β‘β‘ Networking bridge: sanity
β‘β‘β‘ Ethernet drivers sanity
β‘β‘β‘ Networking socket: fuzz
β‘β‘β‘ Networking route: pmtu
β‘β‘β‘ Networking route_func - local
β‘β‘β‘ Networking route_func - forward
β‘β‘β‘ Networking TCP: keepalive test
β‘β‘β‘ Networking UDP: socket
β‘β‘β‘ Networking cki netfilter test
β‘β‘β‘ Networking tunnel: geneve basic test
β‘β‘β‘ Networking tunnel: gre basic
β‘β‘β‘ L2TP basic test
β‘β‘β‘ Networking tunnel: vxlan basic
β‘β‘β‘ Networking ipsec: basic netns - transport
β‘β‘β‘ Networking ipsec: basic netns - tunnel
β‘β‘β‘ Libkcapi AF_ALG test
β‘β‘β‘ pciutils: update pci ids test
β‘β‘β‘ ALSA PCM loopback test
β‘β‘β‘ ALSA Control (mixer) Userspace Element test
β‘β‘β‘ storage: dm/common
β‘β‘β‘ lvm snapper test
β‘β‘β‘ storage: SCSI VPD
β‘β‘β‘ trace: ftrace/tracer
π§ β‘β‘β‘ xarray-idr-radixtree-test
π§ β‘β‘β‘ i2c: i2cdetect sanity
π§ β‘β‘β‘ Firmware test suite
π§ β‘β‘β‘ Memory function: kaslr
π§ β‘β‘β‘ Networking: igmp conformance test
π§ β‘β‘β‘ audit: audit testsuite test
π§ β‘β‘β‘ lvm cache test
Host 4:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ xfstests - ext4
β‘β‘β‘ xfstests - xfs
β‘β‘β‘ IPMI driver test
β‘β‘β‘ IPMItool loop stress test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
β‘β‘β‘ stress: stress-ng - interrupt
β‘β‘β‘ stress: stress-ng - cpu
β‘β‘β‘ stress: stress-ng - cpu-cache
β‘β‘β‘ stress: stress-ng - memory
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ stress: stress-ng - os
Host 5:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 6:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ Networking bridge: sanity - mlx5
β‘β‘β‘ Ethernet drivers sanity - mlx5
Host 7:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ xfstests - ext4
β‘β‘β‘ xfstests - xfs
β‘β‘β‘ IPMI driver test
β‘β‘β‘ IPMItool loop stress test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
β‘β‘β‘ stress: stress-ng - interrupt
β‘β‘β‘ stress: stress-ng - cpu
β‘β‘β‘ stress: stress-ng - cpu-cache
β‘β‘β‘ stress: stress-ng - memory
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ stress: stress-ng - os
ppc64le:
Host 1:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - nvmeof-mp
Host 2:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β Boot test
β Reboot test
β xfstests - ext4
β xfstests - xfs
β IPMI driver test
β IPMItool loop stress test
β selinux-policy: serge-testsuite
β Storage blktests - blk
β Storage block - filesystem fio test
β Storage block - queue scheduler test
β storage: software RAID testing
β Storage: swraid mdadm raid_module test
π§ β Podman system test - as root
π§ β Podman system test - as user
π§ β xfstests - btrfs
π§ β Storage blktests - nvme-tcp
π§ β‘β‘β‘ Storage: lvm device-mapper test - upstream
Host 3:
β Boot test
β Reboot test
π§ β Storage blktests - srp
Host 4:
β Boot test
β Reboot test
β LTP - cve
β LTP - sched
β LTP - syscalls
β LTP - can
β LTP - commands
β LTP - containers
β LTP - dio
β LTP - fs
β LTP - fsx
β LTP - math
β LTP - hugetlb
β LTP - mm
β LTP - nptl
β LTP - pty
β LTP - ipc
β LTP - tracing
β LTP: openposix test suite
β CIFS Connectathon
β POSIX pjd-fstest suites
β NFS Connectathon
β Loopdev Sanity
β jvm - jcstress tests
β Memory: fork_mem
β Memory function: memfd_create
β AMTU (Abstract Machine Test Utility)
β Networking bridge: sanity
β Ethernet drivers sanity
β Networking socket: fuzz
β Networking route: pmtu
β Networking route_func - local
β Networking route_func - forward
β Networking TCP: keepalive test
β Networking UDP: socket
β Networking cki netfilter test
β Networking tunnel: geneve basic test
β Networking tunnel: gre basic
β L2TP basic test
β Networking tunnel: vxlan basic
β Networking ipsec: basic netns - tunnel
β Libkcapi AF_ALG test
β pciutils: update pci ids test
β ALSA PCM loopback test
β ALSA Control (mixer) Userspace Element test
β storage: dm/common
β lvm snapper test
β trace: ftrace/tracer
π§ β xarray-idr-radixtree-test
π§ β Memory function: kaslr
π§ β audit: audit testsuite test
π§ β lvm cache test
Host 5:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
s390x:
Host 1:
β Boot test
β Reboot test
π§ β Storage blktests - srp
Host 2:
β Boot test
β Reboot test
β selinux-policy: serge-testsuite
β Storage blktests - blk
β Storage: swraid mdadm raid_module test
β stress: stress-ng - interrupt
β stress: stress-ng - cpu
β stress: stress-ng - cpu-cache
β stress: stress-ng - memory
π§ β Podman system test - as root
π§ β Podman system test - as user
π§ β Storage blktests - nvme-tcp
π§ β stress: stress-ng - os
Host 3:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 4:
β Boot test
β Reboot test
β LTP - cve
β LTP - sched
β LTP - syscalls
β LTP - can
β LTP - commands
β LTP - containers
β LTP - dio
β LTP - fs
β LTP - fsx
β LTP - math
β LTP - hugetlb
β LTP - mm
β LTP - nptl
β LTP - pty
β LTP - ipc
β LTP - tracing
β LTP: openposix test suite
β CIFS Connectathon
β POSIX pjd-fstest suites
β NFS Connectathon
β Loopdev Sanity
β jvm - jcstress tests
β Memory: fork_mem
β Memory function: memfd_create
β AMTU (Abstract Machine Test Utility)
β Networking bridge: sanity
β Ethernet drivers sanity
β Networking route: pmtu
β Networking route_func - local
β Networking route_func - forward
β Networking TCP: keepalive test
β Networking UDP: socket
β Networking cki netfilter test
β Networking tunnel: geneve basic test
β Networking tunnel: gre basic
β L2TP basic test
β Networking tunnel: vxlan basic
β Networking ipsec: basic netns - transport
β Networking ipsec: basic netns - tunnel
β Libkcapi AF_ALG test
β storage: dm/common
β lvm snapper test
β trace: ftrace/tracer
π§ β xarray-idr-radixtree-test
π§ β Memory function: kaslr
π§ β audit: audit testsuite test
π§ β lvm cache test
x86_64:
Host 1:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 2:
β Boot test
β Reboot test
β ACPI table test
β LTP - cve
β LTP - sched
β LTP - syscalls
β LTP - can
β LTP - commands
β LTP - containers
β LTP - dio
β LTP - fs
β LTP - fsx
β LTP - math
β LTP - hugetlb
β LTP - mm
β LTP - nptl
β LTP - pty
β LTP - ipc
β LTP - tracing
β LTP: openposix test suite
β CIFS Connectathon
β POSIX pjd-fstest suites
β NFS Connectathon
β Loopdev Sanity
β jvm - jcstress tests
β Memory: fork_mem
β Memory function: memfd_create
β AMTU (Abstract Machine Test Utility)
β Networking bridge: sanity
β Ethernet drivers sanity
β Networking socket: fuzz
β Networking route: pmtu
β Networking route_func - local
β Networking route_func - forward
β Networking TCP: keepalive test
β Networking UDP: socket
β Networking cki netfilter test
β Networking tunnel: geneve basic test
β Networking tunnel: gre basic
β L2TP basic test
β Networking tunnel: vxlan basic
β Networking ipsec: basic netns - transport
β Networking ipsec: basic netns - tunnel
β Libkcapi AF_ALG test
β pciutils: sanity smoke test
β pciutils: update pci ids test
β ALSA PCM loopback test
β ALSA Control (mixer) Userspace Element test
β storage: dm/common
β lvm snapper test
β storage: SCSI VPD
β trace: ftrace/tracer
π§ β xarray-idr-radixtree-test
π§ β i2c: i2cdetect sanity
π§ β Firmware test suite
π§ β Memory function: kaslr
π§ β Networking: igmp conformance test
π§ β audit: audit testsuite test
π§ β lvm cache test
Host 3:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ xfstests - ext4
β‘β‘β‘ xfstests - xfs
β‘β‘β‘ xfstests - nfsv4.2
β‘β‘β‘ xfstests - cifsv3.11
β‘β‘β‘ IPMI driver test
β‘β‘β‘ IPMItool loop stress test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ power-management: cpupower/sanity test
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
β‘β‘β‘ stress: stress-ng - interrupt
β‘β‘β‘ stress: stress-ng - cpu
β‘β‘β‘ stress: stress-ng - cpu-cache
β‘β‘β‘ stress: stress-ng - memory
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ CPU: Idle Test
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ Storage: lvm device-mapper test - upstream
π§ β‘β‘β‘ stress: stress-ng - os
Host 4:
β Boot test
β Reboot test
π§ β Storage blktests - srp
Host 5:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ xfstests - ext4
β‘β‘β‘ xfstests - xfs
β‘β‘β‘ xfstests - nfsv4.2
β‘β‘β‘ xfstests - cifsv3.11
β‘β‘β‘ IPMI driver test
β‘β‘β‘ IPMItool loop stress test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ power-management: cpupower/sanity test
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
β‘β‘β‘ stress: stress-ng - interrupt
β‘β‘β‘ stress: stress-ng - cpu
β‘β‘β‘ stress: stress-ng - cpu-cache
β‘β‘β‘ stress: stress-ng - memory
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ CPU: Idle Test
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ Storage: lvm device-mapper test - upstream
π§ β‘β‘β‘ stress: stress-ng - os
Host 6:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ xfstests - ext4
β‘β‘β‘ xfstests - xfs
β‘β‘β‘ xfstests - nfsv4.2
β‘β‘β‘ xfstests - cifsv3.11
β‘β‘β‘ IPMI driver test
β‘β‘β‘ IPMItool loop stress test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ power-management: cpupower/sanity test
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
β‘β‘β‘ stress: stress-ng - interrupt
β‘β‘β‘ stress: stress-ng - cpu
β‘β‘β‘ stress: stress-ng - cpu-cache
β‘β‘β‘ stress: stress-ng - memory
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ CPU: Idle Test
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ Storage: lvm device-mapper test - upstream
π§ β‘β‘β‘ stress: stress-ng - os
Test sources: https://gitlab.com/cki-project/kernel-tests
π Pull requests are welcome for new tests or improvements to existing tests!
Aborted tests
-------------
Tests that didn't complete running successfully are marked with β‘β‘β‘.
If this was caused by an infrastructure issue, we try to mark that
explicitly in the report.
Waived tests
------------
If the test run included waived tests, they are marked with π§. Such tests are
executed but their results are not taken into account. Tests are waived when
their results are not reliable enough, e.g. when they're just introduced or are
being fixed.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running yet are marked with β±.
Targeted tests
--------------
Test runs for patches always include a set of base tests, plus some
tests chosen based on the file paths modified by the patch. The latter
are called "targeted tests". If no targeted tests are run, that means
no patch-specific tests are available. Please, consider contributing a
targeted test for related patches to increase test coverage. See
https://docs.engineering.redhat.com/x/_wEZB for more details.
The kvm_x86_sync_pir_to_irr callback can sometimes set KVM_REQ_EVENT.
If that happens exactly at the time that an exit is handled as
EXIT_FASTPATH_REENTER_GUEST, vcpu_enter_guest will go incorrectly
through the loop that calls kvm_x86_run, instead of processing
the request promptly.
Fixes: 379a3c8ee444 ("KVM: VMX: Optimize posted-interrupt delivery for timer fastpath")
Cc: stable(a)vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini(a)redhat.com>
---
arch/x86/kvm/x86.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index fa48948b4934..b9b31e5f72b0 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -9781,14 +9781,14 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
if (likely(exit_fastpath != EXIT_FASTPATH_REENTER_GUEST))
break;
- if (unlikely(kvm_vcpu_exit_request(vcpu))) {
+ if (vcpu->arch.apicv_active)
+ static_call(kvm_x86_sync_pir_to_irr)(vcpu);
+
+ if (unlikely(kvm_vcpu_exit_request(vcpu))) {
exit_fastpath = EXIT_FASTPATH_EXIT_HANDLED;
break;
}
-
- if (vcpu->arch.apicv_active)
- static_call(kvm_x86_sync_pir_to_irr)(vcpu);
- }
+ }
/*
* Do this here before restoring debug registers on the host. And
--
2.27.0
Since commit c300ab9f08df ("KVM: x86: Replace late check_nested_events() hack with
more precise fix") there is no longer the certainty that check_nested_events()
tries to inject an external interrupt vmexit to L1 on every call to vcpu_enter_guest.
Therefore, even in that case we need to set KVM_REQ_EVENT. This ensures
that inject_pending_event() is called, and from there kvm_check_nested_events().
Fixes: c300ab9f08df ("KVM: x86: Replace late check_nested_events() hack with more precise fix")
Cc: stable(a)vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini(a)redhat.com>
---
arch/x86/kvm/vmx/vmx.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 79d6af09dbf4..7567e1d15017 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -6331,18 +6331,13 @@ static int vmx_sync_pir_to_irr(struct kvm_vcpu *vcpu)
/*
* If we are running L2 and L1 has a new pending interrupt
- * which can be injected, we should re-evaluate
- * what should be done with this new L1 interrupt.
- * If L1 intercepts external-interrupts, we should
- * exit from L2 to L1. Otherwise, interrupt should be
- * delivered directly to L2.
+ * which can be injected, this may cause a vmexit or it may
+ * be injected into L2. Either way, this interrupt will be
+ * processed via KVM_REQ_EVENT, not RVI, because we do not use
+ * virtual interrupt delivery to inject L1 interrupts into L2.
*/
- if (is_guest_mode(vcpu) && max_irr_updated) {
- if (nested_exit_on_intr(vcpu))
- kvm_vcpu_exiting_guest_mode(vcpu);
- else
- kvm_make_request(KVM_REQ_EVENT, vcpu);
- }
+ if (is_guest_mode(vcpu) && max_irr_updated)
+ kvm_make_request(KVM_REQ_EVENT, vcpu);
} else {
max_irr = kvm_lapic_find_highest_irr(vcpu);
}
--
2.27.0
Hello,
We ran automated tests on a recent commit from this kernel tree:
Kernel repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Commit: a2955e9296e1 - ionic: don't remove netdev->dev_addr when syncing uc list
The results of these automated tests are provided below.
Overall result: PASSED
Merge: OK
Compile: OK
Tests: OK
Targeted tests: NO
All kernel binaries, config files, and logs are available for download here:
https://arr-cki-prod-datawarehouse-public.s3.amazonaws.com/index.html?prefiβ¦
Please reply to this email if you have any questions about the tests that we
ran or if you have any suggestions on how to make future tests more effective.
,-. ,-.
( C ) ( K ) Continuous
`-',-.`-' Kernel
( I ) Integration
`-'
______________________________________________________________________________
Compile testing
---------------
We compiled the kernel for 4 architectures:
aarch64:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
ppc64le:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
s390x:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
x86_64:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
Hardware testing
----------------
We booted each kernel and ran the following tests:
aarch64:
Host 1:
β Boot test
β Reboot test
β Networking bridge: sanity - mlx5
β Ethernet drivers sanity - mlx5
Host 2:
β Boot test
β Reboot test
β xfstests - ext4
β xfstests - xfs
β IPMI driver test
β IPMItool loop stress test
β selinux-policy: serge-testsuite
β Storage blktests - blk
β Storage block - filesystem fio test
β Storage block - queue scheduler test
β storage: software RAID testing
β Storage: swraid mdadm raid_module test
β stress: stress-ng - interrupt
β stress: stress-ng - cpu
β stress: stress-ng - cpu-cache
β stress: stress-ng - memory
π§ β Podman system test - as root
π§ β Podman system test - as user
π§ β xfstests - btrfs
π§ β Storage blktests - nvme-tcp
π§ π₯ stress: stress-ng - os
Host 3:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 4:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ ACPI table test
β‘β‘β‘ ACPI enabled test
β‘β‘β‘ LTP - cve
β‘β‘β‘ LTP - sched
β‘β‘β‘ LTP - syscalls
β‘β‘β‘ LTP - can
β‘β‘β‘ LTP - commands
β‘β‘β‘ LTP - containers
β‘β‘β‘ LTP - dio
β‘β‘β‘ LTP - fs
β‘β‘β‘ LTP - fsx
β‘β‘β‘ LTP - math
β‘β‘β‘ LTP - hugetlb
β‘β‘β‘ LTP - mm
β‘β‘β‘ LTP - nptl
β‘β‘β‘ LTP - pty
β‘β‘β‘ LTP - ipc
β‘β‘β‘ LTP - tracing
β‘β‘β‘ LTP: openposix test suite
β‘β‘β‘ CIFS Connectathon
β‘β‘β‘ POSIX pjd-fstest suites
β‘β‘β‘ NFS Connectathon
β‘β‘β‘ Loopdev Sanity
β‘β‘β‘ jvm - jcstress tests
β‘β‘β‘ Memory: fork_mem
β‘β‘β‘ Memory function: memfd_create
β‘β‘β‘ AMTU (Abstract Machine Test Utility)
β‘β‘β‘ Networking bridge: sanity
β‘β‘β‘ Ethernet drivers sanity
β‘β‘β‘ Networking socket: fuzz
β‘β‘β‘ Networking route: pmtu
β‘β‘β‘ Networking route_func - local
β‘β‘β‘ Networking route_func - forward
β‘β‘β‘ Networking TCP: keepalive test
β‘β‘β‘ Networking UDP: socket
β‘β‘β‘ Networking cki netfilter test
β‘β‘β‘ Networking tunnel: geneve basic test
β‘β‘β‘ Networking tunnel: gre basic
β‘β‘β‘ L2TP basic test
β‘β‘β‘ Networking tunnel: vxlan basic
β‘β‘β‘ Networking ipsec: basic netns - transport
β‘β‘β‘ Networking ipsec: basic netns - tunnel
β‘β‘β‘ Libkcapi AF_ALG test
β‘β‘β‘ pciutils: update pci ids test
β‘β‘β‘ ALSA PCM loopback test
β‘β‘β‘ ALSA Control (mixer) Userspace Element test
β‘β‘β‘ storage: dm/common
β‘β‘β‘ lvm snapper test
β‘β‘β‘ storage: SCSI VPD
β‘β‘β‘ trace: ftrace/tracer
π§ β‘β‘β‘ xarray-idr-radixtree-test
π§ β‘β‘β‘ i2c: i2cdetect sanity
π§ β‘β‘β‘ Firmware test suite
π§ β‘β‘β‘ Memory function: kaslr
π§ β‘β‘β‘ Networking: igmp conformance test
π§ β‘β‘β‘ audit: audit testsuite test
π§ β‘β‘β‘ lvm cache test
Host 5:
β Boot test
β Reboot test
π§ β Storage blktests - srp
Host 6:
β Boot test
β Reboot test
β ACPI table test
β ACPI enabled test
β LTP - cve
β LTP - sched
β LTP - syscalls
β LTP - can
β LTP - commands
β LTP - containers
β LTP - dio
β LTP - fs
β LTP - fsx
β LTP - math
β LTP - hugetlb
β LTP - mm
β LTP - nptl
β LTP - pty
β LTP - ipc
β LTP - tracing
β LTP: openposix test suite
β CIFS Connectathon
β POSIX pjd-fstest suites
β NFS Connectathon
β Loopdev Sanity
β jvm - jcstress tests
β Memory: fork_mem
β Memory function: memfd_create
β AMTU (Abstract Machine Test Utility)
β Networking bridge: sanity
β Ethernet drivers sanity
β Networking socket: fuzz
β Networking route: pmtu
β Networking route_func - local
β Networking route_func - forward
β Networking TCP: keepalive test
β Networking UDP: socket
β Networking cki netfilter test
β Networking tunnel: geneve basic test
β Networking tunnel: gre basic
β L2TP basic test
β Networking tunnel: vxlan basic
β Networking ipsec: basic netns - transport
β Networking ipsec: basic netns - tunnel
β Libkcapi AF_ALG test
β pciutils: update pci ids test
β ALSA PCM loopback test
β ALSA Control (mixer) Userspace Element test
β storage: dm/common
β lvm snapper test
β storage: SCSI VPD
β trace: ftrace/tracer
π§ β xarray-idr-radixtree-test
π§ β i2c: i2cdetect sanity
π§ β Firmware test suite
π§ β Memory function: kaslr
π§ β Networking: igmp conformance test
π§ β audit: audit testsuite test
π§ β lvm cache test
ppc64le:
Host 1:
β Boot test
β Reboot test
β LTP - cve
β LTP - sched
β LTP - syscalls
β LTP - can
β LTP - commands
β LTP - containers
β LTP - dio
β LTP - fs
β LTP - fsx
β LTP - math
β LTP - hugetlb
β LTP - mm
β LTP - nptl
β LTP - pty
β LTP - ipc
β LTP - tracing
β LTP: openposix test suite
β CIFS Connectathon
β POSIX pjd-fstest suites
β NFS Connectathon
β Loopdev Sanity
β jvm - jcstress tests
β Memory: fork_mem
β Memory function: memfd_create
β AMTU (Abstract Machine Test Utility)
β Networking bridge: sanity
β Ethernet drivers sanity
β Networking socket: fuzz
β Networking route: pmtu
β Networking route_func - local
β Networking route_func - forward
β Networking TCP: keepalive test
β Networking UDP: socket
β Networking cki netfilter test
β Networking tunnel: geneve basic test
β Networking tunnel: gre basic
β L2TP basic test
β Networking tunnel: vxlan basic
β Networking ipsec: basic netns - tunnel
β Libkcapi AF_ALG test
β pciutils: update pci ids test
β ALSA PCM loopback test
β ALSA Control (mixer) Userspace Element test
β storage: dm/common
β lvm snapper test
β trace: ftrace/tracer
π§ β xarray-idr-radixtree-test
π§ β Memory function: kaslr
π§ β audit: audit testsuite test
π§ β lvm cache test
Host 2:
β Boot test
β Reboot test
π§ β Storage blktests - srp
Host 3:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 4:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ xfstests - ext4
β‘β‘β‘ xfstests - xfs
β‘β‘β‘ IPMI driver test
β‘β‘β‘ IPMItool loop stress test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ Storage: lvm device-mapper test - upstream
Host 5:
β Boot test
β Reboot test
β xfstests - ext4
β xfstests - xfs
β IPMI driver test
β IPMItool loop stress test
β selinux-policy: serge-testsuite
β Storage blktests - blk
β Storage block - filesystem fio test
β Storage block - queue scheduler test
β storage: software RAID testing
β Storage: swraid mdadm raid_module test
π§ β Podman system test - as root
π§ β Podman system test - as user
π§ β xfstests - btrfs
π§ β Storage blktests - nvme-tcp
π§ β Storage: lvm device-mapper test - upstream
s390x:
Host 1:
β Boot test
β Reboot test
β LTP - cve
β LTP - sched
β LTP - syscalls
β LTP - can
β LTP - commands
β LTP - containers
β LTP - dio
β LTP - fs
β LTP - fsx
β LTP - math
β LTP - hugetlb
β LTP - mm
β LTP - nptl
β LTP - pty
β LTP - ipc
β LTP - tracing
β LTP: openposix test suite
β CIFS Connectathon
β POSIX pjd-fstest suites
β NFS Connectathon
β Loopdev Sanity
β jvm - jcstress tests
β Memory: fork_mem
β Memory function: memfd_create
β AMTU (Abstract Machine Test Utility)
β Networking bridge: sanity
β Ethernet drivers sanity
β Networking route: pmtu
β Networking route_func - local
β Networking route_func - forward
β Networking TCP: keepalive test
β Networking UDP: socket
β Networking cki netfilter test
β Networking tunnel: geneve basic test
β Networking tunnel: gre basic
β L2TP basic test
β Networking tunnel: vxlan basic
β Networking ipsec: basic netns - transport
β Networking ipsec: basic netns - tunnel
β Libkcapi AF_ALG test
β storage: dm/common
β lvm snapper test
β trace: ftrace/tracer
π§ β xarray-idr-radixtree-test
π§ β Memory function: kaslr
π§ β audit: audit testsuite test
π§ β lvm cache test
Host 2:
β Boot test
β Reboot test
π§ β Storage blktests - srp
Host 3:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 4:
β Boot test
β Reboot test
β selinux-policy: serge-testsuite
β Storage blktests - blk
β Storage: swraid mdadm raid_module test
β stress: stress-ng - interrupt
β stress: stress-ng - cpu
β stress: stress-ng - cpu-cache
β stress: stress-ng - memory
π§ β Podman system test - as root
π§ β Podman system test - as user
π§ β Storage blktests - nvme-tcp
π§ β stress: stress-ng - os
x86_64:
Host 1:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 2:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - srp
Host 3:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ xfstests - ext4
β‘β‘β‘ xfstests - xfs
β‘β‘β‘ xfstests - nfsv4.2
β‘β‘β‘ xfstests - cifsv3.11
β‘β‘β‘ IPMI driver test
β‘β‘β‘ IPMItool loop stress test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ power-management: cpupower/sanity test
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
β‘β‘β‘ stress: stress-ng - interrupt
β‘β‘β‘ stress: stress-ng - cpu
β‘β‘β‘ stress: stress-ng - cpu-cache
β‘β‘β‘ stress: stress-ng - memory
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ CPU: Idle Test
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ Storage: lvm device-mapper test - upstream
π§ β‘β‘β‘ stress: stress-ng - os
Host 4:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β Boot test
β Reboot test
β ACPI table test
β LTP - cve
β LTP - sched
β‘β‘β‘ LTP - syscalls
β‘β‘β‘ LTP - can
β‘β‘β‘ LTP - commands
β‘β‘β‘ LTP - containers
β‘β‘β‘ LTP - dio
β‘β‘β‘ LTP - fs
β‘β‘β‘ LTP - fsx
β‘β‘β‘ LTP - math
β‘β‘β‘ LTP - hugetlb
β‘β‘β‘ LTP - mm
β‘β‘β‘ LTP - nptl
β‘β‘β‘ LTP - pty
β‘β‘β‘ LTP - ipc
β‘β‘β‘ LTP - tracing
β‘β‘β‘ LTP: openposix test suite
β‘β‘β‘ CIFS Connectathon
β‘β‘β‘ POSIX pjd-fstest suites
β‘β‘β‘ NFS Connectathon
β‘β‘β‘ Loopdev Sanity
β‘β‘β‘ jvm - jcstress tests
β‘β‘β‘ Memory: fork_mem
β‘β‘β‘ Memory function: memfd_create
β‘β‘β‘ AMTU (Abstract Machine Test Utility)
β‘β‘β‘ Networking bridge: sanity
β‘β‘β‘ Ethernet drivers sanity
β‘β‘β‘ Networking socket: fuzz
β‘β‘β‘ Networking route: pmtu
β‘β‘β‘ Networking route_func - local
β‘β‘β‘ Networking route_func - forward
β‘β‘β‘ Networking TCP: keepalive test
β‘β‘β‘ Networking UDP: socket
β‘β‘β‘ Networking cki netfilter test
β‘β‘β‘ Networking tunnel: geneve basic test
β‘β‘β‘ Networking tunnel: gre basic
β‘β‘β‘ L2TP basic test
β‘β‘β‘ Networking tunnel: vxlan basic
β‘β‘β‘ Networking ipsec: basic netns - transport
β‘β‘β‘ Networking ipsec: basic netns - tunnel
β‘β‘β‘ Libkcapi AF_ALG test
β‘β‘β‘ pciutils: sanity smoke test
β‘β‘β‘ pciutils: update pci ids test
β‘β‘β‘ ALSA PCM loopback test
β‘β‘β‘ ALSA Control (mixer) Userspace Element test
β‘β‘β‘ storage: dm/common
β‘β‘β‘ lvm snapper test
β‘β‘β‘ storage: SCSI VPD
β‘β‘β‘ trace: ftrace/tracer
π§ β‘β‘β‘ xarray-idr-radixtree-test
π§ β‘β‘β‘ i2c: i2cdetect sanity
π§ β‘β‘β‘ Firmware test suite
π§ β‘β‘β‘ Memory function: kaslr
π§ β‘β‘β‘ Networking: igmp conformance test
π§ β‘β‘β‘ audit: audit testsuite test
π§ β‘β‘β‘ lvm cache test
Host 5:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - srp
Host 6:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - srp
Test sources: https://gitlab.com/cki-project/kernel-tests
π Pull requests are welcome for new tests or improvements to existing tests!
Aborted tests
-------------
Tests that didn't complete running successfully are marked with β‘β‘β‘.
If this was caused by an infrastructure issue, we try to mark that
explicitly in the report.
Waived tests
------------
If the test run included waived tests, they are marked with π§. Such tests are
executed but their results are not taken into account. Tests are waived when
their results are not reliable enough, e.g. when they're just introduced or are
being fixed.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running yet are marked with β±.
Targeted tests
--------------
Test runs for patches always include a set of base tests, plus some
tests chosen based on the file paths modified by the patch. The latter
are called "targeted tests". If no targeted tests are run, that means
no patch-specific tests are available. Please, consider contributing a
targeted test for related patches to increase test coverage. See
https://docs.engineering.redhat.com/x/_wEZB for more details.
This is a note to let you know that I've just added the patch titled
staging: r8188eu: fix memleak in rtw_wx_set_enc_ext
to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the staging-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
>From 26f448371820cf733c827c11f0c77ce304a29b51 Mon Sep 17 00:00:00 2001
From: Martin Kaiser <martin(a)kaiser.cx>
Date: Tue, 19 Oct 2021 22:23:56 +0200
Subject: staging: r8188eu: fix memleak in rtw_wx_set_enc_ext
Free the param struct if the caller sets an unsupported algorithm
and we return an error.
Fixes: 2b42bd58b321 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver")
Cc: stable <stable(a)vger.kernel.org>
Signed-off-by: Martin Kaiser <martin(a)kaiser.cx>
Link: https://lore.kernel.org/r/20211019202356.12572-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/staging/r8188eu/os_dep/ioctl_linux.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index 4f0ae821d193..4e51d5a55985 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -1897,7 +1897,7 @@ static int rtw_wx_set_enc_ext(struct net_device *dev,
struct ieee_param *param = NULL;
struct iw_point *pencoding = &wrqu->encoding;
struct iw_encode_ext *pext = (struct iw_encode_ext *)extra;
- int ret = 0;
+ int ret = -1;
param_len = sizeof(struct ieee_param) + pext->key_len;
param = kzalloc(param_len, GFP_KERNEL);
@@ -1923,7 +1923,7 @@ static int rtw_wx_set_enc_ext(struct net_device *dev,
alg_name = "CCMP";
break;
default:
- return -1;
+ goto out;
}
strlcpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN);
@@ -1950,6 +1950,7 @@ static int rtw_wx_set_enc_ext(struct net_device *dev,
ret = wpa_set_encryption(dev, param, param_len);
+out:
kfree(param);
return ret;
}
--
2.33.1
This is a note to let you know that I've just added the patch titled
staging: rtl8712: fix use-after-free in rtl8712_dl_fw
to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the staging-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
>From c052cc1a069c3e575619cf64ec427eb41176ca70 Mon Sep 17 00:00:00 2001
From: Pavel Skripkin <paskripkin(a)gmail.com>
Date: Wed, 20 Oct 2021 00:17:18 +0300
Subject: staging: rtl8712: fix use-after-free in rtl8712_dl_fw
Syzbot reported use-after-free in rtl8712_dl_fw(). The problem was in
race condition between r871xu_dev_remove() ->ndo_open() callback.
It's easy to see from crash log, that driver accesses released firmware
in ->ndo_open() callback. It may happen, since driver was releasing
firmware _before_ unregistering netdev. Fix it by moving
unregister_netdev() before cleaning up resources.
Call Trace:
...
rtl871x_open_fw drivers/staging/rtl8712/hal_init.c:83 [inline]
rtl8712_dl_fw+0xd95/0xe10 drivers/staging/rtl8712/hal_init.c:170
rtl8712_hal_init drivers/staging/rtl8712/hal_init.c:330 [inline]
rtl871x_hal_init+0xae/0x180 drivers/staging/rtl8712/hal_init.c:394
netdev_open+0xe6/0x6c0 drivers/staging/rtl8712/os_intfs.c:380
__dev_open+0x2bc/0x4d0 net/core/dev.c:1484
Freed by task 1306:
...
release_firmware+0x1b/0x30 drivers/base/firmware_loader/main.c:1053
r871xu_dev_remove+0xcc/0x2c0 drivers/staging/rtl8712/usb_intf.c:599
usb_unbind_interface+0x1d8/0x8d0 drivers/usb/core/driver.c:458
Fixes: 8c213fa59199 ("staging: r8712u: Use asynchronous firmware loading")
Cc: stable <stable(a)vger.kernel.org>
Reported-and-tested-by: syzbot+c55162be492189fb4f51(a)syzkaller.appspotmail.com
Signed-off-by: Pavel Skripkin <paskripkin(a)gmail.com>
Link: https://lore.kernel.org/r/20211019211718.26354-1-paskripkin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/staging/rtl8712/usb_intf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c
index 17e705411e64..ee4c61f85a07 100644
--- a/drivers/staging/rtl8712/usb_intf.c
+++ b/drivers/staging/rtl8712/usb_intf.c
@@ -595,12 +595,12 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf)
/* never exit with a firmware callback pending */
wait_for_completion(&padapter->rtl8712_fw_ready);
+ if (pnetdev->reg_state != NETREG_UNINITIALIZED)
+ unregister_netdev(pnetdev); /* will call netdev_close() */
usb_set_intfdata(pusb_intf, NULL);
release_firmware(padapter->fw);
if (drvpriv.drv_registered)
padapter->surprise_removed = true;
- if (pnetdev->reg_state != NETREG_UNINITIALIZED)
- unregister_netdev(pnetdev); /* will call netdev_close() */
r8712_flush_rwctrl_works(padapter);
r8712_flush_led_works(padapter);
udelay(1);
--
2.33.1
Hi,
Is it possible to backport the commit "net: switchdev: do not propagate bridge updates across bridges" [1] to linux-5.4?
This patch fixes faulty hardware configuration when nesting DSA-offloaded bridges into software bridges, which can cause vlan_filtering to be disabled in hardware, even though it should be enabled. Therefore, ports/vlans get connected, even though they should be isolated.
A backport of this patch for linux-5.4 has recently been accepted in OpenWrt [2]
Best regards,
Fabian BlΓ€se
[1] 07c6f9805f12f1bb538ef165a092b300350384aa
[2] https://github.com/openwrt/openwrt/pull/4493
From: Josef Bacik <jbacik(a)fb.com>
Commit b5e6c3e170b77025b5f6174258c7ad71eed2d4de upstream.
There's a priority inversion that exists currently with btrfs fsync. In
some cases we will collect outstanding ordered extents onto a list and
only wait on them at the very last second. However this "very last
second" falls inside of a transaction handle, so if we are in a lower
priority cgroup we can end up holding the transaction open for longer
than needed, so if a high priority cgroup is also trying to fsync()
it'll see latency.
Signed-off-by: Josef Bacik <jbacik(a)fb.com>
Reviewed-by: Filipe Manana <fdmanana(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: Anand Jain <anand.jain(a)oracle.com>
---
fs/btrfs/file.c | 56 ++++---------------------------------------------
1 file changed, 4 insertions(+), 52 deletions(-)
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index dd2504322a87..2f386d8dbd0e 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -2102,53 +2102,12 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
atomic_inc(&root->log_batch);
full_sync = test_bit(BTRFS_INODE_NEEDS_FULL_SYNC,
&BTRFS_I(inode)->runtime_flags);
+
/*
- * We might have have had more pages made dirty after calling
- * start_ordered_ops and before acquiring the inode's i_mutex.
+ * We have to do this here to avoid the priority inversion of waiting on
+ * IO of a lower priority task while holding a transaciton open.
*/
- if (full_sync) {
- /*
- * For a full sync, we need to make sure any ordered operations
- * start and finish before we start logging the inode, so that
- * all extents are persisted and the respective file extent
- * items are in the fs/subvol btree.
- */
- ret = btrfs_wait_ordered_range(inode, start, len);
- } else {
- /*
- * Start any new ordered operations before starting to log the
- * inode. We will wait for them to finish in btrfs_sync_log().
- *
- * Right before acquiring the inode's mutex, we might have new
- * writes dirtying pages, which won't immediately start the
- * respective ordered operations - that is done through the
- * fill_delalloc callbacks invoked from the writepage and
- * writepages address space operations. So make sure we start
- * all ordered operations before starting to log our inode. Not
- * doing this means that while logging the inode, writeback
- * could start and invoke writepage/writepages, which would call
- * the fill_delalloc callbacks (cow_file_range,
- * submit_compressed_extents). These callbacks add first an
- * extent map to the modified list of extents and then create
- * the respective ordered operation, which means in
- * tree-log.c:btrfs_log_inode() we might capture all existing
- * ordered operations (with btrfs_get_logged_extents()) before
- * the fill_delalloc callback adds its ordered operation, and by
- * the time we visit the modified list of extent maps (with
- * btrfs_log_changed_extents()), we see and process the extent
- * map they created. We then use the extent map to construct a
- * file extent item for logging without waiting for the
- * respective ordered operation to finish - this file extent
- * item points to a disk location that might not have yet been
- * written to, containing random data - so after a crash a log
- * replay will make our inode have file extent items that point
- * to disk locations containing invalid data, as we returned
- * success to userspace without waiting for the respective
- * ordered operation to finish, because it wasn't captured by
- * btrfs_get_logged_extents().
- */
- ret = start_ordered_ops(inode, start, end);
- }
+ ret = btrfs_wait_ordered_range(inode, start, len);
if (ret) {
up_write(&BTRFS_I(inode)->dio_sem);
inode_unlock(inode);
@@ -2283,13 +2242,6 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
goto out;
}
}
- if (!full_sync) {
- ret = btrfs_wait_ordered_range(inode, start, len);
- if (ret) {
- btrfs_end_transaction(trans);
- goto out;
- }
- }
ret = btrfs_commit_transaction(trans);
} else {
ret = btrfs_end_transaction(trans);
--
2.31.1
Commit 112665286d08 moved guest_exit() in the interrupt protected
area to avoid wrong context warning (or worse), but the tick counter
cannot be updated and the guest time is accounted to the system time.
To fix the problem port to POWER the x86 fix
160457140187 ("Defer vtime accounting 'til after IRQ handling"):
"Defer the call to account guest time until after servicing any IRQ(s)
that happened in the guest or immediately after VM-Exit. Tick-based
accounting of vCPU time relies on PF_VCPU being set when the tick IRQ
handler runs, and IRQs are blocked throughout the main sequence of
vcpu_enter_guest(), including the call into vendor code to actually
enter and exit the guest."
Fixes: 112665286d08 ("KVM: PPC: Book3S HV: Context tracking exit guest context before enabling irqs")
Cc: npiggin(a)gmail.com
Cc: <stable(a)vger.kernel.org> # 5.12
Signed-off-by: Laurent Vivier <lvivier(a)redhat.com>
---
Notes:
v2: remove reference to commit 61bd0f66ff92
cc stable 5.12
add the same comment in the code as for x86
arch/powerpc/kvm/book3s_hv.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index 2acb1c96cfaf..a694d1a8f6ce 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -3695,6 +3695,8 @@ static noinline void kvmppc_run_core(struct kvmppc_vcore *vc)
srcu_read_unlock(&vc->kvm->srcu, srcu_idx);
+ context_tracking_guest_exit();
+
set_irq_happened(trap);
spin_lock(&vc->lock);
@@ -3726,9 +3728,15 @@ static noinline void kvmppc_run_core(struct kvmppc_vcore *vc)
kvmppc_set_host_core(pcpu);
- guest_exit_irqoff();
-
local_irq_enable();
+ /*
+ * Wait until after servicing IRQs to account guest time so that any
+ * ticks that occurred while running the guest are properly accounted
+ * to the guest. Waiting until IRQs are enabled degrades the accuracy
+ * of accounting via context tracking, but the loss of accuracy is
+ * acceptable for all known use cases.
+ */
+ vtime_account_guest_exit();
/* Let secondaries go back to the offline loop */
for (i = 0; i < controlled_threads; ++i) {
@@ -4506,13 +4514,21 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit,
srcu_read_unlock(&kvm->srcu, srcu_idx);
+ context_tracking_guest_exit();
+
set_irq_happened(trap);
kvmppc_set_host_core(pcpu);
- guest_exit_irqoff();
-
local_irq_enable();
+ /*
+ * Wait until after servicing IRQs to account guest time so that any
+ * ticks that occurred while running the guest are properly accounted
+ * to the guest. Waiting until IRQs are enabled degrades the accuracy
+ * of accounting via context tracking, but the loss of accuracy is
+ * acceptable for all known use cases.
+ */
+ vtime_account_guest_exit();
cpumask_clear_cpu(pcpu, &kvm->arch.cpu_in_guest);
--
2.31.1
This is a note to let you know that I've just added the patch titled
char: xillybus: fix msg_ep UAF in xillyusb_probe()
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
>From 15c9a359094ec6251578b02387436bc64f11a477 Mon Sep 17 00:00:00 2001
From: Ziyang Xuan <william.xuanziyang(a)huawei.com>
Date: Sat, 16 Oct 2021 13:20:47 +0800
Subject: char: xillybus: fix msg_ep UAF in xillyusb_probe()
When endpoint_alloc() return failed in xillyusb_setup_base_eps(),
'xdev->msg_ep' will be freed but not set to NULL. That lets program
enter fail handling to cleanup_dev() in xillyusb_probe(). Check for
'xdev->msg_ep' is invalid in cleanup_dev() because 'xdev->msg_ep' did
not set to NULL when was freed. So the UAF problem for 'xdev->msg_ep'
is triggered.
==================================================================
BUG: KASAN: use-after-free in fifo_mem_release+0x1f4/0x210
CPU: 0 PID: 166 Comm: kworker/0:2 Not tainted 5.15.0-rc5+ #19
Call Trace:
dump_stack_lvl+0xe2/0x152
print_address_description.constprop.0+0x21/0x140
? fifo_mem_release+0x1f4/0x210
kasan_report.cold+0x7f/0x11b
? xillyusb_probe+0x530/0x700
? fifo_mem_release+0x1f4/0x210
fifo_mem_release+0x1f4/0x210
? __sanitizer_cov_trace_pc+0x1d/0x50
endpoint_dealloc+0x35/0x2b0
cleanup_dev+0x90/0x120
xillyusb_probe+0x59a/0x700
...
Freed by task 166:
kasan_save_stack+0x1b/0x40
kasan_set_track+0x1c/0x30
kasan_set_free_info+0x20/0x30
__kasan_slab_free+0x109/0x140
kfree+0x117/0x4c0
xillyusb_probe+0x606/0x700
Set 'xdev->msg_ep' to NULL after being freed in xillyusb_setup_base_eps()
to fix the UAF problem.
Fixes: a53d1202aef1 ("char: xillybus: Add driver for XillyUSB (Xillybus variant for USB)")
Cc: stable <stable(a)vger.kernel.org>
Acked-by: Eli Billauer <eli.billauer(a)gmail.com>
Signed-off-by: Ziyang Xuan <william.xuanziyang(a)huawei.com>
Link: https://lore.kernel.org/r/20211016052047.1611983-1-william.xuanziyang@huaweβ¦
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/char/xillybus/xillyusb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/char/xillybus/xillyusb.c b/drivers/char/xillybus/xillyusb.c
index e7f88f35c702..dc3551796e5e 100644
--- a/drivers/char/xillybus/xillyusb.c
+++ b/drivers/char/xillybus/xillyusb.c
@@ -1912,6 +1912,7 @@ static int xillyusb_setup_base_eps(struct xillyusb_dev *xdev)
dealloc:
endpoint_dealloc(xdev->msg_ep); /* Also frees FIFO mem if allocated */
+ xdev->msg_ep = NULL;
return -ENOMEM;
}
--
2.33.1
This is a note to let you know that I've just added the patch titled
binder: don't detect sender/target during buffer cleanup
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
>From 32e9f56a96d8d0f23cb2aeb2a3cd18d40393e787 Mon Sep 17 00:00:00 2001
From: Todd Kjos <tkjos(a)google.com>
Date: Fri, 15 Oct 2021 16:38:11 -0700
Subject: binder: don't detect sender/target during buffer cleanup
When freeing txn buffers, binder_transaction_buffer_release()
attempts to detect whether the current context is the target by
comparing current->group_leader to proc->tsk. This is an unreliable
test. Instead explicitly pass an 'is_failure' boolean.
Detecting the sender was being used as a way to tell if the
transaction failed to be sent. When cleaning up after
failing to send a transaction, there is no need to close
the fds associated with a BINDER_TYPE_FDA object. Now
'is_failure' can be used to accurately detect this case.
Fixes: 44d8047f1d87 ("binder: use standard functions to allocate fds")
Cc: stable <stable(a)vger.kernel.org>
Acked-by: Christian Brauner <christian.brauner(a)ubuntu.com>
Signed-off-by: Todd Kjos <tkjos(a)google.com>
Link: https://lore.kernel.org/r/20211015233811.3532235-1-tkjos@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/android/binder.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 9edacc8b9768..fe4c3b49eec1 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -1870,7 +1870,7 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,
binder_dec_node(buffer->target_node, 1, 0);
off_start_offset = ALIGN(buffer->data_size, sizeof(void *));
- off_end_offset = is_failure ? failed_at :
+ off_end_offset = is_failure && failed_at ? failed_at :
off_start_offset + buffer->offsets_size;
for (buffer_offset = off_start_offset; buffer_offset < off_end_offset;
buffer_offset += sizeof(binder_size_t)) {
@@ -1956,9 +1956,8 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,
binder_size_t fd_buf_size;
binder_size_t num_valid;
- if (proc->tsk != current->group_leader) {
+ if (is_failure) {
/*
- * Nothing to do if running in sender context
* The fd fixups have not been applied so no
* fds need to be closed.
*/
@@ -3185,6 +3184,7 @@ static void binder_transaction(struct binder_proc *proc,
* binder_free_buf() - free the specified buffer
* @proc: binder proc that owns buffer
* @buffer: buffer to be freed
+ * @is_failure: failed to send transaction
*
* If buffer for an async transaction, enqueue the next async
* transaction from the node.
@@ -3194,7 +3194,7 @@ static void binder_transaction(struct binder_proc *proc,
static void
binder_free_buf(struct binder_proc *proc,
struct binder_thread *thread,
- struct binder_buffer *buffer)
+ struct binder_buffer *buffer, bool is_failure)
{
binder_inner_proc_lock(proc);
if (buffer->transaction) {
@@ -3222,7 +3222,7 @@ binder_free_buf(struct binder_proc *proc,
binder_node_inner_unlock(buf_node);
}
trace_binder_transaction_buffer_release(buffer);
- binder_transaction_buffer_release(proc, thread, buffer, 0, false);
+ binder_transaction_buffer_release(proc, thread, buffer, 0, is_failure);
binder_alloc_free_buf(&proc->alloc, buffer);
}
@@ -3424,7 +3424,7 @@ static int binder_thread_write(struct binder_proc *proc,
proc->pid, thread->pid, (u64)data_ptr,
buffer->debug_id,
buffer->transaction ? "active" : "finished");
- binder_free_buf(proc, thread, buffer);
+ binder_free_buf(proc, thread, buffer, false);
break;
}
@@ -4117,7 +4117,7 @@ static int binder_thread_read(struct binder_proc *proc,
buffer->transaction = NULL;
binder_cleanup_transaction(t, "fd fixups failed",
BR_FAILED_REPLY);
- binder_free_buf(proc, thread, buffer);
+ binder_free_buf(proc, thread, buffer, true);
binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
"%d:%d %stransaction %d fd fixups failed %d/%d, line %d\n",
proc->pid, thread->pid,
--
2.33.1
This is the start of the stable review cycle for the 4.14.252 release.
There are 39 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 20 Oct 2021 13:23:15 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.252-rβ¦
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.14.252-rc1
Vegard Nossum <vegard.nossum(a)oracle.com>
r8152: select CRC32 and CRYPTO/CRYPTO_HASH/CRYPTO_SHA256
chongjiapeng <jiapeng.chong(a)linux.alibaba.com>
qed: Fix missing error code in qed_slowpath_start()
Jackie Liu <liuyun01(a)kylinos.cn>
acpi/arm64: fix next_platform_timer() section mismatch error
Dan Carpenter <dan.carpenter(a)oracle.com>
drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling
Colin Ian King <colin.king(a)canonical.com>
drm/msm: Fix null pointer dereference on pointer edp
Dan Carpenter <dan.carpenter(a)oracle.com>
pata_legacy: fix a couple uninitialized variable bugs
Ziyang Xuan <william.xuanziyang(a)huawei.com>
NFC: digital: fix possible memory leak in digital_in_send_sdd_req()
Ziyang Xuan <william.xuanziyang(a)huawei.com>
NFC: digital: fix possible memory leak in digital_tg_listen_mdaa()
Ziyang Xuan <william.xuanziyang(a)huawei.com>
nfc: fix error handling of nfc_proto_register()
Arnd Bergmann <arnd(a)arndb.de>
ethernet: s2io: fix setting mac address during resume
Nanyong Sun <sunnanyong(a)huawei.com>
net: encx24j600: check error in devm_regmap_init_encx24j600
Vegard Nossum <vegard.nossum(a)oracle.com>
net: korina: select CRC32
Vegard Nossum <vegard.nossum(a)oracle.com>
net: arc: select CRC32
Eiichi Tsukata <eiichi.tsukata(a)nutanix.com>
sctp: account stream padding length for reconf chunk
Dan Carpenter <dan.carpenter(a)oracle.com>
iio: ssp_sensors: fix error code in ssp_print_mcu_debug()
Dan Carpenter <dan.carpenter(a)oracle.com>
iio: ssp_sensors: add more range checking in ssp_parse_dataframe()
Jiri Valek - 2N <valek(a)2n.cz>
iio: light: opt3001: Fixed timeout error when 0 lux
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
iio: adc128s052: Fix the error handling path of 'adc128_probe()'
Billy Tsai <billy_tsai(a)aspeedtech.com>
iio: adc: aspeed: set driver data when adc probe.
Borislav Petkov <bp(a)suse.de>
x86/Kconfig: Do not enable AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT automatically
Stephen Boyd <swboyd(a)chromium.org>
nvmem: Fix shift-out-of-bound (UBSAN) with byte size cells
Halil Pasic <pasic(a)linux.ibm.com>
virtio: write back F_VERSION_1 before validate
Tomaz Solc <tomaz.solc(a)tablix.org>
USB: serial: option: add prod. id for Quectel EG91
Daniele Palmas <dnlplm(a)gmail.com>
USB: serial: option: add Telit LE910Cx composition 0x1204
Yu-Tung Chang <mtwget(a)gmail.com>
USB: serial: option: add Quectel EC200S-CN module support
Aleksander Morgado <aleksander(a)aleksander.es>
USB: serial: qcserial: add EM9191 QDL support
Michael Cullen <michael(a)michaelcullen.name>
Input: xpad - add support for another USB ID of Nacon GC-100
Miquel Raynal <miquel.raynal(a)bootlin.com>
usb: musb: dsps: Fix the probe error path
Zhang Jianhua <chris.zjh(a)huawei.com>
efi: Change down_interruptible() in virt_efi_reset_system() to down_trylock()
Ard Biesheuvel <ardb(a)kernel.org>
efi/cper: use stack buffer for error record decoding
Arnd Bergmann <arnd(a)arndb.de>
cb710: avoid NULL pointer subtraction
Nikolay Martynov <mar.kolya(a)gmail.com>
xhci: Enable trust tx length quirk for Fresco FL11 USB controller
Pavankumar Kondeti <pkondeti(a)codeaurora.org>
xhci: Fix command ring pointer corruption while aborting a command
Filipe Manana <fdmanana(a)suse.com>
btrfs: check for error when looking up inode during dir entry replay
Filipe Manana <fdmanana(a)suse.com>
btrfs: deal with errors when adding inode reference during log replay
Filipe Manana <fdmanana(a)suse.com>
btrfs: deal with errors when replaying dir entry during log replay
Roberto Sassu <roberto.sassu(a)huawei.com>
s390: fix strrchr() implementation
Takashi Iwai <tiwai(a)suse.de>
ALSA: seq: Fix a potential UAF by wrong private_free call order
Sasha Levin <sashal(a)kernel.org>
stable: clamp SUBLEVEL in 4.14
-------------
Diffstat:
Makefile | 6 ++--
arch/s390/lib/string.c | 15 +++++-----
arch/x86/Kconfig | 1 -
drivers/acpi/arm64/gtdt.c | 2 +-
drivers/ata/pata_legacy.c | 6 ++--
drivers/firmware/efi/cper.c | 4 +--
drivers/firmware/efi/runtime-wrappers.c | 2 +-
drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +-
drivers/gpu/drm/msm/edp/edp_ctrl.c | 3 +-
drivers/iio/adc/aspeed_adc.c | 1 +
drivers/iio/adc/ti-adc128s052.c | 6 ++++
drivers/iio/common/ssp_sensors/ssp_spi.c | 11 ++++++--
drivers/iio/light/opt3001.c | 6 ++--
drivers/input/joystick/xpad.c | 2 ++
drivers/misc/cb710/sgbuf2.c | 2 +-
drivers/net/ethernet/Kconfig | 1 +
drivers/net/ethernet/arc/Kconfig | 1 +
drivers/net/ethernet/microchip/encx24j600-regmap.c | 10 +++++--
drivers/net/ethernet/microchip/encx24j600.c | 5 +++-
drivers/net/ethernet/microchip/encx24j600_hw.h | 4 +--
drivers/net/ethernet/neterion/s2io.c | 2 +-
drivers/net/ethernet/qlogic/qed/qed_main.c | 1 +
drivers/net/usb/Kconfig | 4 +++
drivers/nvmem/core.c | 3 +-
drivers/usb/host/xhci-pci.c | 2 ++
drivers/usb/host/xhci-ring.c | 14 +++++++---
drivers/usb/musb/musb_dsps.c | 4 ++-
drivers/usb/serial/option.c | 8 ++++++
drivers/usb/serial/qcserial.c | 1 +
drivers/virtio/virtio.c | 11 ++++++++
fs/btrfs/tree-log.c | 32 +++++++++++++++-------
net/nfc/af_nfc.c | 3 ++
net/nfc/digital_core.c | 9 ++++--
net/nfc/digital_technology.c | 8 ++++--
net/sctp/sm_make_chunk.c | 2 +-
sound/core/seq_device.c | 8 ++----
36 files changed, 144 insertions(+), 58 deletions(-)
This is the start of the stable review cycle for the 4.19.213 release.
There are 49 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 20 Oct 2021 14:30:23 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.213-rβ¦
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.19.213-rc2
Vegard Nossum <vegard.nossum(a)oracle.com>
r8152: select CRC32 and CRYPTO/CRYPTO_HASH/CRYPTO_SHA256
chongjiapeng <jiapeng.chong(a)linux.alibaba.com>
qed: Fix missing error code in qed_slowpath_start()
Sebastian Andrzej Siewior <bigeasy(a)linutronix.de>
mqprio: Correct stats in mqprio_dump_class_stats().
Jackie Liu <liuyun01(a)kylinos.cn>
acpi/arm64: fix next_platform_timer() section mismatch error
Dan Carpenter <dan.carpenter(a)oracle.com>
drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling
Dan Carpenter <dan.carpenter(a)oracle.com>
drm/msm/dsi: Fix an error code in msm_dsi_modeset_init()
Colin Ian King <colin.king(a)canonical.com>
drm/msm: Fix null pointer dereference on pointer edp
Vadim Pasternak <vadimp(a)nvidia.com>
platform/mellanox: mlxreg-io: Fix argument base in kstrtou32() call
Dan Carpenter <dan.carpenter(a)oracle.com>
pata_legacy: fix a couple uninitialized variable bugs
Ziyang Xuan <william.xuanziyang(a)huawei.com>
NFC: digital: fix possible memory leak in digital_in_send_sdd_req()
Ziyang Xuan <william.xuanziyang(a)huawei.com>
NFC: digital: fix possible memory leak in digital_tg_listen_mdaa()
Ziyang Xuan <william.xuanziyang(a)huawei.com>
nfc: fix error handling of nfc_proto_register()
Arnd Bergmann <arnd(a)arndb.de>
ethernet: s2io: fix setting mac address during resume
Nanyong Sun <sunnanyong(a)huawei.com>
net: encx24j600: check error in devm_regmap_init_encx24j600
Vegard Nossum <vegard.nossum(a)oracle.com>
net: korina: select CRC32
Vegard Nossum <vegard.nossum(a)oracle.com>
net: arc: select CRC32
Eiichi Tsukata <eiichi.tsukata(a)nutanix.com>
sctp: account stream padding length for reconf chunk
Dan Carpenter <dan.carpenter(a)oracle.com>
iio: dac: ti-dac5571: fix an error code in probe()
Dan Carpenter <dan.carpenter(a)oracle.com>
iio: ssp_sensors: fix error code in ssp_print_mcu_debug()
Dan Carpenter <dan.carpenter(a)oracle.com>
iio: ssp_sensors: add more range checking in ssp_parse_dataframe()
Jiri Valek - 2N <valek(a)2n.cz>
iio: light: opt3001: Fixed timeout error when 0 lux
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
iio: adc128s052: Fix the error handling path of 'adc128_probe()'
Billy Tsai <billy_tsai(a)aspeedtech.com>
iio: adc: aspeed: set driver data when adc probe.
Borislav Petkov <bp(a)suse.de>
x86/Kconfig: Do not enable AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT automatically
Stephen Boyd <swboyd(a)chromium.org>
nvmem: Fix shift-out-of-bound (UBSAN) with byte size cells
Halil Pasic <pasic(a)linux.ibm.com>
virtio: write back F_VERSION_1 before validate
Tomaz Solc <tomaz.solc(a)tablix.org>
USB: serial: option: add prod. id for Quectel EG91
Daniele Palmas <dnlplm(a)gmail.com>
USB: serial: option: add Telit LE910Cx composition 0x1204
Yu-Tung Chang <mtwget(a)gmail.com>
USB: serial: option: add Quectel EC200S-CN module support
Aleksander Morgado <aleksander(a)aleksander.es>
USB: serial: qcserial: add EM9191 QDL support
Michael Cullen <michael(a)michaelcullen.name>
Input: xpad - add support for another USB ID of Nacon GC-100
Miquel Raynal <miquel.raynal(a)bootlin.com>
usb: musb: dsps: Fix the probe error path
Zhang Jianhua <chris.zjh(a)huawei.com>
efi: Change down_interruptible() in virt_efi_reset_system() to down_trylock()
Ard Biesheuvel <ardb(a)kernel.org>
efi/cper: use stack buffer for error record decoding
Arnd Bergmann <arnd(a)arndb.de>
cb710: avoid NULL pointer subtraction
Nikolay Martynov <mar.kolya(a)gmail.com>
xhci: Enable trust tx length quirk for Fresco FL11 USB controller
Pavankumar Kondeti <pkondeti(a)codeaurora.org>
xhci: Fix command ring pointer corruption while aborting a command
Jonathan Bell <jonathan(a)raspberrypi.com>
xhci: guard accesses to ep_state in xhci_endpoint_reset()
Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
mei: me: add Ice Lake-N device id.
James Morse <james.morse(a)arm.com>
x86/resctrl: Free the ctrlval arrays when domain_setup_mon_state() fails
Filipe Manana <fdmanana(a)suse.com>
btrfs: check for error when looking up inode during dir entry replay
Filipe Manana <fdmanana(a)suse.com>
btrfs: deal with errors when adding inode reference during log replay
Filipe Manana <fdmanana(a)suse.com>
btrfs: deal with errors when replaying dir entry during log replay
Roberto Sassu <roberto.sassu(a)huawei.com>
s390: fix strrchr() implementation
Steven Rostedt <rostedt(a)goodmis.org>
nds32/ftrace: Fix Error: invalid operands (*UND* and *UND* sections) for `^'
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek - ALC236 headset MIC recording issue
Werner Sembach <wse(a)tuxedocomputers.com>
ALSA: hda/realtek: Add quirk for Clevo X170KM-G
Werner Sembach <wse(a)tuxedocomputers.com>
ALSA: hda/realtek: Complete partial device name to avoid ambiguity
Takashi Iwai <tiwai(a)suse.de>
ALSA: seq: Fix a potential UAF by wrong private_free call order
-------------
Diffstat:
Makefile | 4 +--
arch/s390/lib/string.c | 15 +++++-----
arch/x86/Kconfig | 1 -
arch/x86/kernel/cpu/intel_rdt.c | 2 ++
drivers/acpi/arm64/gtdt.c | 2 +-
drivers/ata/pata_legacy.c | 6 ++--
drivers/firmware/efi/cper.c | 4 +--
drivers/firmware/efi/runtime-wrappers.c | 2 +-
drivers/gpu/drm/msm/dsi/dsi.c | 4 ++-
drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +-
drivers/gpu/drm/msm/edp/edp_ctrl.c | 3 +-
drivers/iio/adc/aspeed_adc.c | 1 +
drivers/iio/adc/ti-adc128s052.c | 6 ++++
drivers/iio/common/ssp_sensors/ssp_spi.c | 11 ++++++--
drivers/iio/dac/ti-dac5571.c | 1 +
drivers/iio/light/opt3001.c | 6 ++--
drivers/input/joystick/xpad.c | 2 ++
drivers/misc/cb710/sgbuf2.c | 2 +-
drivers/misc/mei/hw-me-regs.h | 1 +
drivers/misc/mei/pci-me.c | 1 +
drivers/net/ethernet/Kconfig | 1 +
drivers/net/ethernet/arc/Kconfig | 1 +
drivers/net/ethernet/microchip/encx24j600-regmap.c | 10 +++++--
drivers/net/ethernet/microchip/encx24j600.c | 5 +++-
drivers/net/ethernet/microchip/encx24j600_hw.h | 4 +--
drivers/net/ethernet/neterion/s2io.c | 2 +-
drivers/net/ethernet/qlogic/qed/qed_main.c | 1 +
drivers/net/usb/Kconfig | 4 +++
drivers/nvmem/core.c | 3 +-
drivers/platform/mellanox/mlxreg-io.c | 2 +-
drivers/usb/host/xhci-pci.c | 2 ++
drivers/usb/host/xhci-ring.c | 14 +++++++---
drivers/usb/host/xhci.c | 5 ++++
drivers/usb/musb/musb_dsps.c | 4 ++-
drivers/usb/serial/option.c | 8 ++++++
drivers/usb/serial/qcserial.c | 1 +
drivers/virtio/virtio.c | 11 ++++++++
fs/btrfs/tree-log.c | 32 +++++++++++++++-------
net/nfc/af_nfc.c | 3 ++
net/nfc/digital_core.c | 9 ++++--
net/nfc/digital_technology.c | 8 ++++--
net/sched/sch_mqprio.c | 30 ++++++++++++--------
net/sctp/sm_make_chunk.c | 2 +-
scripts/recordmcount.pl | 2 +-
sound/core/seq_device.c | 8 ++----
sound/pci/hda/patch_realtek.c | 8 ++++--
46 files changed, 182 insertions(+), 74 deletions(-)
Hello,
We ran automated tests on a recent commit from this kernel tree:
Kernel repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Commit: 12f8c85330b7 - ionic: don't remove netdev->dev_addr when syncing uc list
The results of these automated tests are provided below.
Overall result: PASSED
Merge: OK
Compile: OK
Tests: OK
Targeted tests: NO
All kernel binaries, config files, and logs are available for download here:
https://arr-cki-prod-datawarehouse-public.s3.amazonaws.com/index.html?prefiβ¦
Please reply to this email if you have any questions about the tests that we
ran or if you have any suggestions on how to make future tests more effective.
,-. ,-.
( C ) ( K ) Continuous
`-',-.`-' Kernel
( I ) Integration
`-'
______________________________________________________________________________
Compile testing
---------------
We compiled the kernel for 4 architectures:
aarch64:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
ppc64le:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
s390x:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
x86_64:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
Hardware testing
----------------
We booted each kernel and ran the following tests:
aarch64:
Host 1:
β Boot test
β Reboot test
β ACPI table test
β ACPI enabled test
β LTP - cve
β LTP - sched
β LTP - syscalls
β LTP - can
β LTP - commands
β LTP - containers
β LTP - dio
β LTP - fs
β LTP - fsx
β LTP - math
β LTP - hugetlb
β LTP - mm
β LTP - nptl
β LTP - pty
β LTP - ipc
β LTP - tracing
β LTP: openposix test suite
β CIFS Connectathon
β POSIX pjd-fstest suites
β NFS Connectathon
β Loopdev Sanity
β jvm - jcstress tests
β Memory: fork_mem
β Memory function: memfd_create
β AMTU (Abstract Machine Test Utility)
β Networking bridge: sanity
β Ethernet drivers sanity
β Networking socket: fuzz
β Networking route: pmtu
β Networking route_func - local
β Networking route_func - forward
β Networking TCP: keepalive test
β Networking UDP: socket
β Networking cki netfilter test
β Networking tunnel: geneve basic test
β Networking tunnel: gre basic
β L2TP basic test
β Networking tunnel: vxlan basic
β Networking ipsec: basic netns - transport
β Networking ipsec: basic netns - tunnel
β Libkcapi AF_ALG test
β pciutils: update pci ids test
β ALSA PCM loopback test
β ALSA Control (mixer) Userspace Element test
β storage: dm/common
β lvm snapper test
β storage: SCSI VPD
β trace: ftrace/tracer
π§ β xarray-idr-radixtree-test
π§ β i2c: i2cdetect sanity
π§ β Firmware test suite
π§ β Memory function: kaslr
π§ β Networking: igmp conformance test
π§ β audit: audit testsuite test
π§ β lvm cache test
Host 2:
β Boot test
β Reboot test
β xfstests - ext4
β xfstests - xfs
β IPMI driver test
β IPMItool loop stress test
β selinux-policy: serge-testsuite
β Storage blktests - blk
β Storage block - filesystem fio test
β Storage block - queue scheduler test
β storage: software RAID testing
β Storage: swraid mdadm raid_module test
β stress: stress-ng - interrupt
β stress: stress-ng - cpu
β stress: stress-ng - cpu-cache
β stress: stress-ng - memory
π§ β Podman system test - as root
π§ β Podman system test - as user
π§ β xfstests - btrfs
π§ β Storage blktests - nvme-tcp
π§ π₯ stress: stress-ng - os
Host 3:
β Boot test
β Reboot test
π§ β Storage blktests - srp
Host 4:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ Networking bridge: sanity - mlx5
β‘β‘β‘ Ethernet drivers sanity - mlx5
Host 5:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 6:
β Boot test
β Reboot test
β Networking bridge: sanity - mlx5
β Ethernet drivers sanity - mlx5
ppc64le:
Host 1:
β Boot test
β Reboot test
β xfstests - ext4
β xfstests - xfs
β IPMI driver test
β IPMItool loop stress test
β selinux-policy: serge-testsuite
β Storage blktests - blk
β Storage block - filesystem fio test
β Storage block - queue scheduler test
β storage: software RAID testing
β Storage: swraid mdadm raid_module test
π§ β Podman system test - as root
π§ β Podman system test - as user
π§ β xfstests - btrfs
π§ β Storage blktests - nvme-tcp
π§ β Storage: lvm device-mapper test - upstream
Host 2:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 3:
β Boot test
β Reboot test
β LTP - cve
β LTP - sched
β LTP - syscalls
β LTP - can
β LTP - commands
β LTP - containers
β LTP - dio
β LTP - fs
β LTP - fsx
β LTP - math
β LTP - hugetlb
β LTP - mm
β LTP - nptl
β LTP - pty
β LTP - ipc
β LTP - tracing
β LTP: openposix test suite
β CIFS Connectathon
β POSIX pjd-fstest suites
β NFS Connectathon
β Loopdev Sanity
β jvm - jcstress tests
β Memory: fork_mem
β Memory function: memfd_create
β AMTU (Abstract Machine Test Utility)
β Networking bridge: sanity
β Ethernet drivers sanity
β Networking socket: fuzz
β Networking route: pmtu
β Networking route_func - local
β Networking route_func - forward
β Networking TCP: keepalive test
β Networking UDP: socket
β Networking cki netfilter test
β Networking tunnel: geneve basic test
β Networking tunnel: gre basic
β L2TP basic test
β Networking tunnel: vxlan basic
β Networking ipsec: basic netns - tunnel
β Libkcapi AF_ALG test
β pciutils: update pci ids test
β ALSA PCM loopback test
β ALSA Control (mixer) Userspace Element test
β storage: dm/common
β lvm snapper test
β trace: ftrace/tracer
π§ β xarray-idr-radixtree-test
π§ β Memory function: kaslr
π§ β audit: audit testsuite test
π§ β lvm cache test
Host 4:
β Boot test
β Reboot test
π§ β Storage blktests - srp
s390x:
Host 1:
β Boot test
β Reboot test
β LTP - cve
β LTP - sched
β LTP - syscalls
β LTP - can
β LTP - commands
β LTP - containers
β LTP - dio
β LTP - fs
β LTP - fsx
β LTP - math
β LTP - hugetlb
β LTP - mm
β LTP - nptl
β LTP - pty
β LTP - ipc
β LTP - tracing
β LTP: openposix test suite
β CIFS Connectathon
β POSIX pjd-fstest suites
β NFS Connectathon
β Loopdev Sanity
β jvm - jcstress tests
β Memory: fork_mem
β Memory function: memfd_create
β AMTU (Abstract Machine Test Utility)
β Networking bridge: sanity
β Ethernet drivers sanity
β Networking route: pmtu
β Networking route_func - local
β Networking route_func - forward
β Networking TCP: keepalive test
β Networking UDP: socket
β Networking cki netfilter test
β Networking tunnel: geneve basic test
β Networking tunnel: gre basic
β L2TP basic test
β Networking tunnel: vxlan basic
β Networking ipsec: basic netns - transport
β Networking ipsec: basic netns - tunnel
β Libkcapi AF_ALG test
β storage: dm/common
β lvm snapper test
β trace: ftrace/tracer
π§ β xarray-idr-radixtree-test
π§ β Memory function: kaslr
π§ β audit: audit testsuite test
π§ β lvm cache test
Host 2:
β Boot test
β Reboot test
β selinux-policy: serge-testsuite
β Storage blktests - blk
β Storage: swraid mdadm raid_module test
β stress: stress-ng - interrupt
β stress: stress-ng - cpu
β stress: stress-ng - cpu-cache
β stress: stress-ng - memory
π§ β Podman system test - as root
π§ β Podman system test - as user
π§ β Storage blktests - nvme-tcp
π§ β stress: stress-ng - os
Host 3:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 4:
β Boot test
β Reboot test
π§ π₯ Storage blktests - srp
x86_64:
Host 1:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 2:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β Boot test
β Reboot test
β ACPI table test
β LTP - cve
β LTP - sched
β LTP - syscalls
β LTP - can
β LTP - commands
β LTP - containers
β LTP - dio
β LTP - fs
β LTP - fsx
β LTP - math
β LTP - hugetlb
β LTP - mm
β LTP - nptl
β LTP - pty
β LTP - ipc
β LTP - tracing
β LTP: openposix test suite
β CIFS Connectathon
β POSIX pjd-fstest suites
β NFS Connectathon
β Loopdev Sanity
β‘β‘β‘ jvm - jcstress tests
β‘β‘β‘ Memory: fork_mem
β‘β‘β‘ Memory function: memfd_create
β‘β‘β‘ AMTU (Abstract Machine Test Utility)
β‘β‘β‘ Networking bridge: sanity
β‘β‘β‘ Ethernet drivers sanity
β‘β‘β‘ Networking socket: fuzz
β‘β‘β‘ Networking route: pmtu
β‘β‘β‘ Networking route_func - local
β‘β‘β‘ Networking route_func - forward
β‘β‘β‘ Networking TCP: keepalive test
β‘β‘β‘ Networking UDP: socket
β‘β‘β‘ Networking cki netfilter test
β‘β‘β‘ Networking tunnel: geneve basic test
β‘β‘β‘ Networking tunnel: gre basic
β‘β‘β‘ L2TP basic test
β‘β‘β‘ Networking tunnel: vxlan basic
β‘β‘β‘ Networking ipsec: basic netns - transport
β‘β‘β‘ Networking ipsec: basic netns - tunnel
β‘β‘β‘ Libkcapi AF_ALG test
β‘β‘β‘ pciutils: sanity smoke test
β‘β‘β‘ pciutils: update pci ids test
β‘β‘β‘ ALSA PCM loopback test
β‘β‘β‘ ALSA Control (mixer) Userspace Element test
β‘β‘β‘ storage: dm/common
β‘β‘β‘ lvm snapper test
β‘β‘β‘ storage: SCSI VPD
β‘β‘β‘ trace: ftrace/tracer
π§ β‘β‘β‘ xarray-idr-radixtree-test
π§ β‘β‘β‘ i2c: i2cdetect sanity
π§ β‘β‘β‘ Firmware test suite
π§ β‘β‘β‘ Memory function: kaslr
π§ β‘β‘β‘ Networking: igmp conformance test
π§ β‘β‘β‘ audit: audit testsuite test
π§ β‘β‘β‘ lvm cache test
Host 3:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - srp
Host 4:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ xfstests - ext4
β‘β‘β‘ xfstests - xfs
β‘β‘β‘ xfstests - nfsv4.2
β‘β‘β‘ xfstests - cifsv3.11
β‘β‘β‘ IPMI driver test
β‘β‘β‘ IPMItool loop stress test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ power-management: cpupower/sanity test
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
β‘β‘β‘ stress: stress-ng - interrupt
β‘β‘β‘ stress: stress-ng - cpu
β‘β‘β‘ stress: stress-ng - cpu-cache
β‘β‘β‘ stress: stress-ng - memory
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ CPU: Idle Test
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ Storage: lvm device-mapper test - upstream
π§ β‘β‘β‘ stress: stress-ng - os
Host 5:
β Boot test
β Reboot test
π§ π₯ Storage blktests - srp
Host 6:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ xfstests - ext4
β‘β‘β‘ xfstests - xfs
β‘β‘β‘ xfstests - nfsv4.2
β‘β‘β‘ xfstests - cifsv3.11
β‘β‘β‘ IPMI driver test
β‘β‘β‘ IPMItool loop stress test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ power-management: cpupower/sanity test
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
β‘β‘β‘ stress: stress-ng - interrupt
β‘β‘β‘ stress: stress-ng - cpu
β‘β‘β‘ stress: stress-ng - cpu-cache
β‘β‘β‘ stress: stress-ng - memory
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ CPU: Idle Test
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ Storage: lvm device-mapper test - upstream
π§ β‘β‘β‘ stress: stress-ng - os
Test sources: https://gitlab.com/cki-project/kernel-tests
π Pull requests are welcome for new tests or improvements to existing tests!
Aborted tests
-------------
Tests that didn't complete running successfully are marked with β‘β‘β‘.
If this was caused by an infrastructure issue, we try to mark that
explicitly in the report.
Waived tests
------------
If the test run included waived tests, they are marked with π§. Such tests are
executed but their results are not taken into account. Tests are waived when
their results are not reliable enough, e.g. when they're just introduced or are
being fixed.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running yet are marked with β±.
Targeted tests
--------------
Test runs for patches always include a set of base tests, plus some
tests chosen based on the file paths modified by the patch. The latter
are called "targeted tests". If no targeted tests are run, that means
no patch-specific tests are available. Please, consider contributing a
targeted test for related patches to increase test coverage. See
https://docs.engineering.redhat.com/x/_wEZB for more details.
Atm, there are no sink rate values set for DP (vs. eDP) sinks until the
DPCD capabilities are successfully read from the sink. During this time
intel_dp->num_common_rates is 0 which can lead to a
intel_dp->common_rates[-1] (*)
access, which is an undefined behaviour, in the following cases:
- In intel_dp_sync_state(), if the encoder is enabled without a sink
connected to the encoder's connector (BIOS enabled a monitor, but the
user unplugged the monitor until the driver loaded).
- In intel_dp_sync_state() if the encoder is enabled with a sink
connected, but for some reason the DPCD read has failed.
- In intel_dp_compute_link_config() if modesetting a connector without
a sink connected on it.
- In intel_dp_compute_link_config() if modesetting a connector with a
a sink connected on it, but before probing the connector first.
To avoid the (*) access in all the above cases, make sure that the sink
rate table - and hence the common rate table - is always valid, by
setting a default minimum sink rate when registering the connector
before anything could use it.
I also considered setting all the DP link rates by default, so that
modesetting with higher resolution modes also succeeds in the last two
cases above. However in case a sink is not connected that would stop
working after the first modeset, due to the LT fallback logic. So this
would need more work, beyond the scope of this fix.
As I mentioned in the previous patch, I don't think the issue this patch
fixes is user visible, however it is an undefined behaviour by
definition and triggers a BUG() in CONFIG_UBSAN builds, hence CC:stable.
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4297
References: https://gitlab.freedesktop.org/drm/intel/-/issues/4298
Suggested-by: Ville SyrjΓ€lΓ€ <ville.syrjala(a)linux.intel.com>
Cc: Ville SyrjΓ€lΓ€ <ville.syrjala(a)linux.intel.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Imre Deak <imre.deak(a)intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 23de500d56b52..153ae944a354b 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -120,6 +120,12 @@ bool intel_dp_is_uhbr(const struct intel_crtc_state *crtc_state)
return crtc_state->port_clock >= 1000000;
}
+static void intel_dp_set_default_sink_rates(struct intel_dp *intel_dp)
+{
+ intel_dp->sink_rates[0] = 162000;
+ intel_dp->num_sink_rates = 1;
+}
+
/* update sink rates from dpcd */
static void intel_dp_set_sink_rates(struct intel_dp *intel_dp)
{
@@ -5003,6 +5009,8 @@ intel_dp_init_connector(struct intel_digital_port *dig_port,
}
intel_dp_set_source_rates(intel_dp);
+ intel_dp_set_default_sink_rates(intel_dp);
+ intel_dp_set_common_rates(intel_dp);
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
intel_dp->pps.active_pipe = vlv_active_pipe(intel_dp);
--
2.27.0
The patch titled
Subject: mm/secretmem: fix NULL page->mapping dereference in page_is_secretmem()
has been removed from the -mm tree. Its filename was
mm-fix-null-page-mapping-dereference-in-page_is_secretmem.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Sean Christopherson <seanjc(a)google.com>
Subject: mm/secretmem: fix NULL page->mapping dereference in page_is_secretmem()
Check for a NULL page->mapping before dereferencing the mapping in
page_is_secretmem(), as the page's mapping can be nullified while gup() is
running, e.g. by reclaim or truncation.
BUG: kernel NULL pointer dereference, address: 0000000000000068
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 0 P4D 0
Oops: 0000 [#1] PREEMPT SMP NOPTI
CPU: 6 PID: 4173897 Comm: CPU 3/KVM Tainted: G W
RIP: 0010:internal_get_user_pages_fast+0x621/0x9d0
Code: <48> 81 7a 68 80 08 04 bc 0f 85 21 ff ff 8 89 c7 be
RSP: 0018:ffffaa90087679b0 EFLAGS: 00010046
RAX: ffffe3f37905b900 RBX: 00007f2dd561e000 RCX: ffffe3f37905b934
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffe3f37905b900
...
CR2: 0000000000000068 CR3: 00000004c5898003 CR4: 00000000001726e0
Call Trace:
get_user_pages_fast_only+0x13/0x20
hva_to_pfn+0xa9/0x3e0
try_async_pf+0xa1/0x270
direct_page_fault+0x113/0xad0
kvm_mmu_page_fault+0x69/0x680
vmx_handle_exit+0xe1/0x5d0
kvm_arch_vcpu_ioctl_run+0xd81/0x1c70
kvm_vcpu_ioctl+0x267/0x670
__x64_sys_ioctl+0x83/0xa0
do_syscall_64+0x56/0x80
entry_SYSCALL_64_after_hwframe+0x44/0xae
Link: https://lkml.kernel.org/r/20211007231502.3552715-1-seanjc@google.com
Fixes: 1507f51255c9 ("mm: introduce memfd_secret system call to create "secret" memory areas")
Signed-off-by: Sean Christopherson <seanjc(a)google.com>
Reported-by: Darrick J. Wong <djwong(a)kernel.org>
Reported-by: Stephen <stephenackerman16(a)gmail.com>
Tested-by: Darrick J. Wong <djwong(a)kernel.org>
Reviewed-by: David Hildenbrand <david(a)redhat.com>
Reviewed-by: Mike Rapoport <rppt(a)linux.ibm.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/secretmem.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/linux/secretmem.h~mm-fix-null-page-mapping-dereference-in-page_is_secretmem
+++ a/include/linux/secretmem.h
@@ -23,7 +23,7 @@ static inline bool page_is_secretmem(str
mapping = (struct address_space *)
((unsigned long)page->mapping & ~PAGE_MAPPING_FLAGS);
- if (mapping != page->mapping)
+ if (!mapping || mapping != page->mapping)
return false;
return mapping->a_ops == &secretmem_aops;
_
Patches currently in -mm which might be from seanjc(a)google.com are
The patch titled
Subject: vfs: check fd has read access in kernel_read_file_from_fd()
has been removed from the -mm tree. Its filename was
vfs-check-fd-has-read-access-in-kernel_read_file_from_fd.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: "Matthew Wilcox (Oracle)" <willy(a)infradead.org>
Subject: vfs: check fd has read access in kernel_read_file_from_fd()
If we open a file without read access and then pass the fd to a syscall
whose implementation calls kernel_read_file_from_fd(), we get a warning
from __kernel_read():
if (WARN_ON_ONCE(!(file->f_mode & FMODE_READ)))
This currently affects both finit_module() and kexec_file_load(), but it
could affect other syscalls in the future.
Link: https://lkml.kernel.org/r/20211007220110.600005-1-willy@infradead.org
Fixes: b844f0ecbc56 ("vfs: define kernel_copy_file_from_fd()")
Signed-off-by: Matthew Wilcox (Oracle) <willy(a)infradead.org>
Reported-by: Hao Sun <sunhao.th(a)gmail.com>
Reviewed-by: Kees Cook <keescook(a)chromium.org>
Acked-by: Christian Brauner <christian.brauner(a)ubuntu.com>
Cc: Al Viro <viro(a)zeniv.linux.org.uk>
Cc: Mimi Zohar <zohar(a)linux.ibm.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/kernel_read_file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/kernel_read_file.c~vfs-check-fd-has-read-access-in-kernel_read_file_from_fd
+++ a/fs/kernel_read_file.c
@@ -178,7 +178,7 @@ int kernel_read_file_from_fd(int fd, lof
struct fd f = fdget(fd);
int ret = -EBADF;
- if (!f.file)
+ if (!f.file || !(f.file->f_mode & FMODE_READ))
goto out;
ret = kernel_read_file(f.file, offset, buf, buf_size, file_size, id);
_
Patches currently in -mm which might be from willy(a)infradead.org are
mm-move-kvmalloc-related-functions-to-slabh.patch
mm-remove-bogus-vm_bug_on.patch
mm-optimise-put_pages_list.patch
kasan-fix-tag-for-large-allocations-when-using-config_slab.patch
The patch titled
Subject: elfcore: correct reference to CONFIG_UML
has been removed from the -mm tree. Its filename was
elfcore-correct-reference-to-config_uml.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Lukas Bulwahn <lukas.bulwahn(a)gmail.com>
Subject: elfcore: correct reference to CONFIG_UML
Commit 6e7b64b9dd6d ("elfcore: fix building with clang") introduces
special handling for two architectures, ia64 and User Mode Linux.
However, the wrong name, i.e., CONFIG_UM, for the intended Kconfig symbol
for User-Mode Linux was used.
Although the directory for User Mode Linux is ./arch/um; the Kconfig
symbol for this architecture is called CONFIG_UML.
Luckily, ./scripts/checkkconfigsymbols.py warns on non-existing configs:
UM
Referencing files: include/linux/elfcore.h
Similar symbols: UML, NUMA
Correct the name of the config to the intended one.
[akpm(a)linux-foundation.org: fix um/x86_64, per Catalin]
Link: https://lkml.kernel.org/r/20211006181119.2851441-1-catalin.marinas@arm.com
Link: https://lkml.kernel.org/r/YV6pejGzLy5ppEpt@arm.com
Link: https://lkml.kernel.org/r/20211006082209.417-1-lukas.bulwahn@gmail.com
Fixes: 6e7b64b9dd6d ("elfcore: fix building with clang")
Signed-off-by: Lukas Bulwahn <lukas.bulwahn(a)gmail.com>
Cc: Arnd Bergmann <arnd(a)arndb.de>
Cc: Nathan Chancellor <nathan(a)kernel.org>
Cc: Nick Desaulniers <ndesaulniers(a)google.com>
Cc: Catalin Marinas <catalin.marinas(a)arm.com>
Cc: Barret Rhoden <brho(a)google.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/elfcore.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/linux/elfcore.h~elfcore-correct-reference-to-config_uml
+++ a/include/linux/elfcore.h
@@ -109,7 +109,7 @@ static inline int elf_core_copy_task_fpr
#endif
}
-#if defined(CONFIG_UM) || defined(CONFIG_IA64)
+#if (defined(CONFIG_UML) && defined(CONFIG_X86_32)) || defined(CONFIG_IA64)
/*
* These functions parameterize elf_core_dump in fs/binfmt_elf.c to write out
* extra segments containing the gate DSO contents. Dumping its
_
Patches currently in -mm which might be from lukas.bulwahn(a)gmail.com are
memory-remove-unused-config_mem_block_size.patch
The patch titled
Subject: mm, slub: fix incorrect memcg slab count for bulk free
has been removed from the -mm tree. Its filename was
mm-slub-fix-incorrect-memcg-slab-count-for-bulk-free.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Miaohe Lin <linmiaohe(a)huawei.com>
Subject: mm, slub: fix incorrect memcg slab count for bulk free
kmem_cache_free_bulk() will call memcg_slab_free_hook() for all objects
when doing bulk free. So we shouldn't call memcg_slab_free_hook() again
for bulk free to avoid incorrect memcg slab count.
Link: https://lkml.kernel.org/r/20210916123920.48704-6-linmiaohe@huawei.com
Fixes: d1b2cf6cb84a ("mm: memcg/slab: uncharge during kmem_cache_free_bulk()")
Signed-off-by: Miaohe Lin <linmiaohe(a)huawei.com>
Reviewed-by: Vlastimil Babka <vbabka(a)suse.cz>
Cc: Andrey Konovalov <andreyknvl(a)gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a(a)gmail.com>
Cc: Bharata B Rao <bharata(a)linux.ibm.com>
Cc: Christoph Lameter <cl(a)linux.com>
Cc: David Rientjes <rientjes(a)google.com>
Cc: Faiyaz Mohammed <faiyazm(a)codeaurora.org>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Joonsoo Kim <iamjoonsoo.kim(a)lge.com>
Cc: Kees Cook <keescook(a)chromium.org>
Cc: Pekka Enberg <penberg(a)kernel.org>
Cc: Roman Gushchin <guro(a)fb.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/slub.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/mm/slub.c~mm-slub-fix-incorrect-memcg-slab-count-for-bulk-free
+++ a/mm/slub.c
@@ -3420,7 +3420,9 @@ static __always_inline void do_slab_free
struct kmem_cache_cpu *c;
unsigned long tid;
- memcg_slab_free_hook(s, &head, 1);
+ /* memcg_slab_free_hook() is already called for bulk free. */
+ if (!tail)
+ memcg_slab_free_hook(s, &head, 1);
redo:
/*
* Determine the currently cpus per cpu slab.
_
Patches currently in -mm which might be from linmiaohe(a)huawei.com are
mm-page_allocc-remove-meaningless-vm_bug_on-in-pindex_to_order.patch
mm-page_allocc-simplify-the-code-by-using-macro-k.patch
mm-page_allocc-fix-obsolete-comment-in-free_pcppages_bulk.patch
mm-page_allocc-use-helper-function-zone_spans_pfn.patch
mm-page_allocc-avoid-allocating-highmem-pages-via-alloc_pages_exact.patch
mm-page_isolation-fix-potential-missing-call-to-unset_migratetype_isolate.patch
mm-page_isolation-guard-against-possible-putback-unisolated-page.patch
mm-memory_hotplug-make-hwpoisoned-dirty-swapcache-pages-unmovable.patch
mm-zsmallocc-close-race-window-between-zs_pool_dec_isolated-and-zs_unregister_migration.patch
mm-zsmallocc-combine-two-atomic-ops-in-zs_pool_dec_isolated.patch
The patch titled
Subject: mm, slub: fix potential use-after-free in slab_debugfs_fops
has been removed from the -mm tree. Its filename was
mm-slub-fix-potential-use-after-free-in-slab_debugfs_fops.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Miaohe Lin <linmiaohe(a)huawei.com>
Subject: mm, slub: fix potential use-after-free in slab_debugfs_fops
When sysfs_slab_add failed, we shouldn't call debugfs_slab_add() for s
because s will be freed soon. And slab_debugfs_fops will use s later
leading to a use-after-free.
Link: https://lkml.kernel.org/r/20210916123920.48704-5-linmiaohe@huawei.com
Fixes: 64dd68497be7 ("mm: slub: move sysfs slab alloc/free interfaces to debugfs")
Signed-off-by: Miaohe Lin <linmiaohe(a)huawei.com>
Reviewed-by: Vlastimil Babka <vbabka(a)suse.cz>
Cc: Andrey Konovalov <andreyknvl(a)gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a(a)gmail.com>
Cc: Bharata B Rao <bharata(a)linux.ibm.com>
Cc: Christoph Lameter <cl(a)linux.com>
Cc: David Rientjes <rientjes(a)google.com>
Cc: Faiyaz Mohammed <faiyazm(a)codeaurora.org>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Joonsoo Kim <iamjoonsoo.kim(a)lge.com>
Cc: Kees Cook <keescook(a)chromium.org>
Cc: Pekka Enberg <penberg(a)kernel.org>
Cc: Roman Gushchin <guro(a)fb.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/slub.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/mm/slub.c~mm-slub-fix-potential-use-after-free-in-slab_debugfs_fops
+++ a/mm/slub.c
@@ -4887,13 +4887,15 @@ int __kmem_cache_create(struct kmem_cach
return 0;
err = sysfs_slab_add(s);
- if (err)
+ if (err) {
__kmem_cache_release(s);
+ return err;
+ }
if (s->flags & SLAB_STORE_USER)
debugfs_slab_add(s);
- return err;
+ return 0;
}
void *__kmalloc_track_caller(size_t size, gfp_t gfpflags, unsigned long caller)
_
Patches currently in -mm which might be from linmiaohe(a)huawei.com are
mm-page_allocc-remove-meaningless-vm_bug_on-in-pindex_to_order.patch
mm-page_allocc-simplify-the-code-by-using-macro-k.patch
mm-page_allocc-fix-obsolete-comment-in-free_pcppages_bulk.patch
mm-page_allocc-use-helper-function-zone_spans_pfn.patch
mm-page_allocc-avoid-allocating-highmem-pages-via-alloc_pages_exact.patch
mm-page_isolation-fix-potential-missing-call-to-unset_migratetype_isolate.patch
mm-page_isolation-guard-against-possible-putback-unisolated-page.patch
mm-memory_hotplug-make-hwpoisoned-dirty-swapcache-pages-unmovable.patch
mm-zsmallocc-close-race-window-between-zs_pool_dec_isolated-and-zs_unregister_migration.patch
mm-zsmallocc-combine-two-atomic-ops-in-zs_pool_dec_isolated.patch
The patch titled
Subject: mm, slub: fix potential memoryleak in kmem_cache_open()
has been removed from the -mm tree. Its filename was
mm-slub-fix-potential-memoryleak-in-kmem_cache_open.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Miaohe Lin <linmiaohe(a)huawei.com>
Subject: mm, slub: fix potential memoryleak in kmem_cache_open()
In error path, the random_seq of slub cache might be leaked. Fix this by
using __kmem_cache_release() to release all the relevant resources.
Link: https://lkml.kernel.org/r/20210916123920.48704-4-linmiaohe@huawei.com
Fixes: 210e7a43fa90 ("mm: SLUB freelist randomization")
Signed-off-by: Miaohe Lin <linmiaohe(a)huawei.com>
Reviewed-by: Vlastimil Babka <vbabka(a)suse.cz>
Cc: Andrey Konovalov <andreyknvl(a)gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a(a)gmail.com>
Cc: Bharata B Rao <bharata(a)linux.ibm.com>
Cc: Christoph Lameter <cl(a)linux.com>
Cc: David Rientjes <rientjes(a)google.com>
Cc: Faiyaz Mohammed <faiyazm(a)codeaurora.org>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Joonsoo Kim <iamjoonsoo.kim(a)lge.com>
Cc: Kees Cook <keescook(a)chromium.org>
Cc: Pekka Enberg <penberg(a)kernel.org>
Cc: Roman Gushchin <guro(a)fb.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/slub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/slub.c~mm-slub-fix-potential-memoryleak-in-kmem_cache_open
+++ a/mm/slub.c
@@ -4210,8 +4210,8 @@ static int kmem_cache_open(struct kmem_c
if (alloc_kmem_cache_cpus(s))
return 0;
- free_kmem_cache_nodes(s);
error:
+ __kmem_cache_release(s);
return -EINVAL;
}
_
Patches currently in -mm which might be from linmiaohe(a)huawei.com are
mm-page_allocc-remove-meaningless-vm_bug_on-in-pindex_to_order.patch
mm-page_allocc-simplify-the-code-by-using-macro-k.patch
mm-page_allocc-fix-obsolete-comment-in-free_pcppages_bulk.patch
mm-page_allocc-use-helper-function-zone_spans_pfn.patch
mm-page_allocc-avoid-allocating-highmem-pages-via-alloc_pages_exact.patch
mm-page_isolation-fix-potential-missing-call-to-unset_migratetype_isolate.patch
mm-page_isolation-guard-against-possible-putback-unisolated-page.patch
mm-memory_hotplug-make-hwpoisoned-dirty-swapcache-pages-unmovable.patch
mm-zsmallocc-close-race-window-between-zs_pool_dec_isolated-and-zs_unregister_migration.patch
mm-zsmallocc-combine-two-atomic-ops-in-zs_pool_dec_isolated.patch
The patch titled
Subject: mm, slub: fix mismatch between reconstructed freelist depth and cnt
has been removed from the -mm tree. Its filename was
mm-slub-fix-mismatch-between-reconstructed-freelist-depth-and-cnt.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Miaohe Lin <linmiaohe(a)huawei.com>
Subject: mm, slub: fix mismatch between reconstructed freelist depth and cnt
If object's reuse is delayed, it will be excluded from the reconstructed
freelist. But we forgot to adjust the cnt accordingly. So there will be
a mismatch between reconstructed freelist depth and cnt. This will lead
to free_debug_processing() complaining about freelist count or a incorrect
slub inuse count.
Link: https://lkml.kernel.org/r/20210916123920.48704-3-linmiaohe@huawei.com
Fixes: c3895391df38 ("kasan, slub: fix handling of kasan_slab_free hook")
Signed-off-by: Miaohe Lin <linmiaohe(a)huawei.com>
Reviewed-by: Vlastimil Babka <vbabka(a)suse.cz>
Cc: Andrey Konovalov <andreyknvl(a)gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a(a)gmail.com>
Cc: Bharata B Rao <bharata(a)linux.ibm.com>
Cc: Christoph Lameter <cl(a)linux.com>
Cc: David Rientjes <rientjes(a)google.com>
Cc: Faiyaz Mohammed <faiyazm(a)codeaurora.org>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Joonsoo Kim <iamjoonsoo.kim(a)lge.com>
Cc: Kees Cook <keescook(a)chromium.org>
Cc: Pekka Enberg <penberg(a)kernel.org>
Cc: Roman Gushchin <guro(a)fb.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/slub.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
--- a/mm/slub.c~mm-slub-fix-mismatch-between-reconstructed-freelist-depth-and-cnt
+++ a/mm/slub.c
@@ -1701,7 +1701,8 @@ static __always_inline bool slab_free_ho
}
static inline bool slab_free_freelist_hook(struct kmem_cache *s,
- void **head, void **tail)
+ void **head, void **tail,
+ int *cnt)
{
void *object;
@@ -1728,6 +1729,12 @@ static inline bool slab_free_freelist_ho
*head = object;
if (!*tail)
*tail = object;
+ } else {
+ /*
+ * Adjust the reconstructed freelist depth
+ * accordingly if object's reuse is delayed.
+ */
+ --(*cnt);
}
} while (object != old_tail);
@@ -3480,7 +3487,7 @@ static __always_inline void slab_free(st
* With KASAN enabled slab_free_freelist_hook modifies the freelist
* to remove objects, whose reuse must be delayed.
*/
- if (slab_free_freelist_hook(s, &head, &tail))
+ if (slab_free_freelist_hook(s, &head, &tail, &cnt))
do_slab_free(s, page, head, tail, cnt, addr);
}
_
Patches currently in -mm which might be from linmiaohe(a)huawei.com are
mm-page_allocc-remove-meaningless-vm_bug_on-in-pindex_to_order.patch
mm-page_allocc-simplify-the-code-by-using-macro-k.patch
mm-page_allocc-fix-obsolete-comment-in-free_pcppages_bulk.patch
mm-page_allocc-use-helper-function-zone_spans_pfn.patch
mm-page_allocc-avoid-allocating-highmem-pages-via-alloc_pages_exact.patch
mm-page_isolation-fix-potential-missing-call-to-unset_migratetype_isolate.patch
mm-page_isolation-guard-against-possible-putback-unisolated-page.patch
mm-memory_hotplug-make-hwpoisoned-dirty-swapcache-pages-unmovable.patch
mm-zsmallocc-close-race-window-between-zs_pool_dec_isolated-and-zs_unregister_migration.patch
mm-zsmallocc-combine-two-atomic-ops-in-zs_pool_dec_isolated.patch
The patch titled
Subject: mm, slub: fix two bugs in slab_debug_trace_open()
has been removed from the -mm tree. Its filename was
mm-slub-fix-two-bugs-in-slab_debug_trace_open.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Miaohe Lin <linmiaohe(a)huawei.com>
Subject: mm, slub: fix two bugs in slab_debug_trace_open()
Patch series "Fixups for slub".
This series contains various bug fixes for slub. We fix memoryleak,
use-afer-free, NULL pointer dereferencing and so on in slub. More details
can be found in the respective changelogs.
This patch (of 5):
It's possible that __seq_open_private() will return NULL. So we should
check it before using lest dereferencing NULL pointer. And in error
paths, we forgot to release private buffer via seq_release_private().
Memory will leak in these paths.
Link: https://lkml.kernel.org/r/20210916123920.48704-1-linmiaohe@huawei.com
Link: https://lkml.kernel.org/r/20210916123920.48704-2-linmiaohe@huawei.com
Fixes: 64dd68497be7 ("mm: slub: move sysfs slab alloc/free interfaces to debugfs")
Signed-off-by: Miaohe Lin <linmiaohe(a)huawei.com>
Reviewed-by: Vlastimil Babka <vbabka(a)suse.cz>
Cc: Christoph Lameter <cl(a)linux.com>
Cc: Pekka Enberg <penberg(a)kernel.org>
Cc: David Rientjes <rientjes(a)google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim(a)lge.com>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Faiyaz Mohammed <faiyazm(a)codeaurora.org>
Cc: Andrey Konovalov <andreyknvl(a)gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a(a)gmail.com>
Cc: Kees Cook <keescook(a)chromium.org>
Cc: Bharata B Rao <bharata(a)linux.ibm.com>
Cc: Roman Gushchin <guro(a)fb.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/slub.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/mm/slub.c~mm-slub-fix-two-bugs-in-slab_debug_trace_open
+++ a/mm/slub.c
@@ -6108,9 +6108,14 @@ static int slab_debug_trace_open(struct
struct kmem_cache *s = file_inode(filep)->i_private;
unsigned long *obj_map;
+ if (!t)
+ return -ENOMEM;
+
obj_map = bitmap_alloc(oo_objects(s->oo), GFP_KERNEL);
- if (!obj_map)
+ if (!obj_map) {
+ seq_release_private(inode, filep);
return -ENOMEM;
+ }
if (strcmp(filep->f_path.dentry->d_name.name, "alloc_traces") == 0)
alloc = TRACK_ALLOC;
@@ -6119,6 +6124,7 @@ static int slab_debug_trace_open(struct
if (!alloc_loc_track(t, PAGE_SIZE / sizeof(struct location), GFP_KERNEL)) {
bitmap_free(obj_map);
+ seq_release_private(inode, filep);
return -ENOMEM;
}
_
Patches currently in -mm which might be from linmiaohe(a)huawei.com are
mm-page_allocc-remove-meaningless-vm_bug_on-in-pindex_to_order.patch
mm-page_allocc-simplify-the-code-by-using-macro-k.patch
mm-page_allocc-fix-obsolete-comment-in-free_pcppages_bulk.patch
mm-page_allocc-use-helper-function-zone_spans_pfn.patch
mm-page_allocc-avoid-allocating-highmem-pages-via-alloc_pages_exact.patch
mm-page_isolation-fix-potential-missing-call-to-unset_migratetype_isolate.patch
mm-page_isolation-guard-against-possible-putback-unisolated-page.patch
mm-memory_hotplug-make-hwpoisoned-dirty-swapcache-pages-unmovable.patch
mm-zsmallocc-close-race-window-between-zs_pool_dec_isolated-and-zs_unregister_migration.patch
mm-zsmallocc-combine-two-atomic-ops-in-zs_pool_dec_isolated.patch
The patch titled
Subject: ocfs2: mount fails with buffer overflow in strlen
has been removed from the -mm tree. Its filename was
ocfs2-mount-fails-with-buffer-overflow-in-strlen.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Valentin Vidic <vvidic(a)valentin-vidic.from.hr>
Subject: ocfs2: mount fails with buffer overflow in strlen
Starting with kernel 5.11 built with CONFIG_FORTIFY_SOURCE mouting an
ocfs2 filesystem with either o2cb or pcmk cluster stack fails with the
trace below. Problem seems to be that strings for cluster stack and
cluster name are not guaranteed to be null terminated in the disk
representation, while strlcpy assumes that the source string is always
null terminated. This causes a read outside of the source string
triggering the buffer overflow detection.
detected buffer overflow in strlen
------------[ cut here ]------------
kernel BUG at lib/string.c:1149!
invalid opcode: 0000 [#1] SMP PTI
CPU: 1 PID: 910 Comm: mount.ocfs2 Not tainted 5.14.0-1-amd64 #1
Debian 5.14.6-2
RIP: 0010:fortify_panic+0xf/0x11
...
Call Trace:
ocfs2_initialize_super.isra.0.cold+0xc/0x18 [ocfs2]
ocfs2_fill_super+0x359/0x19b0 [ocfs2]
mount_bdev+0x185/0x1b0
? ocfs2_remount+0x440/0x440 [ocfs2]
legacy_get_tree+0x27/0x40
vfs_get_tree+0x25/0xb0
path_mount+0x454/0xa20
__x64_sys_mount+0x103/0x140
do_syscall_64+0x3b/0xc0
entry_SYSCALL_64_after_hwframe+0x44/0xae
Link: https://lkml.kernel.org/r/20210929180654.32460-1-vvidic@valentin-vidic.fromβ¦
Signed-off-by: Valentin Vidic <vvidic(a)valentin-vidic.from.hr>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/ocfs2/super.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
--- a/fs/ocfs2/super.c~ocfs2-mount-fails-with-buffer-overflow-in-strlen
+++ a/fs/ocfs2/super.c
@@ -2167,11 +2167,17 @@ static int ocfs2_initialize_super(struct
}
if (ocfs2_clusterinfo_valid(osb)) {
+ /*
+ * ci_stack and ci_cluster in ocfs2_cluster_info may not be null
+ * terminated, so make sure no overflow happens here by using
+ * memcpy. Destination strings will always be null terminated
+ * because osb is allocated using kzalloc.
+ */
osb->osb_stackflags =
OCFS2_RAW_SB(di)->s_cluster_info.ci_stackflags;
- strlcpy(osb->osb_cluster_stack,
+ memcpy(osb->osb_cluster_stack,
OCFS2_RAW_SB(di)->s_cluster_info.ci_stack,
- OCFS2_STACK_LABEL_LEN + 1);
+ OCFS2_STACK_LABEL_LEN);
if (strlen(osb->osb_cluster_stack) != OCFS2_STACK_LABEL_LEN) {
mlog(ML_ERROR,
"couldn't mount because of an invalid "
@@ -2180,9 +2186,9 @@ static int ocfs2_initialize_super(struct
status = -EINVAL;
goto bail;
}
- strlcpy(osb->osb_cluster_name,
+ memcpy(osb->osb_cluster_name,
OCFS2_RAW_SB(di)->s_cluster_info.ci_cluster,
- OCFS2_CLUSTER_NAME_LEN + 1);
+ OCFS2_CLUSTER_NAME_LEN);
} else {
/* The empty string is identical with classic tools that
* don't know about s_cluster_info. */
_
Patches currently in -mm which might be from vvidic(a)valentin-vidic.from.hr are
ocfs2-cleanup-journal-init-and-shutdown.patch
The patch titled
Subject: ocfs2: fix data corruption after conversion from inline format
has been removed from the -mm tree. Its filename was
ocfs2-fix-data-corruption-after-conversion-from-inline-format.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Jan Kara <jack(a)suse.cz>
Subject: ocfs2: fix data corruption after conversion from inline format
Commit 6dbf7bb55598 ("fs: Don't invalidate page buffers in
block_write_full_page()") uncovered a latent bug in ocfs2 conversion
from inline inode format to a normal inode format.
The code in
ocfs2_convert_inline_data_to_extents() attempts to zero out the whole
cluster allocated for file data by grabbing, zeroing, and dirtying all
pages covering this cluster. However these pages are beyond i_size, thus
writeback code generally ignores these dirty pages and no blocks were
ever actually zeroed on the disk.
This oversight was fixed by commit 693c241a5f6a ("ocfs2: No need to zero
pages past i_size.") for standard ocfs2 write path, inline conversion path
was apparently forgotten; the commit log also has a reasoning why the
zeroing actually is not needed.
After commit 6dbf7bb55598, things became worse as writeback code stopped
invalidating buffers on pages beyond i_size and thus these pages end up
with clean PageDirty bit but with buffers attached to these pages being
still dirty. So when a file is converted from inline format, then
writeback triggers, and then the file is grown so that these pages become
valid, the invalid dirtiness state is preserved, mark_buffer_dirty() does
nothing on these pages (buffers are already dirty) but page is never
written back because it is clean. So data written to these pages is lost
once pages are reclaimed.
Simple reproducer for the problem is:
xfs_io -f -c "pwrite 0 2000" -c "pwrite 2000 2000" -c "fsync" \
-c "pwrite 4000 2000" ocfs2_file
After unmounting and mounting the fs again, you can observe that end of
'ocfs2_file' has lost its contents.
Fix the problem by not doing the pointless zeroing during conversion
from inline format similarly as in the standard write path.
[akpm(a)linux-foundation.org: fix whitespace, per Joseph]
Link: https://lkml.kernel.org/r/20210930095405.21433-1-jack@suse.cz
Fixes: 6dbf7bb55598 ("fs: Don't invalidate page buffers in block_write_full_page()")
Signed-off-by: Jan Kara <jack(a)suse.cz>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Tested-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Acked-by: Gang He <ghe(a)suse.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: "Markov, Andrey" <Markov.Andrey(a)Dell.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/ocfs2/alloc.c | 46 +++++++++++----------------------------------
1 file changed, 12 insertions(+), 34 deletions(-)
--- a/fs/ocfs2/alloc.c~ocfs2-fix-data-corruption-after-conversion-from-inline-format
+++ a/fs/ocfs2/alloc.c
@@ -7045,7 +7045,7 @@ void ocfs2_set_inode_data_inline(struct
int ocfs2_convert_inline_data_to_extents(struct inode *inode,
struct buffer_head *di_bh)
{
- int ret, i, has_data, num_pages = 0;
+ int ret, has_data, num_pages = 0;
int need_free = 0;
u32 bit_off, num;
handle_t *handle;
@@ -7054,26 +7054,17 @@ int ocfs2_convert_inline_data_to_extents
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data;
struct ocfs2_alloc_context *data_ac = NULL;
- struct page **pages = NULL;
- loff_t end = osb->s_clustersize;
+ struct page *page = NULL;
struct ocfs2_extent_tree et;
int did_quota = 0;
has_data = i_size_read(inode) ? 1 : 0;
if (has_data) {
- pages = kcalloc(ocfs2_pages_per_cluster(osb->sb),
- sizeof(struct page *), GFP_NOFS);
- if (pages == NULL) {
- ret = -ENOMEM;
- mlog_errno(ret);
- return ret;
- }
-
ret = ocfs2_reserve_clusters(osb, 1, &data_ac);
if (ret) {
mlog_errno(ret);
- goto free_pages;
+ goto out;
}
}
@@ -7093,7 +7084,8 @@ int ocfs2_convert_inline_data_to_extents
}
if (has_data) {
- unsigned int page_end;
+ unsigned int page_end = min_t(unsigned, PAGE_SIZE,
+ osb->s_clustersize);
u64 phys;
ret = dquot_alloc_space_nodirty(inode,
@@ -7117,15 +7109,8 @@ int ocfs2_convert_inline_data_to_extents
*/
block = phys = ocfs2_clusters_to_blocks(inode->i_sb, bit_off);
- /*
- * Non sparse file systems zero on extend, so no need
- * to do that now.
- */
- if (!ocfs2_sparse_alloc(osb) &&
- PAGE_SIZE < osb->s_clustersize)
- end = PAGE_SIZE;
-
- ret = ocfs2_grab_eof_pages(inode, 0, end, pages, &num_pages);
+ ret = ocfs2_grab_eof_pages(inode, 0, page_end, &page,
+ &num_pages);
if (ret) {
mlog_errno(ret);
need_free = 1;
@@ -7136,20 +7121,15 @@ int ocfs2_convert_inline_data_to_extents
* This should populate the 1st page for us and mark
* it up to date.
*/
- ret = ocfs2_read_inline_data(inode, pages[0], di_bh);
+ ret = ocfs2_read_inline_data(inode, page, di_bh);
if (ret) {
mlog_errno(ret);
need_free = 1;
goto out_unlock;
}
- page_end = PAGE_SIZE;
- if (PAGE_SIZE > osb->s_clustersize)
- page_end = osb->s_clustersize;
-
- for (i = 0; i < num_pages; i++)
- ocfs2_map_and_dirty_page(inode, handle, 0, page_end,
- pages[i], i > 0, &phys);
+ ocfs2_map_and_dirty_page(inode, handle, 0, page_end, page, 0,
+ &phys);
}
spin_lock(&oi->ip_lock);
@@ -7180,8 +7160,8 @@ int ocfs2_convert_inline_data_to_extents
}
out_unlock:
- if (pages)
- ocfs2_unlock_and_free_pages(pages, num_pages);
+ if (page)
+ ocfs2_unlock_and_free_pages(&page, num_pages);
out_commit:
if (ret < 0 && did_quota)
@@ -7205,8 +7185,6 @@ out_commit:
out:
if (data_ac)
ocfs2_free_alloc_context(data_ac);
-free_pages:
- kfree(pages);
return ret;
}
_
Patches currently in -mm which might be from jack(a)suse.cz are
The patch titled
Subject: userfaultfd: fix a race between writeprotect and exit_mmap()
has been removed from the -mm tree. Its filename was
userfaultfd-fix-a-race-between-writeprotect-and-exit_mmap.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Nadav Amit <namit(a)vmware.com>
Subject: userfaultfd: fix a race between writeprotect and exit_mmap()
A race is possible when a process exits, its VMAs are removed by
exit_mmap() and at the same time userfaultfd_writeprotect() is called.
The race was detected by KASAN on a development kernel, but it appears to
be possible on vanilla kernels as well.
Use mmget_not_zero() to prevent the race as done in other userfaultfd
operations.
Link: https://lkml.kernel.org/r/20210921200247.25749-1-namit@vmware.com
Fixes: 63b2d4174c4ad ("userfaultfd: wp: add the writeprotect API to userfaultfd ioctl")
Signed-off-by: Nadav Amit <namit(a)vmware.com>
Tested-by: Li Wang <liwang(a)redhat.com>
Reviewed-by: Peter Xu <peterx(a)redhat.com>
Cc: Andrea Arcangeli <aarcange(a)redhat.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/userfaultfd.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
--- a/fs/userfaultfd.c~userfaultfd-fix-a-race-between-writeprotect-and-exit_mmap
+++ a/fs/userfaultfd.c
@@ -1827,9 +1827,15 @@ static int userfaultfd_writeprotect(stru
if (mode_wp && mode_dontwake)
return -EINVAL;
- ret = mwriteprotect_range(ctx->mm, uffdio_wp.range.start,
- uffdio_wp.range.len, mode_wp,
- &ctx->mmap_changing);
+ if (mmget_not_zero(ctx->mm)) {
+ ret = mwriteprotect_range(ctx->mm, uffdio_wp.range.start,
+ uffdio_wp.range.len, mode_wp,
+ &ctx->mmap_changing);
+ mmput(ctx->mm);
+ } else {
+ return -ESRCH;
+ }
+
if (ret)
return ret;
_
Patches currently in -mm which might be from namit(a)vmware.com are
The patch titled
Subject: mm/userfaultfd: selftests: fix memory corruption with thp enabled
has been removed from the -mm tree. Its filename was
mm-userfaultfd-selftests-fix-memory-corruption-with-thp-enabled.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Peter Xu <peterx(a)redhat.com>
Subject: mm/userfaultfd: selftests: fix memory corruption with thp enabled
In RHEL's gating selftests we've encountered memory corruption in the uffd
event test even with upstream kernel:
# ./userfaultfd anon 128 4
nr_pages: 32768, nr_pages_per_cpu: 32768
bounces: 3, mode: rnd racing read, userfaults: 6240 missing (6240) 14729 wp (14729)
bounces: 2, mode: racing read, userfaults: 1444 missing (1444) 28877 wp (28877)
bounces: 1, mode: rnd read, userfaults: 6055 missing (6055) 14699 wp (14699)
bounces: 0, mode: read, userfaults: 82 missing (82) 25196 wp (25196)
testing uffd-wp with pagemap (pgsize=4096): done
testing uffd-wp with pagemap (pgsize=2097152): done
testing events (fork, remap, remove): ERROR: nr 32427 memory corruption 0 1 (errno=0, line=963)
ERROR: faulting process failed (errno=0, line=1117)
It can be easily reproduced when global thp enabled, which is the default for
RHEL.
It's also known as a side effect of commit 0db282ba2c12 ("selftest: use
mmap instead of posix_memalign to allocate memory", 2021-07-23), which is
imho right itself on using mmap() to make sure the addresses will be
untagged even on arm.
The problem is, for each test we allocate buffers using two
allocate_area() calls. We assumed these two buffers won't affect each
other, however they could, because mmap() could have found that the two
buffers are near each other and having the same VMA flags, so they got
merged into one VMA.
It won't be a big problem if thp is not enabled, but when thp is
agressively enabled it means when initializing the src buffer it could
accidentally setup part of the dest buffer too when there's a shared THP
that overlaps the two regions. Then some of the dest buffer won't be able
to be trapped by userfaultfd missing mode, then it'll cause memory
corruption as described.
To fix it, do release_pages() after initializing the src buffer.
Since the previous two release_pages() calls are after
uffd_test_ctx_clear() which will unmap all the buffers anyway (which is
stronger than release pages; as unmap() also tear town pgtables), drop
them as they shouldn't really be anything useful.
We can mark the Fixes tag upon 0db282ba2c12 as it's reported to only
happen there, however the real "Fixes" IMHO should be 8ba6e8640844, as
before that commit we'll always do explicit release_pages() before
registration of uffd, and 8ba6e8640844 changed that logic by adding extra
unmap/map and we didn't release the pages at the right place. Meanwhile I
don't have a solid glue anyway on whether posix_memalign() could always
avoid triggering this bug, hence it's safer to attach this fix to commit
8ba6e8640844.
Link: https://lkml.kernel.org/r/20210923232512.210092-1-peterx@redhat.com
Fixes: 8ba6e8640844 ("userfaultfd/selftests: reinitialize test context in each test")
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1994931
Signed-off-by: Peter Xu <peterx(a)redhat.com>
Reported-by: Li Wang <liwan(a)redhat.com>
Tested-by: Li Wang <liwang(a)redhat.com>
Reviewed-by: Axel Rasmussen <axelrasmussen(a)google.com>
Cc: Andrea Arcangeli <aarcange(a)redhat.com>
Cc: Nadav Amit <nadav.amit(a)gmail.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
tools/testing/selftests/vm/userfaultfd.c | 23 ++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
--- a/tools/testing/selftests/vm/userfaultfd.c~mm-userfaultfd-selftests-fix-memory-corruption-with-thp-enabled
+++ a/tools/testing/selftests/vm/userfaultfd.c
@@ -414,9 +414,6 @@ static void uffd_test_ctx_init_ext(uint6
uffd_test_ops->allocate_area((void **)&area_src);
uffd_test_ops->allocate_area((void **)&area_dst);
- uffd_test_ops->release_pages(area_src);
- uffd_test_ops->release_pages(area_dst);
-
userfaultfd_open(features);
count_verify = malloc(nr_pages * sizeof(unsigned long long));
@@ -437,6 +434,26 @@ static void uffd_test_ctx_init_ext(uint6
*(area_count(area_src, nr) + 1) = 1;
}
+ /*
+ * After initialization of area_src, we must explicitly release pages
+ * for area_dst to make sure it's fully empty. Otherwise we could have
+ * some area_dst pages be errornously initialized with zero pages,
+ * hence we could hit memory corruption later in the test.
+ *
+ * One example is when THP is globally enabled, above allocate_area()
+ * calls could have the two areas merged into a single VMA (as they
+ * will have the same VMA flags so they're mergeable). When we
+ * initialize the area_src above, it's possible that some part of
+ * area_dst could have been faulted in via one huge THP that will be
+ * shared between area_src and area_dst. It could cause some of the
+ * area_dst won't be trapped by missing userfaults.
+ *
+ * This release_pages() will guarantee even if that happened, we'll
+ * proactively split the thp and drop any accidentally initialized
+ * pages within area_dst.
+ */
+ uffd_test_ops->release_pages(area_dst);
+
pipefd = malloc(sizeof(int) * nr_cpus * 2);
if (!pipefd)
err("pipefd");
_
Patches currently in -mm which might be from peterx(a)redhat.com are
mm-smaps-fix-shmem-pte-hole-swap-calculation.patch
mm-smaps-use-vma-vm_pgoff-directly-when-counting-partial-swap.patch
mm-smaps-simplify-shmem-handling-of-pte-holes.patch
mm-memcg-drop-swp_entry_t-in-mc_handle_file_pte.patch
mm-shmem-unconditionally-set-pte-dirty-in-mfill_atomic_install_pte.patch
mm-clear-vmf-pte-after-pte_unmap_same-returns.patch
mm-drop-first_index-last_index-in-zap_details.patch
mm-add-zap_skip_check_mapping-helper.patch
mm-hugetlb-drop-__unmap_hugepage_range-definition-from-hugetlbh.patch
Hello,
We ran automated tests on a recent commit from this kernel tree:
Kernel repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Commit: 6b894d18a514 - Linux 5.14.14-rc2
The results of these automated tests are provided below.
Overall result: PASSED
Merge: OK
Compile: OK
Tests: OK
Targeted tests: NO
All kernel binaries, config files, and logs are available for download here:
https://arr-cki-prod-datawarehouse-public.s3.amazonaws.com/index.html?prefiβ¦
Please reply to this email if you have any questions about the tests that we
ran or if you have any suggestions on how to make future tests more effective.
,-. ,-.
( C ) ( K ) Continuous
`-',-.`-' Kernel
( I ) Integration
`-'
______________________________________________________________________________
Compile testing
---------------
We compiled the kernel for 4 architectures:
aarch64:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
ppc64le:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
s390x:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
x86_64:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
Hardware testing
----------------
We booted each kernel and ran the following tests:
aarch64:
Host 1:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ Networking bridge: sanity - mlx5
β‘β‘β‘ Ethernet drivers sanity - mlx5
Host 2:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ xfstests - ext4
β‘β‘β‘ xfstests - xfs
β‘β‘β‘ IPMI driver test
β‘β‘β‘ IPMItool loop stress test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
β‘β‘β‘ stress: stress-ng - interrupt
β‘β‘β‘ stress: stress-ng - cpu
β‘β‘β‘ stress: stress-ng - cpu-cache
β‘β‘β‘ stress: stress-ng - memory
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ stress: stress-ng - os
Host 3:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - nvmeof-mp
Host 4:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ ACPI table test
β‘β‘β‘ ACPI enabled test
β‘β‘β‘ LTP - cve
β‘β‘β‘ LTP - sched
β‘β‘β‘ LTP - syscalls
β‘β‘β‘ LTP - can
β‘β‘β‘ LTP - commands
β‘β‘β‘ LTP - containers
β‘β‘β‘ LTP - dio
β‘β‘β‘ LTP - fs
β‘β‘β‘ LTP - fsx
β‘β‘β‘ LTP - math
β‘β‘β‘ LTP - hugetlb
β‘β‘β‘ LTP - mm
β‘β‘β‘ LTP - nptl
β‘β‘β‘ LTP - pty
β‘β‘β‘ LTP - ipc
β‘β‘β‘ LTP - tracing
β‘β‘β‘ LTP: openposix test suite
β‘β‘β‘ CIFS Connectathon
β‘β‘β‘ POSIX pjd-fstest suites
β‘β‘β‘ NFS Connectathon
β‘β‘β‘ Loopdev Sanity
β‘β‘β‘ jvm - jcstress tests
β‘β‘β‘ Memory: fork_mem
β‘β‘β‘ Memory function: memfd_create
β‘β‘β‘ AMTU (Abstract Machine Test Utility)
β‘β‘β‘ Networking bridge: sanity
β‘β‘β‘ Ethernet drivers sanity
β‘β‘β‘ Networking socket: fuzz
β‘β‘β‘ Networking route: pmtu
β‘β‘β‘ Networking route_func - local
β‘β‘β‘ Networking route_func - forward
β‘β‘β‘ Networking TCP: keepalive test
β‘β‘β‘ Networking UDP: socket
β‘β‘β‘ Networking cki netfilter test
β‘β‘β‘ Networking tunnel: geneve basic test
β‘β‘β‘ Networking tunnel: gre basic
β‘β‘β‘ L2TP basic test
β‘β‘β‘ Networking tunnel: vxlan basic
β‘β‘β‘ Networking ipsec: basic netns - transport
β‘β‘β‘ Networking ipsec: basic netns - tunnel
β‘β‘β‘ Libkcapi AF_ALG test
β‘β‘β‘ pciutils: update pci ids test
β‘β‘β‘ ALSA PCM loopback test
β‘β‘β‘ ALSA Control (mixer) Userspace Element test
β‘β‘β‘ storage: dm/common
β‘β‘β‘ lvm snapper test
β‘β‘β‘ storage: SCSI VPD
β‘β‘β‘ trace: ftrace/tracer
π§ β‘β‘β‘ xarray-idr-radixtree-test
π§ β‘β‘β‘ i2c: i2cdetect sanity
π§ β‘β‘β‘ Firmware test suite
π§ β‘β‘β‘ Memory function: kaslr
π§ β‘β‘β‘ Networking: igmp conformance test
π§ β‘β‘β‘ audit: audit testsuite test
π§ β‘β‘β‘ lvm cache test
Host 5:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - srp
Host 6:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ ACPI table test
β‘β‘β‘ ACPI enabled test
β‘β‘β‘ LTP - cve
β‘β‘β‘ LTP - sched
β‘β‘β‘ LTP - syscalls
β‘β‘β‘ LTP - can
β‘β‘β‘ LTP - commands
β‘β‘β‘ LTP - containers
β‘β‘β‘ LTP - dio
β‘β‘β‘ LTP - fs
β‘β‘β‘ LTP - fsx
β‘β‘β‘ LTP - math
β‘β‘β‘ LTP - hugetlb
β‘β‘β‘ LTP - mm
β‘β‘β‘ LTP - nptl
β‘β‘β‘ LTP - pty
β‘β‘β‘ LTP - ipc
β‘β‘β‘ LTP - tracing
β‘β‘β‘ LTP: openposix test suite
β‘β‘β‘ CIFS Connectathon
β‘β‘β‘ POSIX pjd-fstest suites
β‘β‘β‘ NFS Connectathon
β‘β‘β‘ Loopdev Sanity
β‘β‘β‘ jvm - jcstress tests
β‘β‘β‘ Memory: fork_mem
β‘β‘β‘ Memory function: memfd_create
β‘β‘β‘ AMTU (Abstract Machine Test Utility)
β‘β‘β‘ Networking bridge: sanity
β‘β‘β‘ Ethernet drivers sanity
β‘β‘β‘ Networking socket: fuzz
β‘β‘β‘ Networking route: pmtu
β‘β‘β‘ Networking route_func - local
β‘β‘β‘ Networking route_func - forward
β‘β‘β‘ Networking TCP: keepalive test
β‘β‘β‘ Networking UDP: socket
β‘β‘β‘ Networking cki netfilter test
β‘β‘β‘ Networking tunnel: geneve basic test
β‘β‘β‘ Networking tunnel: gre basic
β‘β‘β‘ L2TP basic test
β‘β‘β‘ Networking tunnel: vxlan basic
β‘β‘β‘ Networking ipsec: basic netns - transport
β‘β‘β‘ Networking ipsec: basic netns - tunnel
β‘β‘β‘ Libkcapi AF_ALG test
β‘β‘β‘ pciutils: update pci ids test
β‘β‘β‘ ALSA PCM loopback test
β‘β‘β‘ ALSA Control (mixer) Userspace Element test
β‘β‘β‘ storage: dm/common
β‘β‘β‘ lvm snapper test
β‘β‘β‘ storage: SCSI VPD
β‘β‘β‘ trace: ftrace/tracer
π§ β‘β‘β‘ xarray-idr-radixtree-test
π§ β‘β‘β‘ i2c: i2cdetect sanity
π§ β‘β‘β‘ Firmware test suite
π§ β‘β‘β‘ Memory function: kaslr
π§ β‘β‘β‘ Networking: igmp conformance test
π§ β‘β‘β‘ audit: audit testsuite test
π§ β‘β‘β‘ lvm cache test
Host 7:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - nvmeof-mp
ppc64le:
Host 1:
β Boot test
β Reboot test
β xfstests - ext4
β xfstests - xfs
β IPMI driver test
β IPMItool loop stress test
β selinux-policy: serge-testsuite
β Storage blktests - blk
β Storage block - filesystem fio test
β Storage block - queue scheduler test
β storage: software RAID testing
β Storage: swraid mdadm raid_module test
π§ β Podman system test - as root
π§ β Podman system test - as user
π§ β xfstests - btrfs
π§ β Storage blktests - nvme-tcp
π§ β Storage: lvm device-mapper test - upstream
Host 2:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 3:
β Boot test
β Reboot test
β LTP - cve
β LTP - sched
β LTP - syscalls
β LTP - can
β LTP - commands
β LTP - containers
β LTP - dio
β LTP - fs
β LTP - fsx
β LTP - math
β LTP - hugetlb
β LTP - mm
β LTP - nptl
β LTP - pty
β LTP - ipc
β LTP - tracing
β LTP: openposix test suite
β CIFS Connectathon
β POSIX pjd-fstest suites
β NFS Connectathon
β Loopdev Sanity
β jvm - jcstress tests
β Memory: fork_mem
β Memory function: memfd_create
β AMTU (Abstract Machine Test Utility)
β Networking bridge: sanity
β Ethernet drivers sanity
β Networking socket: fuzz
β Networking route: pmtu
β Networking route_func - local
β Networking route_func - forward
β Networking TCP: keepalive test
β Networking UDP: socket
β Networking cki netfilter test
β Networking tunnel: geneve basic test
β Networking tunnel: gre basic
β L2TP basic test
β Networking tunnel: vxlan basic
β Networking ipsec: basic netns - tunnel
β Libkcapi AF_ALG test
β pciutils: update pci ids test
β ALSA PCM loopback test
β ALSA Control (mixer) Userspace Element test
β storage: dm/common
β lvm snapper test
β trace: ftrace/tracer
π§ β xarray-idr-radixtree-test
π§ β Memory function: kaslr
π§ β audit: audit testsuite test
π§ β lvm cache test
Host 4:
β Boot test
β Reboot test
π§ β Storage blktests - srp
s390x:
Host 1:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β Boot test
β Reboot test
β selinux-policy: serge-testsuite
β Storage blktests - blk
β Storage: swraid mdadm raid_module test
β stress: stress-ng - interrupt
β stress: stress-ng - cpu
β stress: stress-ng - cpu-cache
β stress: stress-ng - memory
π§ β Podman system test - as root
π§ β Podman system test - as user
π§ β Storage blktests - nvme-tcp
π§ β‘β‘β‘ stress: stress-ng - os
Host 2:
β Boot test
β Reboot test
β LTP - cve
β LTP - sched
β LTP - syscalls
β LTP - can
β LTP - commands
β LTP - containers
β LTP - dio
β LTP - fs
β LTP - fsx
β LTP - math
β LTP - hugetlb
β LTP - mm
β LTP - nptl
β LTP - pty
β LTP - ipc
β LTP - tracing
β LTP: openposix test suite
β CIFS Connectathon
β POSIX pjd-fstest suites
β NFS Connectathon
β Loopdev Sanity
β jvm - jcstress tests
β Memory: fork_mem
β Memory function: memfd_create
β AMTU (Abstract Machine Test Utility)
β Networking bridge: sanity
β Ethernet drivers sanity
β Networking route: pmtu
β Networking route_func - local
β Networking route_func - forward
β Networking TCP: keepalive test
β Networking UDP: socket
β Networking cki netfilter test
β Networking tunnel: geneve basic test
β Networking tunnel: gre basic
β L2TP basic test
β Networking tunnel: vxlan basic
β Networking ipsec: basic netns - transport
β Networking ipsec: basic netns - tunnel
β Libkcapi AF_ALG test
β storage: dm/common
β lvm snapper test
β trace: ftrace/tracer
π§ β xarray-idr-radixtree-test
π§ β Memory function: kaslr
π§ β audit: audit testsuite test
π§ β lvm cache test
Host 3:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 4:
β Boot test
β Reboot test
π§ π₯ Storage blktests - srp
x86_64:
Host 1:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - srp
Host 2:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - nvmeof-mp
Host 3:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β Boot test
β Reboot test
β ACPI table test
β LTP - cve
β LTP - sched
β‘β‘β‘ LTP - syscalls
β‘β‘β‘ LTP - can
β‘β‘β‘ LTP - commands
β‘β‘β‘ LTP - containers
β‘β‘β‘ LTP - dio
β‘β‘β‘ LTP - fs
β‘β‘β‘ LTP - fsx
β‘β‘β‘ LTP - math
β‘β‘β‘ LTP - hugetlb
β‘β‘β‘ LTP - mm
β‘β‘β‘ LTP - nptl
β‘β‘β‘ LTP - pty
β‘β‘β‘ LTP - ipc
β‘β‘β‘ LTP - tracing
β‘β‘β‘ LTP: openposix test suite
β‘β‘β‘ CIFS Connectathon
β‘β‘β‘ POSIX pjd-fstest suites
β‘β‘β‘ NFS Connectathon
β‘β‘β‘ Loopdev Sanity
β‘β‘β‘ jvm - jcstress tests
β‘β‘β‘ Memory: fork_mem
β‘β‘β‘ Memory function: memfd_create
β‘β‘β‘ AMTU (Abstract Machine Test Utility)
β‘β‘β‘ Networking bridge: sanity
β‘β‘β‘ Ethernet drivers sanity
β‘β‘β‘ Networking socket: fuzz
β‘β‘β‘ Networking route: pmtu
β‘β‘β‘ Networking route_func - local
β‘β‘β‘ Networking route_func - forward
β‘β‘β‘ Networking TCP: keepalive test
β‘β‘β‘ Networking UDP: socket
β‘β‘β‘ Networking cki netfilter test
β‘β‘β‘ Networking tunnel: geneve basic test
β‘β‘β‘ Networking tunnel: gre basic
β‘β‘β‘ L2TP basic test
β‘β‘β‘ Networking tunnel: vxlan basic
β‘β‘β‘ Networking ipsec: basic netns - transport
β‘β‘β‘ Networking ipsec: basic netns - tunnel
β‘β‘β‘ Libkcapi AF_ALG test
β‘β‘β‘ pciutils: sanity smoke test
β‘β‘β‘ pciutils: update pci ids test
β‘β‘β‘ ALSA PCM loopback test
β‘β‘β‘ ALSA Control (mixer) Userspace Element test
β‘β‘β‘ storage: dm/common
β‘β‘β‘ lvm snapper test
β‘β‘β‘ storage: SCSI VPD
β‘β‘β‘ trace: ftrace/tracer
π§ β‘β‘β‘ xarray-idr-radixtree-test
π§ β‘β‘β‘ i2c: i2cdetect sanity
π§ β‘β‘β‘ Firmware test suite
π§ β‘β‘β‘ Memory function: kaslr
π§ β‘β‘β‘ Networking: igmp conformance test
π§ β‘β‘β‘ audit: audit testsuite test
π§ β‘β‘β‘ lvm cache test
Host 4:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ xfstests - ext4
β‘β‘β‘ xfstests - xfs
β‘β‘β‘ xfstests - nfsv4.2
β‘β‘β‘ xfstests - cifsv3.11
β‘β‘β‘ IPMI driver test
β‘β‘β‘ IPMItool loop stress test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ power-management: cpupower/sanity test
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
β‘β‘β‘ stress: stress-ng - interrupt
β‘β‘β‘ stress: stress-ng - cpu
β‘β‘β‘ stress: stress-ng - cpu-cache
β‘β‘β‘ stress: stress-ng - memory
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ CPU: Idle Test
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ Storage: lvm device-mapper test - upstream
π§ β‘β‘β‘ stress: stress-ng - os
Host 5:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - srp
Host 6:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - nvmeof-mp
Test sources: https://gitlab.com/cki-project/kernel-tests
π Pull requests are welcome for new tests or improvements to existing tests!
Aborted tests
-------------
Tests that didn't complete running successfully are marked with β‘β‘β‘.
If this was caused by an infrastructure issue, we try to mark that
explicitly in the report.
Waived tests
------------
If the test run included waived tests, they are marked with π§. Such tests are
executed but their results are not taken into account. Tests are waived when
their results are not reliable enough, e.g. when they're just introduced or are
being fixed.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running yet are marked with β±.
Targeted tests
--------------
Test runs for patches always include a set of base tests, plus some
tests chosen based on the file paths modified by the patch. The latter
are called "targeted tests". If no targeted tests are run, that means
no patch-specific tests are available. Please, consider contributing a
targeted test for related patches to increase test coverage. See
https://docs.engineering.redhat.com/x/_wEZB for more details.
When runtime support for converting between 4-level and 5-level pagetables
was added to the kernel, the SME code that built pagetables was updated
to use the pagetable functions, e.g. p4d_offset(), etc., in order to
simplify the code. However, the use of the pagetable functions in early
boot code requires the use of the USE_EARLY_PGTABLE_L5 #define in order to
ensure that proper definition of pgtable_l5_enabled() is used.
Without the #define, pgtable_l5_enabled() is #defined as
cpu_feature_enabled(X86_FEATURE_LA57). In early boot, the CPU features
have not yet been discovered and populated, so pgtable_l5_enabled() will
return false even when 5-level paging is enabled. This causes the SME code
to always build 4-level pagetables to perform the in-place encryption.
If 5-level paging is enabled, switching to the SME pagetables results in
a page-fault that kills the boot.
Adding the #define results in pgtable_l5_enabled() using the
__pgtable_l5_enabled variable set in early boot and the SME code building
pagetables for the proper paging level.
Cc: <stable(a)vger.kernel.org> # 4.18.x
Fixes: aad983913d77 ("x86/mm/encrypt: Simplify sme_populate_pgd() and sme_populate_pgd_large()")
Signed-off-by: Tom Lendacky <thomas.lendacky(a)amd.com>
---
arch/x86/mm/mem_encrypt_identity.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/x86/mm/mem_encrypt_identity.c b/arch/x86/mm/mem_encrypt_identity.c
index f8c612902038..3f0abb403340 100644
--- a/arch/x86/mm/mem_encrypt_identity.c
+++ b/arch/x86/mm/mem_encrypt_identity.c
@@ -27,6 +27,15 @@
#undef CONFIG_PARAVIRT_XXL
#undef CONFIG_PARAVIRT_SPINLOCKS
+/*
+ * This code runs before CPU feature bits are set. By default, the
+ * pgtable_l5_enabled() function uses bit X86_FEATURE_LA57 to determine if
+ * 5-level paging is active, so that won't work here. USE_EARLY_PGTABLE_L5
+ * is provided to handle this situation and, instead, use a variable that
+ * has been set by the early boot code.
+ */
+#define USE_EARLY_PGTABLE_L5
+
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/mem_encrypt.h>
--
2.33.1
Hello,
We ran automated tests on a recent commit from this kernel tree:
Kernel repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Commit: 95f523a7b5ed - ionic: don't remove netdev->dev_addr when syncing uc list
The results of these automated tests are provided below.
Overall result: PASSED
Merge: OK
Compile: OK
Tests: OK
Targeted tests: NO
All kernel binaries, config files, and logs are available for download here:
https://arr-cki-prod-datawarehouse-public.s3.amazonaws.com/index.html?prefiβ¦
Please reply to this email if you have any questions about the tests that we
ran or if you have any suggestions on how to make future tests more effective.
,-. ,-.
( C ) ( K ) Continuous
`-',-.`-' Kernel
( I ) Integration
`-'
______________________________________________________________________________
Compile testing
---------------
We compiled the kernel for 4 architectures:
aarch64:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
ppc64le:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
s390x:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
x86_64:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
Hardware testing
----------------
We booted each kernel and ran the following tests:
aarch64:
Host 1:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ xfstests - ext4
β‘β‘β‘ xfstests - xfs
β‘β‘β‘ IPMI driver test
β‘β‘β‘ IPMItool loop stress test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
β‘β‘β‘ stress: stress-ng - interrupt
β‘β‘β‘ stress: stress-ng - cpu
β‘β‘β‘ stress: stress-ng - cpu-cache
β‘β‘β‘ stress: stress-ng - memory
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ stress: stress-ng - os
Host 2:
β Boot test
β Reboot test
π§ β Storage blktests - srp
Host 3:
β Boot test
β Reboot test
β Networking bridge: sanity - mlx5
β Ethernet drivers sanity - mlx5
Host 4:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 5:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ ACPI table test
β‘β‘β‘ ACPI enabled test
β‘β‘β‘ LTP - cve
β‘β‘β‘ LTP - sched
β‘β‘β‘ LTP - syscalls
β‘β‘β‘ LTP - can
β‘β‘β‘ LTP - commands
β‘β‘β‘ LTP - containers
β‘β‘β‘ LTP - dio
β‘β‘β‘ LTP - fs
β‘β‘β‘ LTP - fsx
β‘β‘β‘ LTP - math
β‘β‘β‘ LTP - hugetlb
β‘β‘β‘ LTP - mm
β‘β‘β‘ LTP - nptl
β‘β‘β‘ LTP - pty
β‘β‘β‘ LTP - ipc
β‘β‘β‘ LTP - tracing
β‘β‘β‘ LTP: openposix test suite
β‘β‘β‘ CIFS Connectathon
β‘β‘β‘ POSIX pjd-fstest suites
β‘β‘β‘ NFS Connectathon
β‘β‘β‘ Loopdev Sanity
β‘β‘β‘ jvm - jcstress tests
β‘β‘β‘ Memory: fork_mem
β‘β‘β‘ Memory function: memfd_create
β‘β‘β‘ AMTU (Abstract Machine Test Utility)
β‘β‘β‘ Networking bridge: sanity
β‘β‘β‘ Ethernet drivers sanity
β‘β‘β‘ Networking socket: fuzz
β‘β‘β‘ Networking route: pmtu
β‘β‘β‘ Networking route_func - local
β‘β‘β‘ Networking route_func - forward
β‘β‘β‘ Networking TCP: keepalive test
β‘β‘β‘ Networking UDP: socket
β‘β‘β‘ Networking cki netfilter test
β‘β‘β‘ Networking tunnel: geneve basic test
β‘β‘β‘ Networking tunnel: gre basic
β‘β‘β‘ L2TP basic test
β‘β‘β‘ Networking tunnel: vxlan basic
β‘β‘β‘ Networking ipsec: basic netns - transport
β‘β‘β‘ Networking ipsec: basic netns - tunnel
β‘β‘β‘ Libkcapi AF_ALG test
β‘β‘β‘ pciutils: update pci ids test
β‘β‘β‘ ALSA PCM loopback test
β‘β‘β‘ ALSA Control (mixer) Userspace Element test
β‘β‘β‘ storage: dm/common
β‘β‘β‘ lvm snapper test
β‘β‘β‘ storage: SCSI VPD
β‘β‘β‘ trace: ftrace/tracer
π§ β‘β‘β‘ xarray-idr-radixtree-test
π§ β‘β‘β‘ i2c: i2cdetect sanity
π§ β‘β‘β‘ Firmware test suite
π§ β‘β‘β‘ Memory function: kaslr
π§ β‘β‘β‘ Networking: igmp conformance test
π§ β‘β‘β‘ audit: audit testsuite test
π§ β‘β‘β‘ lvm cache test
Host 6:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ xfstests - ext4
β‘β‘β‘ xfstests - xfs
β‘β‘β‘ IPMI driver test
β‘β‘β‘ IPMItool loop stress test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
β‘β‘β‘ stress: stress-ng - interrupt
β‘β‘β‘ stress: stress-ng - cpu
β‘β‘β‘ stress: stress-ng - cpu-cache
β‘β‘β‘ stress: stress-ng - memory
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ stress: stress-ng - os
Host 7:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β Boot test
β Reboot test
β ACPI table test
β ACPI enabled test
β‘β‘β‘ LTP - cve
β‘β‘β‘ LTP - sched
β‘β‘β‘ LTP - syscalls
β‘β‘β‘ LTP - can
β‘β‘β‘ LTP - commands
β‘β‘β‘ LTP - containers
β‘β‘β‘ LTP - dio
β‘β‘β‘ LTP - fs
β‘β‘β‘ LTP - fsx
β‘β‘β‘ LTP - math
β‘β‘β‘ LTP - hugetlb
β‘β‘β‘ LTP - mm
β‘β‘β‘ LTP - nptl
β‘β‘β‘ LTP - pty
β‘β‘β‘ LTP - ipc
β‘β‘β‘ LTP - tracing
β‘β‘β‘ LTP: openposix test suite
β‘β‘β‘ CIFS Connectathon
β‘β‘β‘ POSIX pjd-fstest suites
β‘β‘β‘ NFS Connectathon
β‘β‘β‘ Loopdev Sanity
β‘β‘β‘ jvm - jcstress tests
β‘β‘β‘ Memory: fork_mem
β‘β‘β‘ Memory function: memfd_create
β‘β‘β‘ AMTU (Abstract Machine Test Utility)
β‘β‘β‘ Networking bridge: sanity
β‘β‘β‘ Ethernet drivers sanity
β‘β‘β‘ Networking socket: fuzz
β‘β‘β‘ Networking route: pmtu
β‘β‘β‘ Networking route_func - local
β‘β‘β‘ Networking route_func - forward
β‘β‘β‘ Networking TCP: keepalive test
β‘β‘β‘ Networking UDP: socket
β‘β‘β‘ Networking cki netfilter test
β‘β‘β‘ Networking tunnel: geneve basic test
β‘β‘β‘ Networking tunnel: gre basic
β‘β‘β‘ L2TP basic test
β‘β‘β‘ Networking tunnel: vxlan basic
β‘β‘β‘ Networking ipsec: basic netns - transport
β‘β‘β‘ Networking ipsec: basic netns - tunnel
β‘β‘β‘ Libkcapi AF_ALG test
β‘β‘β‘ pciutils: update pci ids test
β‘β‘β‘ ALSA PCM loopback test
β‘β‘β‘ ALSA Control (mixer) Userspace Element test
β‘β‘β‘ storage: dm/common
β‘β‘β‘ lvm snapper test
β‘β‘β‘ storage: SCSI VPD
β‘β‘β‘ trace: ftrace/tracer
π§ β‘β‘β‘ xarray-idr-radixtree-test
π§ β‘β‘β‘ i2c: i2cdetect sanity
π§ β‘β‘β‘ Firmware test suite
π§ β‘β‘β‘ Memory function: kaslr
π§ β‘β‘β‘ Networking: igmp conformance test
π§ β‘β‘β‘ audit: audit testsuite test
π§ β‘β‘β‘ lvm cache test
ppc64le:
Host 1:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 2:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ LTP - cve
β‘β‘β‘ LTP - sched
β‘β‘β‘ LTP - syscalls
β‘β‘β‘ LTP - can
β‘β‘β‘ LTP - commands
β‘β‘β‘ LTP - containers
β‘β‘β‘ LTP - dio
β‘β‘β‘ LTP - fs
β‘β‘β‘ LTP - fsx
β‘β‘β‘ LTP - math
β‘β‘β‘ LTP - hugetlb
β‘β‘β‘ LTP - mm
β‘β‘β‘ LTP - nptl
β‘β‘β‘ LTP - pty
β‘β‘β‘ LTP - ipc
β‘β‘β‘ LTP - tracing
β‘β‘β‘ LTP: openposix test suite
β‘β‘β‘ CIFS Connectathon
β‘β‘β‘ POSIX pjd-fstest suites
β‘β‘β‘ NFS Connectathon
β‘β‘β‘ Loopdev Sanity
β‘β‘β‘ jvm - jcstress tests
β‘β‘β‘ Memory: fork_mem
β‘β‘β‘ Memory function: memfd_create
β‘β‘β‘ AMTU (Abstract Machine Test Utility)
β‘β‘β‘ Networking bridge: sanity
β‘β‘β‘ Ethernet drivers sanity
β‘β‘β‘ Networking socket: fuzz
β‘β‘β‘ Networking route: pmtu
β‘β‘β‘ Networking route_func - local
β‘β‘β‘ Networking route_func - forward
β‘β‘β‘ Networking TCP: keepalive test
β‘β‘β‘ Networking UDP: socket
β‘β‘β‘ Networking cki netfilter test
β‘β‘β‘ Networking tunnel: geneve basic test
β‘β‘β‘ Networking tunnel: gre basic
β‘β‘β‘ L2TP basic test
β‘β‘β‘ Networking tunnel: vxlan basic
β‘β‘β‘ Networking ipsec: basic netns - tunnel
β‘β‘β‘ Libkcapi AF_ALG test
β‘β‘β‘ pciutils: update pci ids test
β‘β‘β‘ ALSA PCM loopback test
β‘β‘β‘ ALSA Control (mixer) Userspace Element test
β‘β‘β‘ storage: dm/common
β‘β‘β‘ lvm snapper test
β‘β‘β‘ trace: ftrace/tracer
π§ β‘β‘β‘ xarray-idr-radixtree-test
π§ β‘β‘β‘ Memory function: kaslr
π§ β‘β‘β‘ audit: audit testsuite test
π§ β‘β‘β‘ lvm cache test
Host 3:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - srp
Host 4:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β Boot test
β Reboot test
β xfstests - ext4
β xfstests - xfs
β IPMI driver test
β IPMItool loop stress test
β selinux-policy: serge-testsuite
β Storage blktests - blk
β Storage block - filesystem fio test
β Storage block - queue scheduler test
β storage: software RAID testing
β Storage: swraid mdadm raid_module test
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ Storage: lvm device-mapper test - upstream
Host 5:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ LTP - cve
β‘β‘β‘ LTP - sched
β‘β‘β‘ LTP - syscalls
β‘β‘β‘ LTP - can
β‘β‘β‘ LTP - commands
β‘β‘β‘ LTP - containers
β‘β‘β‘ LTP - dio
β‘β‘β‘ LTP - fs
β‘β‘β‘ LTP - fsx
β‘β‘β‘ LTP - math
β‘β‘β‘ LTP - hugetlb
β‘β‘β‘ LTP - mm
β‘β‘β‘ LTP - nptl
β‘β‘β‘ LTP - pty
β‘β‘β‘ LTP - ipc
β‘β‘β‘ LTP - tracing
β‘β‘β‘ LTP: openposix test suite
β‘β‘β‘ CIFS Connectathon
β‘β‘β‘ POSIX pjd-fstest suites
β‘β‘β‘ NFS Connectathon
β‘β‘β‘ Loopdev Sanity
β‘β‘β‘ jvm - jcstress tests
β‘β‘β‘ Memory: fork_mem
β‘β‘β‘ Memory function: memfd_create
β‘β‘β‘ AMTU (Abstract Machine Test Utility)
β‘β‘β‘ Networking bridge: sanity
β‘β‘β‘ Ethernet drivers sanity
β‘β‘β‘ Networking socket: fuzz
β‘β‘β‘ Networking route: pmtu
β‘β‘β‘ Networking route_func - local
β‘β‘β‘ Networking route_func - forward
β‘β‘β‘ Networking TCP: keepalive test
β‘β‘β‘ Networking UDP: socket
β‘β‘β‘ Networking cki netfilter test
β‘β‘β‘ Networking tunnel: geneve basic test
β‘β‘β‘ Networking tunnel: gre basic
β‘β‘β‘ L2TP basic test
β‘β‘β‘ Networking tunnel: vxlan basic
β‘β‘β‘ Networking ipsec: basic netns - tunnel
β‘β‘β‘ Libkcapi AF_ALG test
β‘β‘β‘ pciutils: update pci ids test
β‘β‘β‘ ALSA PCM loopback test
β‘β‘β‘ ALSA Control (mixer) Userspace Element test
β‘β‘β‘ storage: dm/common
β‘β‘β‘ lvm snapper test
β‘β‘β‘ trace: ftrace/tracer
π§ β‘β‘β‘ xarray-idr-radixtree-test
π§ β‘β‘β‘ Memory function: kaslr
π§ β‘β‘β‘ audit: audit testsuite test
π§ β‘β‘β‘ lvm cache test
Host 6:
β Boot test
β Reboot test
π§ β Storage blktests - srp
s390x:
Host 1:
β Boot test
β Reboot test
π§ β Storage blktests - srp
Host 2:
β Boot test
β Reboot test
β selinux-policy: serge-testsuite
β Storage blktests - blk
β Storage: swraid mdadm raid_module test
β stress: stress-ng - interrupt
β stress: stress-ng - cpu
β stress: stress-ng - cpu-cache
β stress: stress-ng - memory
π§ β Podman system test - as root
π§ β Podman system test - as user
π§ β Storage blktests - nvme-tcp
π§ β stress: stress-ng - os
Host 3:
β Boot test
β Reboot test
β LTP - cve
β LTP - sched
β LTP - syscalls
β LTP - can
β LTP - commands
β LTP - containers
β LTP - dio
β LTP - fs
β LTP - fsx
β LTP - math
β LTP - hugetlb
β LTP - mm
β LTP - nptl
β LTP - pty
β LTP - ipc
β LTP - tracing
β LTP: openposix test suite
β CIFS Connectathon
β POSIX pjd-fstest suites
β NFS Connectathon
β Loopdev Sanity
β jvm - jcstress tests
β Memory: fork_mem
β Memory function: memfd_create
β AMTU (Abstract Machine Test Utility)
β Networking bridge: sanity
β Ethernet drivers sanity
β Networking route: pmtu
β Networking route_func - local
β Networking route_func - forward
β Networking TCP: keepalive test
β Networking UDP: socket
β Networking cki netfilter test
β Networking tunnel: geneve basic test
β Networking tunnel: gre basic
β L2TP basic test
β Networking tunnel: vxlan basic
β Networking ipsec: basic netns - transport
β Networking ipsec: basic netns - tunnel
β Libkcapi AF_ALG test
β storage: dm/common
β lvm snapper test
β trace: ftrace/tracer
π§ β xarray-idr-radixtree-test
π§ β Memory function: kaslr
π§ β audit: audit testsuite test
π§ β lvm cache test
Host 4:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
x86_64:
Host 1:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ ACPI table test
β‘β‘β‘ LTP - cve
β‘β‘β‘ LTP - sched
β‘β‘β‘ LTP - syscalls
β‘β‘β‘ LTP - can
β‘β‘β‘ LTP - commands
β‘β‘β‘ LTP - containers
β‘β‘β‘ LTP - dio
β‘β‘β‘ LTP - fs
β‘β‘β‘ LTP - fsx
β‘β‘β‘ LTP - math
β‘β‘β‘ LTP - hugetlb
β‘β‘β‘ LTP - mm
β‘β‘β‘ LTP - nptl
β‘β‘β‘ LTP - pty
β‘β‘β‘ LTP - ipc
β‘β‘β‘ LTP - tracing
β‘β‘β‘ LTP: openposix test suite
β‘β‘β‘ CIFS Connectathon
β‘β‘β‘ POSIX pjd-fstest suites
β‘β‘β‘ NFS Connectathon
β‘β‘β‘ Loopdev Sanity
β‘β‘β‘ jvm - jcstress tests
β‘β‘β‘ Memory: fork_mem
β‘β‘β‘ Memory function: memfd_create
β‘β‘β‘ AMTU (Abstract Machine Test Utility)
β‘β‘β‘ Networking bridge: sanity
β‘β‘β‘ Ethernet drivers sanity
β‘β‘β‘ Networking socket: fuzz
β‘β‘β‘ Networking route: pmtu
β‘β‘β‘ Networking route_func - local
β‘β‘β‘ Networking route_func - forward
β‘β‘β‘ Networking TCP: keepalive test
β‘β‘β‘ Networking UDP: socket
β‘β‘β‘ Networking cki netfilter test
β‘β‘β‘ Networking tunnel: geneve basic test
β‘β‘β‘ Networking tunnel: gre basic
β‘β‘β‘ L2TP basic test
β‘β‘β‘ Networking tunnel: vxlan basic
β‘β‘β‘ Networking ipsec: basic netns - transport
β‘β‘β‘ Networking ipsec: basic netns - tunnel
β‘β‘β‘ Libkcapi AF_ALG test
β‘β‘β‘ pciutils: sanity smoke test
β‘β‘β‘ pciutils: update pci ids test
β‘β‘β‘ ALSA PCM loopback test
β‘β‘β‘ ALSA Control (mixer) Userspace Element test
β‘β‘β‘ storage: dm/common
β‘β‘β‘ lvm snapper test
β‘β‘β‘ storage: SCSI VPD
β‘β‘β‘ trace: ftrace/tracer
π§ β‘β‘β‘ xarray-idr-radixtree-test
π§ β‘β‘β‘ i2c: i2cdetect sanity
π§ β‘β‘β‘ Firmware test suite
π§ β‘β‘β‘ Memory function: kaslr
π§ β‘β‘β‘ Networking: igmp conformance test
π§ β‘β‘β‘ audit: audit testsuite test
π§ β‘β‘β‘ lvm cache test
Host 2:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - srp
Host 3:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 4:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ xfstests - ext4
β‘β‘β‘ xfstests - xfs
β‘β‘β‘ xfstests - nfsv4.2
β‘β‘β‘ xfstests - cifsv3.11
β‘β‘β‘ IPMI driver test
β‘β‘β‘ IPMItool loop stress test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ power-management: cpupower/sanity test
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
β‘β‘β‘ stress: stress-ng - interrupt
β‘β‘β‘ stress: stress-ng - cpu
β‘β‘β‘ stress: stress-ng - cpu-cache
β‘β‘β‘ stress: stress-ng - memory
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ CPU: Idle Test
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ Storage: lvm device-mapper test - upstream
π§ β‘β‘β‘ stress: stress-ng - os
Host 5:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ ACPI table test
β‘β‘β‘ LTP - cve
β‘β‘β‘ LTP - sched
β‘β‘β‘ LTP - syscalls
β‘β‘β‘ LTP - can
β‘β‘β‘ LTP - commands
β‘β‘β‘ LTP - containers
β‘β‘β‘ LTP - dio
β‘β‘β‘ LTP - fs
β‘β‘β‘ LTP - fsx
β‘β‘β‘ LTP - math
β‘β‘β‘ LTP - hugetlb
β‘β‘β‘ LTP - mm
β‘β‘β‘ LTP - nptl
β‘β‘β‘ LTP - pty
β‘β‘β‘ LTP - ipc
β‘β‘β‘ LTP - tracing
β‘β‘β‘ LTP: openposix test suite
β‘β‘β‘ CIFS Connectathon
β‘β‘β‘ POSIX pjd-fstest suites
β‘β‘β‘ NFS Connectathon
β‘β‘β‘ Loopdev Sanity
β‘β‘β‘ jvm - jcstress tests
β‘β‘β‘ Memory: fork_mem
β‘β‘β‘ Memory function: memfd_create
β‘β‘β‘ AMTU (Abstract Machine Test Utility)
β‘β‘β‘ Networking bridge: sanity
β‘β‘β‘ Ethernet drivers sanity
β‘β‘β‘ Networking socket: fuzz
β‘β‘β‘ Networking route: pmtu
β‘β‘β‘ Networking route_func - local
β‘β‘β‘ Networking route_func - forward
β‘β‘β‘ Networking TCP: keepalive test
β‘β‘β‘ Networking UDP: socket
β‘β‘β‘ Networking cki netfilter test
β‘β‘β‘ Networking tunnel: geneve basic test
β‘β‘β‘ Networking tunnel: gre basic
β‘β‘β‘ L2TP basic test
β‘β‘β‘ Networking tunnel: vxlan basic
β‘β‘β‘ Networking ipsec: basic netns - transport
β‘β‘β‘ Networking ipsec: basic netns - tunnel
β‘β‘β‘ Libkcapi AF_ALG test
β‘β‘β‘ pciutils: sanity smoke test
β‘β‘β‘ pciutils: update pci ids test
β‘β‘β‘ ALSA PCM loopback test
β‘β‘β‘ ALSA Control (mixer) Userspace Element test
β‘β‘β‘ storage: dm/common
β‘β‘β‘ lvm snapper test
β‘β‘β‘ storage: SCSI VPD
β‘β‘β‘ trace: ftrace/tracer
π§ β‘β‘β‘ xarray-idr-radixtree-test
π§ β‘β‘β‘ i2c: i2cdetect sanity
π§ β‘β‘β‘ Firmware test suite
π§ β‘β‘β‘ Memory function: kaslr
π§ β‘β‘β‘ Networking: igmp conformance test
π§ β‘β‘β‘ audit: audit testsuite test
π§ β‘β‘β‘ lvm cache test
Host 6:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
π§ β‘β‘β‘ Storage blktests - srp
Test sources: https://gitlab.com/cki-project/kernel-tests
π Pull requests are welcome for new tests or improvements to existing tests!
Aborted tests
-------------
Tests that didn't complete running successfully are marked with β‘β‘β‘.
If this was caused by an infrastructure issue, we try to mark that
explicitly in the report.
Waived tests
------------
If the test run included waived tests, they are marked with π§. Such tests are
executed but their results are not taken into account. Tests are waived when
their results are not reliable enough, e.g. when they're just introduced or are
being fixed.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running yet are marked with β±.
Targeted tests
--------------
Test runs for patches always include a set of base tests, plus some
tests chosen based on the file paths modified by the patch. The latter
are called "targeted tests". If no targeted tests are run, that means
no patch-specific tests are available. Please, consider contributing a
targeted test for related patches to increase test coverage. See
https://docs.engineering.redhat.com/x/_wEZB for more details.
From: Petr BeneΕ‘ <petr.benes(a)ysoft.com>
SoC temperature readout may not work after thermal alarm fires interrupt.
This harms userspace as well as CPU cooling device.
Two issues with the logic involved. First, there is no protection against
concurent measurements, hence one can switch the sensor off while
the other one tries to read temperature later. Second, the interrupt path
usually fails. At the end the sensor is powered off and thermal IRQ is
disabled. One has to reenable the thermal zone by the sysfs interface.
Most of troubles come from commit d92ed2c9d3ff ("thermal: imx: Use
driver's local data to decide whether to run a measurement")
It uses data->irq_enabled as the "local data". Indeed, its value is
related to the state of the sensor loosely under normal operation and,
frankly, gets unleashed when the thermal interrupt arrives.
Current patch adds the "local data" (new member sensor_on in
imx_thermal_data) and sets its value in controlled manner.
Fixes: d92ed2c9d3ff ("thermal: imx: Use driver's local data to decide whether to run a measurement")
Cc: petrben(a)gmail.com
Cc: stable(a)vger.kernel.org
Signed-off-by: Petr BeneΕ‘ <petr.benes(a)ysoft.com>
Signed-off-by: Michal VokΓ‘Δ <michal.vokac(a)ysoft.com>
---
drivers/thermal/imx_thermal.c | 30 ++++++++++++++++++++++++++----
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index 2c7473d86a59..df5658e21828 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -209,6 +209,8 @@ struct imx_thermal_data {
struct clk *thermal_clk;
const struct thermal_soc_data *socdata;
const char *temp_grade;
+ struct mutex sensor_lock;
+ bool sensor_on;
};
static void imx_set_panic_temp(struct imx_thermal_data *data,
@@ -252,11 +254,12 @@ static int imx_get_temp(struct thermal_zone_device *tz, int *temp)
const struct thermal_soc_data *soc_data = data->socdata;
struct regmap *map = data->tempmon;
unsigned int n_meas;
- bool wait, run_measurement;
+ bool wait;
u32 val;
- run_measurement = !data->irq_enabled;
- if (!run_measurement) {
+ mutex_lock(&data->sensor_lock);
+
+ if (data->sensor_on) {
/* Check if a measurement is currently in progress */
regmap_read(map, soc_data->temp_data, &val);
wait = !(val & soc_data->temp_valid_mask);
@@ -283,13 +286,15 @@ static int imx_get_temp(struct thermal_zone_device *tz, int *temp)
regmap_read(map, soc_data->temp_data, &val);
- if (run_measurement) {
+ if (!data->sensor_on) {
regmap_write(map, soc_data->sensor_ctrl + REG_CLR,
soc_data->measure_temp_mask);
regmap_write(map, soc_data->sensor_ctrl + REG_SET,
soc_data->power_down_mask);
}
+ mutex_unlock(&data->sensor_lock);
+
if ((val & soc_data->temp_valid_mask) == 0) {
dev_dbg(&tz->device, "temp measurement never finished\n");
return -EAGAIN;
@@ -339,20 +344,26 @@ static int imx_change_mode(struct thermal_zone_device *tz,
const struct thermal_soc_data *soc_data = data->socdata;
if (mode == THERMAL_DEVICE_ENABLED) {
+ mutex_lock(&data->sensor_lock);
regmap_write(map, soc_data->sensor_ctrl + REG_CLR,
soc_data->power_down_mask);
regmap_write(map, soc_data->sensor_ctrl + REG_SET,
soc_data->measure_temp_mask);
+ data->sensor_on = true;
+ mutex_unlock(&data->sensor_lock);
if (!data->irq_enabled) {
data->irq_enabled = true;
enable_irq(data->irq);
}
} else {
+ mutex_lock(&data->sensor_lock);
regmap_write(map, soc_data->sensor_ctrl + REG_CLR,
soc_data->measure_temp_mask);
regmap_write(map, soc_data->sensor_ctrl + REG_SET,
soc_data->power_down_mask);
+ data->sensor_on = false;
+ mutex_unlock(&data->sensor_lock);
if (data->irq_enabled) {
disable_irq(data->irq);
@@ -728,6 +739,8 @@ static int imx_thermal_probe(struct platform_device *pdev)
}
/* Make sure sensor is in known good state for measurements */
+ mutex_init(&data->sensor_lock);
+ mutex_lock(&data->sensor_lock);
regmap_write(map, data->socdata->sensor_ctrl + REG_CLR,
data->socdata->power_down_mask);
regmap_write(map, data->socdata->sensor_ctrl + REG_CLR,
@@ -739,6 +752,8 @@ static int imx_thermal_probe(struct platform_device *pdev)
IMX6_MISC0_REFTOP_SELBIASOFF);
regmap_write(map, data->socdata->sensor_ctrl + REG_SET,
data->socdata->power_down_mask);
+ data->sensor_on = false;
+ mutex_unlock(&data->sensor_lock);
ret = imx_thermal_register_legacy_cooling(data);
if (ret)
@@ -796,10 +811,13 @@ static int imx_thermal_probe(struct platform_device *pdev)
if (data->socdata->version == TEMPMON_IMX6SX)
imx_set_panic_temp(data, data->temp_critical);
+ mutex_lock(&data->sensor_lock);
regmap_write(map, data->socdata->sensor_ctrl + REG_CLR,
data->socdata->power_down_mask);
regmap_write(map, data->socdata->sensor_ctrl + REG_SET,
data->socdata->measure_temp_mask);
+ data->sensor_on = true;
+ mutex_unlock(&data->sensor_lock);
data->irq_enabled = true;
ret = thermal_zone_device_enable(data->tz);
@@ -832,8 +850,12 @@ static int imx_thermal_remove(struct platform_device *pdev)
struct regmap *map = data->tempmon;
/* Disable measurements */
+ mutex_lock(&data->sensor_lock);
regmap_write(map, data->socdata->sensor_ctrl + REG_SET,
data->socdata->power_down_mask);
+ data->sensor_on = false;
+ mutex_unlock(&data->sensor_lock);
+
if (!IS_ERR(data->thermal_clk))
clk_disable_unprepare(data->thermal_clk);
--
2.25.1
This is a note to let you know that I've just added the patch titled
char: xillybus: fix msg_ep UAF in xillyusb_probe()
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
>From 15c9a359094ec6251578b02387436bc64f11a477 Mon Sep 17 00:00:00 2001
From: Ziyang Xuan <william.xuanziyang(a)huawei.com>
Date: Sat, 16 Oct 2021 13:20:47 +0800
Subject: char: xillybus: fix msg_ep UAF in xillyusb_probe()
When endpoint_alloc() return failed in xillyusb_setup_base_eps(),
'xdev->msg_ep' will be freed but not set to NULL. That lets program
enter fail handling to cleanup_dev() in xillyusb_probe(). Check for
'xdev->msg_ep' is invalid in cleanup_dev() because 'xdev->msg_ep' did
not set to NULL when was freed. So the UAF problem for 'xdev->msg_ep'
is triggered.
==================================================================
BUG: KASAN: use-after-free in fifo_mem_release+0x1f4/0x210
CPU: 0 PID: 166 Comm: kworker/0:2 Not tainted 5.15.0-rc5+ #19
Call Trace:
dump_stack_lvl+0xe2/0x152
print_address_description.constprop.0+0x21/0x140
? fifo_mem_release+0x1f4/0x210
kasan_report.cold+0x7f/0x11b
? xillyusb_probe+0x530/0x700
? fifo_mem_release+0x1f4/0x210
fifo_mem_release+0x1f4/0x210
? __sanitizer_cov_trace_pc+0x1d/0x50
endpoint_dealloc+0x35/0x2b0
cleanup_dev+0x90/0x120
xillyusb_probe+0x59a/0x700
...
Freed by task 166:
kasan_save_stack+0x1b/0x40
kasan_set_track+0x1c/0x30
kasan_set_free_info+0x20/0x30
__kasan_slab_free+0x109/0x140
kfree+0x117/0x4c0
xillyusb_probe+0x606/0x700
Set 'xdev->msg_ep' to NULL after being freed in xillyusb_setup_base_eps()
to fix the UAF problem.
Fixes: a53d1202aef1 ("char: xillybus: Add driver for XillyUSB (Xillybus variant for USB)")
Cc: stable <stable(a)vger.kernel.org>
Acked-by: Eli Billauer <eli.billauer(a)gmail.com>
Signed-off-by: Ziyang Xuan <william.xuanziyang(a)huawei.com>
Link: https://lore.kernel.org/r/20211016052047.1611983-1-william.xuanziyang@huaweβ¦
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/char/xillybus/xillyusb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/char/xillybus/xillyusb.c b/drivers/char/xillybus/xillyusb.c
index e7f88f35c702..dc3551796e5e 100644
--- a/drivers/char/xillybus/xillyusb.c
+++ b/drivers/char/xillybus/xillyusb.c
@@ -1912,6 +1912,7 @@ static int xillyusb_setup_base_eps(struct xillyusb_dev *xdev)
dealloc:
endpoint_dealloc(xdev->msg_ep); /* Also frees FIFO mem if allocated */
+ xdev->msg_ep = NULL;
return -ENOMEM;
}
--
2.33.1
This is a note to let you know that I've just added the patch titled
binder: don't detect sender/target during buffer cleanup
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
>From 32e9f56a96d8d0f23cb2aeb2a3cd18d40393e787 Mon Sep 17 00:00:00 2001
From: Todd Kjos <tkjos(a)google.com>
Date: Fri, 15 Oct 2021 16:38:11 -0700
Subject: binder: don't detect sender/target during buffer cleanup
When freeing txn buffers, binder_transaction_buffer_release()
attempts to detect whether the current context is the target by
comparing current->group_leader to proc->tsk. This is an unreliable
test. Instead explicitly pass an 'is_failure' boolean.
Detecting the sender was being used as a way to tell if the
transaction failed to be sent. When cleaning up after
failing to send a transaction, there is no need to close
the fds associated with a BINDER_TYPE_FDA object. Now
'is_failure' can be used to accurately detect this case.
Fixes: 44d8047f1d87 ("binder: use standard functions to allocate fds")
Cc: stable <stable(a)vger.kernel.org>
Acked-by: Christian Brauner <christian.brauner(a)ubuntu.com>
Signed-off-by: Todd Kjos <tkjos(a)google.com>
Link: https://lore.kernel.org/r/20211015233811.3532235-1-tkjos@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/android/binder.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 9edacc8b9768..fe4c3b49eec1 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -1870,7 +1870,7 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,
binder_dec_node(buffer->target_node, 1, 0);
off_start_offset = ALIGN(buffer->data_size, sizeof(void *));
- off_end_offset = is_failure ? failed_at :
+ off_end_offset = is_failure && failed_at ? failed_at :
off_start_offset + buffer->offsets_size;
for (buffer_offset = off_start_offset; buffer_offset < off_end_offset;
buffer_offset += sizeof(binder_size_t)) {
@@ -1956,9 +1956,8 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,
binder_size_t fd_buf_size;
binder_size_t num_valid;
- if (proc->tsk != current->group_leader) {
+ if (is_failure) {
/*
- * Nothing to do if running in sender context
* The fd fixups have not been applied so no
* fds need to be closed.
*/
@@ -3185,6 +3184,7 @@ static void binder_transaction(struct binder_proc *proc,
* binder_free_buf() - free the specified buffer
* @proc: binder proc that owns buffer
* @buffer: buffer to be freed
+ * @is_failure: failed to send transaction
*
* If buffer for an async transaction, enqueue the next async
* transaction from the node.
@@ -3194,7 +3194,7 @@ static void binder_transaction(struct binder_proc *proc,
static void
binder_free_buf(struct binder_proc *proc,
struct binder_thread *thread,
- struct binder_buffer *buffer)
+ struct binder_buffer *buffer, bool is_failure)
{
binder_inner_proc_lock(proc);
if (buffer->transaction) {
@@ -3222,7 +3222,7 @@ binder_free_buf(struct binder_proc *proc,
binder_node_inner_unlock(buf_node);
}
trace_binder_transaction_buffer_release(buffer);
- binder_transaction_buffer_release(proc, thread, buffer, 0, false);
+ binder_transaction_buffer_release(proc, thread, buffer, 0, is_failure);
binder_alloc_free_buf(&proc->alloc, buffer);
}
@@ -3424,7 +3424,7 @@ static int binder_thread_write(struct binder_proc *proc,
proc->pid, thread->pid, (u64)data_ptr,
buffer->debug_id,
buffer->transaction ? "active" : "finished");
- binder_free_buf(proc, thread, buffer);
+ binder_free_buf(proc, thread, buffer, false);
break;
}
@@ -4117,7 +4117,7 @@ static int binder_thread_read(struct binder_proc *proc,
buffer->transaction = NULL;
binder_cleanup_transaction(t, "fd fixups failed",
BR_FAILED_REPLY);
- binder_free_buf(proc, thread, buffer);
+ binder_free_buf(proc, thread, buffer, true);
binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
"%d:%d %stransaction %d fd fixups failed %d/%d, line %d\n",
proc->pid, thread->pid,
--
2.33.1
When the a large chunk of data send and the receiver does not send a
Flow Control frame back in time, the sendmsg() does not return a error
code, but the number of bytes sent corresponding to the size of the
packet.
If a timeout occurs the isotp_tx_timer_handler() is fired, sets
sk->sk_err and calls the sk->sk_error_report() function. It was
wrongly expected that the error would be propagated to user space in
every case. For isotp_sendmsg() blocking on wait_event_interruptible()
this is not the case.
This patch fixes the problem by checking if sk->sk_err is set and
returning the error to user space.
Fixes: e057dd3fc20f ("can: add ISO 15765-2:2016 transport protocol")
Link: https://github.com/hartkopp/can-isotp/issues/42
Link: https://github.com/hartkopp/can-isotp/pull/43
Link: https://lore.kernel.org/all/20210507091839.1366379-1-mkl@pengutronix.de
Cc: stable(a)vger.kernel.org
Reported-by: Sottas Guillaume (LMB) <Guillaume.Sottas(a)liebherr.com>
Tested-by: Oliver Hartkopp <socketcan(a)hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl(a)pengutronix.de>
---
net/can/isotp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/can/isotp.c b/net/can/isotp.c
index d1f54273c0bb..df6968b28bf4 100644
--- a/net/can/isotp.c
+++ b/net/can/isotp.c
@@ -971,6 +971,9 @@ static int isotp_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
if (wait_tx_done) {
/* wait for complete transmission of current pdu */
wait_event_interruptible(so->wait, so->tx.state == ISOTP_IDLE);
+
+ if (sk->sk_err)
+ return -sk->sk_err;
}
return size;
base-commit: 8a64ef042eab8a6cec04a6c79d44d1af79b628ca
--
2.33.0
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: rkvdec: Do not override sizeimage for output format
Author: Chen-Yu Tsai <wenst(a)chromium.org>
Date: Fri Oct 8 11:04:22 2021 +0100
The rkvdec H.264 decoder currently overrides sizeimage for the output
format. This causes issues when userspace requires and requests a larger
buffer, but ends up with one of insufficient size.
Instead, only provide a default size if none was requested. This fixes
the video_decode_accelerator_tests from Chromium failing on the first
frame due to insufficient buffer space. It also aligns the behavior
of the rkvdec driver with the Hantro and Cedrus drivers.
Fixes: cd33c830448b ("media: rkvdec: Add the rkvdec driver")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Chen-Yu Tsai <wenst(a)chromium.org>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne(a)collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei(a)kernel.org>
drivers/staging/media/rkvdec/rkvdec-h264.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/drivers/staging/media/rkvdec/rkvdec-h264.c b/drivers/staging/media/rkvdec/rkvdec-h264.c
index 76e97cbe2512..951e19231da2 100644
--- a/drivers/staging/media/rkvdec/rkvdec-h264.c
+++ b/drivers/staging/media/rkvdec/rkvdec-h264.c
@@ -1015,8 +1015,9 @@ static int rkvdec_h264_adjust_fmt(struct rkvdec_ctx *ctx,
struct v4l2_pix_format_mplane *fmt = &f->fmt.pix_mp;
fmt->num_planes = 1;
- fmt->plane_fmt[0].sizeimage = fmt->width * fmt->height *
- RKVDEC_H264_MAX_DEPTH_IN_BYTES;
+ if (!fmt->plane_fmt[0].sizeimage)
+ fmt->plane_fmt[0].sizeimage = fmt->width * fmt->height *
+ RKVDEC_H264_MAX_DEPTH_IN_BYTES;
return 0;
}
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: ite-cir: IR receiver stop working after receive overflow
Author: Sean Young <sean(a)mess.org>
Date: Sun Oct 17 13:01:15 2021 +0100
On an Intel NUC6iSYK, no IR is reported after a receive overflow.
When a receiver overflow occurs, this condition is only cleared by
reading the fifo. Make sure we read anything in the fifo.
Fixes: 28c7afb07ccf ("media: ite-cir: check for receive overflow")
Suggested-by: Bryan Pass <bryan.pass(a)gmail.com>
Tested-by: Bryan Pass <bryan.pass(a)gmail.com>
Cc: stable(a)vger.kernel.org>
Signed-off-by: Sean Young <sean(a)mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei(a)kernel.org>
drivers/media/rc/ite-cir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index 5bc23e8c6d91..4f77d4ebacdc 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -242,7 +242,7 @@ static irqreturn_t ite_cir_isr(int irq, void *data)
}
/* check for the receive interrupt */
- if (iflags & ITE_IRQ_RX_FIFO) {
+ if (iflags & (ITE_IRQ_RX_FIFO | ITE_IRQ_RX_FIFO_OVERRUN)) {
/* read the FIFO bytes */
rx_bytes = dev->params->get_rx_bytes(dev, rx_buf,
ITE_RX_FIFO_LEN);
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: rkvdec: Support dynamic resolution changes
Author: Chen-Yu Tsai <wenst(a)chromium.org>
Date: Fri Oct 8 11:04:23 2021 +0100
The mem-to-mem stateless decoder API specifies support for dynamic
resolution changes. In particular, the decoder should accept format
changes on the OUTPUT queue even when buffers have been allocated,
as long as it is not streaming.
Relax restrictions for S_FMT as described in the previous paragraph,
and as long as the codec format remains the same. This aligns it with
the Hantro and Cedrus decoders. This change was mostly based on commit
ae02d49493b5 ("media: hantro: Fix s_fmt for dynamic resolution changes").
Since rkvdec_s_fmt() is now just a wrapper around the output/capture
variants without any additional shared functionality, drop the wrapper
and call the respective functions directly.
Fixes: cd33c830448b ("media: rkvdec: Add the rkvdec driver")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Chen-Yu Tsai <wenst(a)chromium.org>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne(a)collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei(a)kernel.org>
drivers/staging/media/rkvdec/rkvdec.c | 40 +++++++++++++++++------------------
1 file changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c
index bf00fe6534a3..4fd4a2907da7 100644
--- a/drivers/staging/media/rkvdec/rkvdec.c
+++ b/drivers/staging/media/rkvdec/rkvdec.c
@@ -280,31 +280,20 @@ static int rkvdec_try_output_fmt(struct file *file, void *priv,
return 0;
}
-static int rkvdec_s_fmt(struct file *file, void *priv,
- struct v4l2_format *f,
- int (*try_fmt)(struct file *, void *,
- struct v4l2_format *))
+static int rkvdec_s_capture_fmt(struct file *file, void *priv,
+ struct v4l2_format *f)
{
struct rkvdec_ctx *ctx = fh_to_rkvdec_ctx(priv);
struct vb2_queue *vq;
+ int ret;
- if (!try_fmt)
- return -EINVAL;
-
- vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type);
+ /* Change not allowed if queue is busy */
+ vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx,
+ V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);
if (vb2_is_busy(vq))
return -EBUSY;
- return try_fmt(file, priv, f);
-}
-
-static int rkvdec_s_capture_fmt(struct file *file, void *priv,
- struct v4l2_format *f)
-{
- struct rkvdec_ctx *ctx = fh_to_rkvdec_ctx(priv);
- int ret;
-
- ret = rkvdec_s_fmt(file, priv, f, rkvdec_try_capture_fmt);
+ ret = rkvdec_try_capture_fmt(file, priv, f);
if (ret)
return ret;
@@ -319,9 +308,20 @@ static int rkvdec_s_output_fmt(struct file *file, void *priv,
struct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx;
const struct rkvdec_coded_fmt_desc *desc;
struct v4l2_format *cap_fmt;
- struct vb2_queue *peer_vq;
+ struct vb2_queue *peer_vq, *vq;
int ret;
+ /*
+ * In order to support dynamic resolution change, the decoder admits
+ * a resolution change, as long as the pixelformat remains. Can't be
+ * done if streaming.
+ */
+ vq = v4l2_m2m_get_vq(m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE);
+ if (vb2_is_streaming(vq) ||
+ (vb2_is_busy(vq) &&
+ f->fmt.pix_mp.pixelformat != ctx->coded_fmt.fmt.pix_mp.pixelformat))
+ return -EBUSY;
+
/*
* Since format change on the OUTPUT queue will reset the CAPTURE
* queue, we can't allow doing so when the CAPTURE queue has buffers
@@ -331,7 +331,7 @@ static int rkvdec_s_output_fmt(struct file *file, void *priv,
if (vb2_is_busy(peer_vq))
return -EBUSY;
- ret = rkvdec_s_fmt(file, priv, f, rkvdec_try_output_fmt);
+ ret = rkvdec_try_output_fmt(file, priv, f);
if (ret)
return ret;
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: ite-cir: IR receiver stop working after receive overflow
Author: Sean Young <sean(a)mess.org>
Date: Sun Oct 17 13:01:15 2021 +0100
On an Intel NUC6iSYK, no IR is reported after a receive overflow.
When a receiver overflow occurs, this condition is only cleared by
reading the fifo. Make sure we read anything in the fifo.
Fixes: 28c7afb07ccf ("media: ite-cir: check for receive overflow")
Suggested-by: Bryan Pass <bryan.pass(a)gmail.com>
Tested-by: Bryan Pass <bryan.pass(a)gmail.com>
Cc: stable(a)vger.kernel.org>
Signed-off-by: Sean Young <sean(a)mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei(a)kernel.org>
drivers/media/rc/ite-cir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index 5bc23e8c6d91..4f77d4ebacdc 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -242,7 +242,7 @@ static irqreturn_t ite_cir_isr(int irq, void *data)
}
/* check for the receive interrupt */
- if (iflags & ITE_IRQ_RX_FIFO) {
+ if (iflags & (ITE_IRQ_RX_FIFO | ITE_IRQ_RX_FIFO_OVERRUN)) {
/* read the FIFO bytes */
rx_bytes = dev->params->get_rx_bytes(dev, rx_buf,
ITE_RX_FIFO_LEN);
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: rkvdec: Support dynamic resolution changes
Author: Chen-Yu Tsai <wenst(a)chromium.org>
Date: Fri Oct 8 11:04:23 2021 +0100
The mem-to-mem stateless decoder API specifies support for dynamic
resolution changes. In particular, the decoder should accept format
changes on the OUTPUT queue even when buffers have been allocated,
as long as it is not streaming.
Relax restrictions for S_FMT as described in the previous paragraph,
and as long as the codec format remains the same. This aligns it with
the Hantro and Cedrus decoders. This change was mostly based on commit
ae02d49493b5 ("media: hantro: Fix s_fmt for dynamic resolution changes").
Since rkvdec_s_fmt() is now just a wrapper around the output/capture
variants without any additional shared functionality, drop the wrapper
and call the respective functions directly.
Fixes: cd33c830448b ("media: rkvdec: Add the rkvdec driver")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Chen-Yu Tsai <wenst(a)chromium.org>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne(a)collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei(a)kernel.org>
drivers/staging/media/rkvdec/rkvdec.c | 40 +++++++++++++++++------------------
1 file changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c
index bf00fe6534a3..4fd4a2907da7 100644
--- a/drivers/staging/media/rkvdec/rkvdec.c
+++ b/drivers/staging/media/rkvdec/rkvdec.c
@@ -280,31 +280,20 @@ static int rkvdec_try_output_fmt(struct file *file, void *priv,
return 0;
}
-static int rkvdec_s_fmt(struct file *file, void *priv,
- struct v4l2_format *f,
- int (*try_fmt)(struct file *, void *,
- struct v4l2_format *))
+static int rkvdec_s_capture_fmt(struct file *file, void *priv,
+ struct v4l2_format *f)
{
struct rkvdec_ctx *ctx = fh_to_rkvdec_ctx(priv);
struct vb2_queue *vq;
+ int ret;
- if (!try_fmt)
- return -EINVAL;
-
- vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type);
+ /* Change not allowed if queue is busy */
+ vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx,
+ V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);
if (vb2_is_busy(vq))
return -EBUSY;
- return try_fmt(file, priv, f);
-}
-
-static int rkvdec_s_capture_fmt(struct file *file, void *priv,
- struct v4l2_format *f)
-{
- struct rkvdec_ctx *ctx = fh_to_rkvdec_ctx(priv);
- int ret;
-
- ret = rkvdec_s_fmt(file, priv, f, rkvdec_try_capture_fmt);
+ ret = rkvdec_try_capture_fmt(file, priv, f);
if (ret)
return ret;
@@ -319,9 +308,20 @@ static int rkvdec_s_output_fmt(struct file *file, void *priv,
struct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx;
const struct rkvdec_coded_fmt_desc *desc;
struct v4l2_format *cap_fmt;
- struct vb2_queue *peer_vq;
+ struct vb2_queue *peer_vq, *vq;
int ret;
+ /*
+ * In order to support dynamic resolution change, the decoder admits
+ * a resolution change, as long as the pixelformat remains. Can't be
+ * done if streaming.
+ */
+ vq = v4l2_m2m_get_vq(m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE);
+ if (vb2_is_streaming(vq) ||
+ (vb2_is_busy(vq) &&
+ f->fmt.pix_mp.pixelformat != ctx->coded_fmt.fmt.pix_mp.pixelformat))
+ return -EBUSY;
+
/*
* Since format change on the OUTPUT queue will reset the CAPTURE
* queue, we can't allow doing so when the CAPTURE queue has buffers
@@ -331,7 +331,7 @@ static int rkvdec_s_output_fmt(struct file *file, void *priv,
if (vb2_is_busy(peer_vq))
return -EBUSY;
- ret = rkvdec_s_fmt(file, priv, f, rkvdec_try_output_fmt);
+ ret = rkvdec_try_output_fmt(file, priv, f);
if (ret)
return ret;
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: rkvdec: Do not override sizeimage for output format
Author: Chen-Yu Tsai <wenst(a)chromium.org>
Date: Fri Oct 8 11:04:22 2021 +0100
The rkvdec H.264 decoder currently overrides sizeimage for the output
format. This causes issues when userspace requires and requests a larger
buffer, but ends up with one of insufficient size.
Instead, only provide a default size if none was requested. This fixes
the video_decode_accelerator_tests from Chromium failing on the first
frame due to insufficient buffer space. It also aligns the behavior
of the rkvdec driver with the Hantro and Cedrus drivers.
Fixes: cd33c830448b ("media: rkvdec: Add the rkvdec driver")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Chen-Yu Tsai <wenst(a)chromium.org>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne(a)collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei(a)kernel.org>
drivers/staging/media/rkvdec/rkvdec-h264.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/drivers/staging/media/rkvdec/rkvdec-h264.c b/drivers/staging/media/rkvdec/rkvdec-h264.c
index 76e97cbe2512..951e19231da2 100644
--- a/drivers/staging/media/rkvdec/rkvdec-h264.c
+++ b/drivers/staging/media/rkvdec/rkvdec-h264.c
@@ -1015,8 +1015,9 @@ static int rkvdec_h264_adjust_fmt(struct rkvdec_ctx *ctx,
struct v4l2_pix_format_mplane *fmt = &f->fmt.pix_mp;
fmt->num_planes = 1;
- fmt->plane_fmt[0].sizeimage = fmt->width * fmt->height *
- RKVDEC_H264_MAX_DEPTH_IN_BYTES;
+ if (!fmt->plane_fmt[0].sizeimage)
+ fmt->plane_fmt[0].sizeimage = fmt->width * fmt->height *
+ RKVDEC_H264_MAX_DEPTH_IN_BYTES;
return 0;
}
This is a note to let you know that I've just added the patch titled
usb-storage: Add compatibility quirk flags for iODD 2531/2541
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
>From 05c8f1b67e67dcd786ae3fe44492bbc617b4bd12 Mon Sep 17 00:00:00 2001
From: James Buren <braewoods+lkml(a)braewoods.net>
Date: Wed, 13 Oct 2021 20:55:04 -0500
Subject: usb-storage: Add compatibility quirk flags for iODD 2531/2541
These drive enclosures have firmware bugs that make it impossible to mount
a new virtual ISO image after Linux ejects the old one if the device is
locked by Linux. Windows bypasses this problem by the fact that they do
not lock the device. Add a quirk to disable device locking for these
drive enclosures.
Acked-by: Alan Stern <stern(a)rowland.harvard.edu>
Signed-off-by: James Buren <braewoods+lkml(a)braewoods.net>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20211014015504.2695089-1-braewoods+lkml@braewoodsβ¦
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/usb/storage/unusual_devs.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index c6b3fcf90180..29191d33c0e3 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -406,6 +406,16 @@ UNUSUAL_DEV( 0x04b8, 0x0602, 0x0110, 0x0110,
"785EPX Storage",
USB_SC_SCSI, USB_PR_BULK, NULL, US_FL_SINGLE_LUN),
+/*
+ * Reported by James Buren <braewoods+lkml(a)braewoods.net>
+ * Virtual ISOs cannot be remounted if ejected while the device is locked
+ * Disable locking to mimic Windows behavior that bypasses the issue
+ */
+UNUSUAL_DEV( 0x04c5, 0x2028, 0x0001, 0x0001,
+ "iODD",
+ "2531/2541",
+ USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE),
+
/*
* Not sure who reported this originally but
* Pavel Machek <pavel(a)ucw.cz> reported that the extra US_FL_SINGLE_LUN
--
2.33.1
Setting ds->num_ports to DSA_MAX_PORTS made DSA core allocate unnecessary
dsa_port's and call mt7530_port_disable for non-existent ports.
Set it to MT7530_NUM_PORTS to fix that, and dsa_is_user_port check in
port_enable/disable is no longer required.
Cc: stable(a)vger.kernel.org
Signed-off-by: DENG Qingfang <dqfext(a)gmail.com>
---
drivers/net/dsa/mt7530.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index a3b49abd32f1..dbd15da977b5 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1035,9 +1035,6 @@ mt7530_port_enable(struct dsa_switch *ds, int port,
{
struct mt7530_priv *priv = ds->priv;
- if (!dsa_is_user_port(ds, port))
- return 0;
-
mutex_lock(&priv->reg_mutex);
/* Allow the user port gets connected to the cpu port and also
@@ -1060,9 +1057,6 @@ mt7530_port_disable(struct dsa_switch *ds, int port)
{
struct mt7530_priv *priv = ds->priv;
- if (!dsa_is_user_port(ds, port))
- return;
-
mutex_lock(&priv->reg_mutex);
/* Clear up all port matrix which could be restored in the next
@@ -3265,7 +3259,7 @@ mt7530_probe(struct mdio_device *mdiodev)
return -ENOMEM;
priv->ds->dev = &mdiodev->dev;
- priv->ds->num_ports = DSA_MAX_PORTS;
+ priv->ds->num_ports = MT7530_NUM_PORTS;
/* Use medatek,mcm property to distinguish hardware type that would
* casues a little bit differences on power-on sequence.
--
2.25.1
Hello,
We ran automated tests on a recent commit from this kernel tree:
Kernel repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Commit: 8381887fc7c2 - x86/resctrl: Free the ctrlval arrays when domain_setup_mon_state() fails
The results of these automated tests are provided below.
Overall result: PASSED
Merge: OK
Compile: OK
Tests: OK
Targeted tests: NO
All kernel binaries, config files, and logs are available for download here:
https://arr-cki-prod-datawarehouse-public.s3.amazonaws.com/index.html?prefiβ¦
Please reply to this email if you have any questions about the tests that we
ran or if you have any suggestions on how to make future tests more effective.
,-. ,-.
( C ) ( K ) Continuous
`-',-.`-' Kernel
( I ) Integration
`-'
______________________________________________________________________________
Compile testing
---------------
We compiled the kernel for 4 architectures:
aarch64:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
ppc64le:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
s390x:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
x86_64:
make options: make -j24 INSTALL_MOD_STRIP=1 targz-pkg
Hardware testing
----------------
We booted each kernel and ran the following tests:
aarch64:
Host 1:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ Networking bridge: sanity - mlx5
β‘β‘β‘ Ethernet drivers sanity - mlx5
Host 2:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β Boot test
β Reboot test
β xfstests - ext4
β xfstests - xfs
β IPMI driver test
β IPMItool loop stress test
β selinux-policy: serge-testsuite
β Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
β‘β‘β‘ stress: stress-ng - interrupt
β‘β‘β‘ stress: stress-ng - cpu
β‘β‘β‘ stress: stress-ng - cpu-cache
β‘β‘β‘ stress: stress-ng - memory
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ stress: stress-ng - os
Host 3:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β Boot test
β Reboot test
β ACPI table test
β ACPI enabled test
β LTP - cve
β LTP - sched
β‘β‘β‘ LTP - syscalls
β‘β‘β‘ LTP - can
β‘β‘β‘ LTP - commands
β‘β‘β‘ LTP - containers
β‘β‘β‘ LTP - dio
β‘β‘β‘ LTP - fs
β‘β‘β‘ LTP - fsx
β‘β‘β‘ LTP - math
β‘β‘β‘ LTP - hugetlb
β‘β‘β‘ LTP - mm
β‘β‘β‘ LTP - nptl
β‘β‘β‘ LTP - pty
β‘β‘β‘ LTP - ipc
β‘β‘β‘ LTP - tracing
β‘β‘β‘ LTP: openposix test suite
β‘β‘β‘ CIFS Connectathon
β‘β‘β‘ POSIX pjd-fstest suites
β‘β‘β‘ NFS Connectathon
β‘β‘β‘ Loopdev Sanity
β‘β‘β‘ jvm - jcstress tests
β‘β‘β‘ Memory: fork_mem
β‘β‘β‘ Memory function: memfd_create
β‘β‘β‘ AMTU (Abstract Machine Test Utility)
β‘β‘β‘ Networking bridge: sanity
β‘β‘β‘ Ethernet drivers sanity
β‘β‘β‘ Networking socket: fuzz
β‘β‘β‘ Networking route: pmtu
β‘β‘β‘ Networking route_func - local
β‘β‘β‘ Networking route_func - forward
β‘β‘β‘ Networking TCP: keepalive test
β‘β‘β‘ Networking UDP: socket
β‘β‘β‘ Networking cki netfilter test
β‘β‘β‘ Networking tunnel: geneve basic test
β‘β‘β‘ Networking tunnel: gre basic
β‘β‘β‘ L2TP basic test
β‘β‘β‘ Networking tunnel: vxlan basic
β‘β‘β‘ Networking ipsec: basic netns - transport
β‘β‘β‘ Networking ipsec: basic netns - tunnel
β‘β‘β‘ Libkcapi AF_ALG test
β‘β‘β‘ pciutils: update pci ids test
β‘β‘β‘ ALSA PCM loopback test
β‘β‘β‘ ALSA Control (mixer) Userspace Element test
β‘β‘β‘ storage: dm/common
β‘β‘β‘ lvm snapper test
β‘β‘β‘ storage: SCSI VPD
β‘β‘β‘ trace: ftrace/tracer
π§ β‘β‘β‘ xarray-idr-radixtree-test
π§ β‘β‘β‘ i2c: i2cdetect sanity
π§ β‘β‘β‘ Firmware test suite
π§ β‘β‘β‘ Memory function: kaslr
π§ β‘β‘β‘ Networking: igmp conformance test
π§ β‘β‘β‘ audit: audit testsuite test
π§ β‘β‘β‘ lvm cache test
Host 4:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 5:
β Boot test
β Reboot test
π§ β Storage blktests - srp
Host 6:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ Networking bridge: sanity - mlx5
β‘β‘β‘ Ethernet drivers sanity - mlx5
Host 7:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ Networking bridge: sanity - mlx5
β‘β‘β‘ Ethernet drivers sanity - mlx5
ppc64le:
Host 1:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 2:
β Boot test
β Reboot test
β LTP - cve
β LTP - sched
β LTP - syscalls
β LTP - can
β LTP - commands
β LTP - containers
β LTP - dio
β LTP - fs
β LTP - fsx
β LTP - math
β LTP - hugetlb
β LTP - mm
β LTP - nptl
β LTP - pty
β LTP - ipc
β LTP - tracing
β LTP: openposix test suite
β CIFS Connectathon
β POSIX pjd-fstest suites
β NFS Connectathon
β Loopdev Sanity
β jvm - jcstress tests
β Memory: fork_mem
β Memory function: memfd_create
β AMTU (Abstract Machine Test Utility)
β Networking bridge: sanity
β Ethernet drivers sanity
β Networking socket: fuzz
β Networking route: pmtu
β Networking route_func - local
β Networking route_func - forward
β Networking TCP: keepalive test
β Networking UDP: socket
β Networking cki netfilter test
β Networking tunnel: geneve basic test
β Networking tunnel: gre basic
β L2TP basic test
β Networking tunnel: vxlan basic
β Networking ipsec: basic netns - tunnel
β Libkcapi AF_ALG test
β pciutils: update pci ids test
β ALSA PCM loopback test
β ALSA Control (mixer) Userspace Element test
β storage: dm/common
β lvm snapper test
β trace: ftrace/tracer
π§ β xarray-idr-radixtree-test
π§ β Memory function: kaslr
π§ β audit: audit testsuite test
π§ β lvm cache test
Host 3:
β Boot test
β Reboot test
π§ β Storage blktests - srp
Host 4:
β Boot test
β Reboot test
β xfstests - ext4
β xfstests - xfs
β IPMI driver test
β IPMItool loop stress test
β selinux-policy: serge-testsuite
β Storage blktests - blk
β Storage block - filesystem fio test
β Storage block - queue scheduler test
β storage: software RAID testing
β Storage: swraid mdadm raid_module test
π§ β Podman system test - as root
π§ β Podman system test - as user
π§ β xfstests - btrfs
π§ β Storage blktests - nvme-tcp
π§ β Storage: lvm device-mapper test - upstream
s390x:
Host 1:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage: swraid mdadm raid_module test
β‘β‘β‘ stress: stress-ng - interrupt
β‘β‘β‘ stress: stress-ng - cpu
β‘β‘β‘ stress: stress-ng - cpu-cache
β‘β‘β‘ stress: stress-ng - memory
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ stress: stress-ng - os
Host 2:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 3:
β Boot test
β Reboot test
π§ β Storage blktests - srp
Host 4:
β Boot test
β Reboot test
β LTP - cve
β LTP - sched
β LTP - syscalls
β LTP - can
β LTP - commands
β LTP - containers
β LTP - dio
β LTP - fs
β LTP - fsx
β LTP - math
β LTP - hugetlb
β LTP - mm
β LTP - nptl
β LTP - pty
β LTP - ipc
β LTP - tracing
β LTP: openposix test suite
β CIFS Connectathon
β POSIX pjd-fstest suites
β NFS Connectathon
β Loopdev Sanity
β jvm - jcstress tests
β Memory: fork_mem
β Memory function: memfd_create
β AMTU (Abstract Machine Test Utility)
β Networking bridge: sanity
β Ethernet drivers sanity
β Networking route: pmtu
β Networking route_func - local
β Networking route_func - forward
β Networking TCP: keepalive test
β Networking UDP: socket
β Networking cki netfilter test
β Networking tunnel: geneve basic test
β Networking tunnel: gre basic
β L2TP basic test
β Networking tunnel: vxlan basic
β Networking ipsec: basic netns - transport
β Networking ipsec: basic netns - tunnel
β Libkcapi AF_ALG test
β storage: dm/common
β lvm snapper test
β trace: ftrace/tracer
π§ β xarray-idr-radixtree-test
π§ β Memory function: kaslr
π§ β audit: audit testsuite test
π§ β lvm cache test
Host 5:
β Boot test
β Reboot test
β selinux-policy: serge-testsuite
β Storage blktests - blk
β Storage: swraid mdadm raid_module test
β stress: stress-ng - interrupt
β stress: stress-ng - cpu
β stress: stress-ng - cpu-cache
β stress: stress-ng - memory
π§ β Podman system test - as root
π§ β Podman system test - as user
π§ β Storage blktests - nvme-tcp
π§ β stress: stress-ng - os
x86_64:
Host 1:
β‘ Internal infrastructure issues prevented one or more tests (marked
with β‘β‘β‘) from running on this architecture.
This is not the fault of the kernel that was tested.
β‘β‘β‘ Boot test
β‘β‘β‘ Reboot test
β‘β‘β‘ xfstests - ext4
β‘β‘β‘ xfstests - xfs
β‘β‘β‘ xfstests - nfsv4.2
β‘β‘β‘ xfstests - cifsv3.11
β‘β‘β‘ IPMI driver test
β‘β‘β‘ IPMItool loop stress test
β‘β‘β‘ selinux-policy: serge-testsuite
β‘β‘β‘ power-management: cpupower/sanity test
β‘β‘β‘ Storage blktests - blk
β‘β‘β‘ Storage block - filesystem fio test
β‘β‘β‘ Storage block - queue scheduler test
β‘β‘β‘ storage: software RAID testing
β‘β‘β‘ Storage: swraid mdadm raid_module test
β‘β‘β‘ stress: stress-ng - interrupt
β‘β‘β‘ stress: stress-ng - cpu
β‘β‘β‘ stress: stress-ng - cpu-cache
β‘β‘β‘ stress: stress-ng - memory
π§ β‘β‘β‘ Podman system test - as root
π§ β‘β‘β‘ Podman system test - as user
π§ β‘β‘β‘ CPU: Idle Test
π§ β‘β‘β‘ xfstests - btrfs
π§ β‘β‘β‘ Storage blktests - nvme-tcp
π§ β‘β‘β‘ Storage: lvm device-mapper test - upstream
π§ β‘β‘β‘ stress: stress-ng - os
Host 2:
β Boot test
β Reboot test
π§ β Storage blktests - nvmeof-mp
Host 3:
β Boot test
β Reboot test
π§ β Storage blktests - srp
Host 4:
β Boot test
β Reboot test
β ACPI table test
β LTP - cve
β LTP - sched
β LTP - syscalls
β LTP - can
β LTP - commands
β LTP - containers
β LTP - dio
β LTP - fs
β LTP - fsx
β LTP - math
β LTP - hugetlb
β LTP - mm
β LTP - nptl
β LTP - pty
β LTP - ipc
β LTP - tracing
β LTP: openposix test suite
β CIFS Connectathon
β POSIX pjd-fstest suites
β NFS Connectathon
β Loopdev Sanity
β jvm - jcstress tests
β Memory: fork_mem
β Memory function: memfd_create
β AMTU (Abstract Machine Test Utility)
β Networking bridge: sanity
β Ethernet drivers sanity
β Networking socket: fuzz
β Networking route: pmtu
β Networking route_func - local
β Networking route_func - forward
β Networking TCP: keepalive test
β Networking UDP: socket
β Networking cki netfilter test
β Networking tunnel: geneve basic test
β Networking tunnel: gre basic
β L2TP basic test
β Networking tunnel: vxlan basic
β Networking ipsec: basic netns - transport
β Networking ipsec: basic netns - tunnel
β Libkcapi AF_ALG test
β pciutils: sanity smoke test
β pciutils: update pci ids test
β ALSA PCM loopback test
β ALSA Control (mixer) Userspace Element test
β storage: dm/common
β lvm snapper test
β storage: SCSI VPD
β trace: ftrace/tracer
π§ β xarray-idr-radixtree-test
π§ β i2c: i2cdetect sanity
π§ β Firmware test suite
π§ β Memory function: kaslr
π§ β Networking: igmp conformance test
π§ β audit: audit testsuite test
π§ β lvm cache test
Host 5:
β Boot test
β Reboot test
β xfstests - ext4
β xfstests - xfs
β xfstests - nfsv4.2
β xfstests - cifsv3.11
β selinux-policy: serge-testsuite
β power-management: cpupower/sanity test
β Storage blktests - blk
β Storage block - filesystem fio test
β Storage block - queue scheduler test
β storage: software RAID testing
β Storage: swraid mdadm raid_module test
β stress: stress-ng - interrupt
β stress: stress-ng - cpu
β stress: stress-ng - cpu-cache
β stress: stress-ng - memory
π§ β Podman system test - as root
π§ β Podman system test - as user
π§ β CPU: Idle Test
π§ β xfstests - btrfs
π§ β Storage blktests - nvme-tcp
π§ β Storage: lvm device-mapper test - upstream
π§ β stress: stress-ng - os
Test sources: https://gitlab.com/cki-project/kernel-tests
π Pull requests are welcome for new tests or improvements to existing tests!
Aborted tests
-------------
Tests that didn't complete running successfully are marked with β‘β‘β‘.
If this was caused by an infrastructure issue, we try to mark that
explicitly in the report.
Waived tests
------------
If the test run included waived tests, they are marked with π§. Such tests are
executed but their results are not taken into account. Tests are waived when
their results are not reliable enough, e.g. when they're just introduced or are
being fixed.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running yet are marked with β±.
Targeted tests
--------------
Test runs for patches always include a set of base tests, plus some
tests chosen based on the file paths modified by the patch. The latter
are called "targeted tests". If no targeted tests are run, that means
no patch-specific tests are available. Please, consider contributing a
targeted test for related patches to increase test coverage. See
https://docs.engineering.redhat.com/x/_wEZB for more details.
From: "Matthew Wilcox (Oracle)" <willy(a)infradead.org>
Subject: vfs: check fd has read access in kernel_read_file_from_fd()
If we open a file without read access and then pass the fd to a syscall
whose implementation calls kernel_read_file_from_fd(), we get a warning
from __kernel_read():
if (WARN_ON_ONCE(!(file->f_mode & FMODE_READ)))
This currently affects both finit_module() and kexec_file_load(), but it
could affect other syscalls in the future.
Link: https://lkml.kernel.org/r/20211007220110.600005-1-willy@infradead.org
Fixes: b844f0ecbc56 ("vfs: define kernel_copy_file_from_fd()")
Signed-off-by: Matthew Wilcox (Oracle) <willy(a)infradead.org>
Reported-by: Hao Sun <sunhao.th(a)gmail.com>
Reviewed-by: Kees Cook <keescook(a)chromium.org>
Acked-by: Christian Brauner <christian.brauner(a)ubuntu.com>
Cc: Al Viro <viro(a)zeniv.linux.org.uk>
Cc: Mimi Zohar <zohar(a)linux.ibm.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/kernel_read_file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/kernel_read_file.c~vfs-check-fd-has-read-access-in-kernel_read_file_from_fd
+++ a/fs/kernel_read_file.c
@@ -178,7 +178,7 @@ int kernel_read_file_from_fd(int fd, lof
struct fd f = fdget(fd);
int ret = -EBADF;
- if (!f.file)
+ if (!f.file || !(f.file->f_mode & FMODE_READ))
goto out;
ret = kernel_read_file(f.file, offset, buf, buf_size, file_size, id);
_
From: Lukas Bulwahn <lukas.bulwahn(a)gmail.com>
Subject: elfcore: correct reference to CONFIG_UML
Commit 6e7b64b9dd6d ("elfcore: fix building with clang") introduces
special handling for two architectures, ia64 and User Mode Linux.
However, the wrong name, i.e., CONFIG_UM, for the intended Kconfig symbol
for User-Mode Linux was used.
Although the directory for User Mode Linux is ./arch/um; the Kconfig
symbol for this architecture is called CONFIG_UML.
Luckily, ./scripts/checkkconfigsymbols.py warns on non-existing configs:
UM
Referencing files: include/linux/elfcore.h
Similar symbols: UML, NUMA
Correct the name of the config to the intended one.
[akpm(a)linux-foundation.org: fix um/x86_64, per Catalin]
Link: https://lkml.kernel.org/r/20211006181119.2851441-1-catalin.marinas@arm.com
Link: https://lkml.kernel.org/r/YV6pejGzLy5ppEpt@arm.com
Link: https://lkml.kernel.org/r/20211006082209.417-1-lukas.bulwahn@gmail.com
Fixes: 6e7b64b9dd6d ("elfcore: fix building with clang")
Signed-off-by: Lukas Bulwahn <lukas.bulwahn(a)gmail.com>
Cc: Arnd Bergmann <arnd(a)arndb.de>
Cc: Nathan Chancellor <nathan(a)kernel.org>
Cc: Nick Desaulniers <ndesaulniers(a)google.com>
Cc: Catalin Marinas <catalin.marinas(a)arm.com>
Cc: Barret Rhoden <brho(a)google.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/elfcore.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/linux/elfcore.h~elfcore-correct-reference-to-config_uml
+++ a/include/linux/elfcore.h
@@ -109,7 +109,7 @@ static inline int elf_core_copy_task_fpr
#endif
}
-#if defined(CONFIG_UM) || defined(CONFIG_IA64)
+#if (defined(CONFIG_UML) && defined(CONFIG_X86_32)) || defined(CONFIG_IA64)
/*
* These functions parameterize elf_core_dump in fs/binfmt_elf.c to write out
* extra segments containing the gate DSO contents. Dumping its
_
From: Miaohe Lin <linmiaohe(a)huawei.com>
Subject: mm, slub: fix two bugs in slab_debug_trace_open()
Patch series "Fixups for slub".
This series contains various bug fixes for slub. We fix memoryleak,
use-afer-free, NULL pointer dereferencing and so on in slub. More details
can be found in the respective changelogs.
This patch (of 5):
It's possible that __seq_open_private() will return NULL. So we should
check it before using lest dereferencing NULL pointer. And in error
paths, we forgot to release private buffer via seq_release_private().
Memory will leak in these paths.
Link: https://lkml.kernel.org/r/20210916123920.48704-1-linmiaohe@huawei.com
Link: https://lkml.kernel.org/r/20210916123920.48704-2-linmiaohe@huawei.com
Fixes: 64dd68497be7 ("mm: slub: move sysfs slab alloc/free interfaces to debugfs")
Signed-off-by: Miaohe Lin <linmiaohe(a)huawei.com>
Reviewed-by: Vlastimil Babka <vbabka(a)suse.cz>
Cc: Christoph Lameter <cl(a)linux.com>
Cc: Pekka Enberg <penberg(a)kernel.org>
Cc: David Rientjes <rientjes(a)google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim(a)lge.com>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Faiyaz Mohammed <faiyazm(a)codeaurora.org>
Cc: Andrey Konovalov <andreyknvl(a)gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a(a)gmail.com>
Cc: Kees Cook <keescook(a)chromium.org>
Cc: Bharata B Rao <bharata(a)linux.ibm.com>
Cc: Roman Gushchin <guro(a)fb.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/slub.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/mm/slub.c~mm-slub-fix-two-bugs-in-slab_debug_trace_open
+++ a/mm/slub.c
@@ -6108,9 +6108,14 @@ static int slab_debug_trace_open(struct
struct kmem_cache *s = file_inode(filep)->i_private;
unsigned long *obj_map;
+ if (!t)
+ return -ENOMEM;
+
obj_map = bitmap_alloc(oo_objects(s->oo), GFP_KERNEL);
- if (!obj_map)
+ if (!obj_map) {
+ seq_release_private(inode, filep);
return -ENOMEM;
+ }
if (strcmp(filep->f_path.dentry->d_name.name, "alloc_traces") == 0)
alloc = TRACK_ALLOC;
@@ -6119,6 +6124,7 @@ static int slab_debug_trace_open(struct
if (!alloc_loc_track(t, PAGE_SIZE / sizeof(struct location), GFP_KERNEL)) {
bitmap_free(obj_map);
+ seq_release_private(inode, filep);
return -ENOMEM;
}
_
From: Valentin Vidic <vvidic(a)valentin-vidic.from.hr>
Subject: ocfs2: mount fails with buffer overflow in strlen
Starting with kernel 5.11 built with CONFIG_FORTIFY_SOURCE mouting an
ocfs2 filesystem with either o2cb or pcmk cluster stack fails with the
trace below. Problem seems to be that strings for cluster stack and
cluster name are not guaranteed to be null terminated in the disk
representation, while strlcpy assumes that the source string is always
null terminated. This causes a read outside of the source string
triggering the buffer overflow detection.
detected buffer overflow in strlen
------------[ cut here ]------------
kernel BUG at lib/string.c:1149!
invalid opcode: 0000 [#1] SMP PTI
CPU: 1 PID: 910 Comm: mount.ocfs2 Not tainted 5.14.0-1-amd64 #1
Debian 5.14.6-2
RIP: 0010:fortify_panic+0xf/0x11
...
Call Trace:
ocfs2_initialize_super.isra.0.cold+0xc/0x18 [ocfs2]
ocfs2_fill_super+0x359/0x19b0 [ocfs2]
mount_bdev+0x185/0x1b0
? ocfs2_remount+0x440/0x440 [ocfs2]
legacy_get_tree+0x27/0x40
vfs_get_tree+0x25/0xb0
path_mount+0x454/0xa20
__x64_sys_mount+0x103/0x140
do_syscall_64+0x3b/0xc0
entry_SYSCALL_64_after_hwframe+0x44/0xae
Link: https://lkml.kernel.org/r/20210929180654.32460-1-vvidic@valentin-vidic.fromβ¦
Signed-off-by: Valentin Vidic <vvidic(a)valentin-vidic.from.hr>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Gang He <ghe(a)suse.com>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/ocfs2/super.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
--- a/fs/ocfs2/super.c~ocfs2-mount-fails-with-buffer-overflow-in-strlen
+++ a/fs/ocfs2/super.c
@@ -2167,11 +2167,17 @@ static int ocfs2_initialize_super(struct
}
if (ocfs2_clusterinfo_valid(osb)) {
+ /*
+ * ci_stack and ci_cluster in ocfs2_cluster_info may not be null
+ * terminated, so make sure no overflow happens here by using
+ * memcpy. Destination strings will always be null terminated
+ * because osb is allocated using kzalloc.
+ */
osb->osb_stackflags =
OCFS2_RAW_SB(di)->s_cluster_info.ci_stackflags;
- strlcpy(osb->osb_cluster_stack,
+ memcpy(osb->osb_cluster_stack,
OCFS2_RAW_SB(di)->s_cluster_info.ci_stack,
- OCFS2_STACK_LABEL_LEN + 1);
+ OCFS2_STACK_LABEL_LEN);
if (strlen(osb->osb_cluster_stack) != OCFS2_STACK_LABEL_LEN) {
mlog(ML_ERROR,
"couldn't mount because of an invalid "
@@ -2180,9 +2186,9 @@ static int ocfs2_initialize_super(struct
status = -EINVAL;
goto bail;
}
- strlcpy(osb->osb_cluster_name,
+ memcpy(osb->osb_cluster_name,
OCFS2_RAW_SB(di)->s_cluster_info.ci_cluster,
- OCFS2_CLUSTER_NAME_LEN + 1);
+ OCFS2_CLUSTER_NAME_LEN);
} else {
/* The empty string is identical with classic tools that
* don't know about s_cluster_info. */
_
From: Jan Kara <jack(a)suse.cz>
Subject: ocfs2: fix data corruption after conversion from inline format
Commit 6dbf7bb55598 ("fs: Don't invalidate page buffers in
block_write_full_page()") uncovered a latent bug in ocfs2 conversion
from inline inode format to a normal inode format.
The code in
ocfs2_convert_inline_data_to_extents() attempts to zero out the whole
cluster allocated for file data by grabbing, zeroing, and dirtying all
pages covering this cluster. However these pages are beyond i_size, thus
writeback code generally ignores these dirty pages and no blocks were
ever actually zeroed on the disk.
This oversight was fixed by commit 693c241a5f6a ("ocfs2: No need to zero
pages past i_size.") for standard ocfs2 write path, inline conversion path
was apparently forgotten; the commit log also has a reasoning why the
zeroing actually is not needed.
After commit 6dbf7bb55598, things became worse as writeback code stopped
invalidating buffers on pages beyond i_size and thus these pages end up
with clean PageDirty bit but with buffers attached to these pages being
still dirty. So when a file is converted from inline format, then
writeback triggers, and then the file is grown so that these pages become
valid, the invalid dirtiness state is preserved, mark_buffer_dirty() does
nothing on these pages (buffers are already dirty) but page is never
written back because it is clean. So data written to these pages is lost
once pages are reclaimed.
Simple reproducer for the problem is:
xfs_io -f -c "pwrite 0 2000" -c "pwrite 2000 2000" -c "fsync" \
-c "pwrite 4000 2000" ocfs2_file
After unmounting and mounting the fs again, you can observe that end of
'ocfs2_file' has lost its contents.
Fix the problem by not doing the pointless zeroing during conversion
from inline format similarly as in the standard write path.
[akpm(a)linux-foundation.org: fix whitespace, per Joseph]
Link: https://lkml.kernel.org/r/20210930095405.21433-1-jack@suse.cz
Fixes: 6dbf7bb55598 ("fs: Don't invalidate page buffers in block_write_full_page()")
Signed-off-by: Jan Kara <jack(a)suse.cz>
Reviewed-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Tested-by: Joseph Qi <joseph.qi(a)linux.alibaba.com>
Acked-by: Gang He <ghe(a)suse.com>
Cc: Mark Fasheh <mark(a)fasheh.com>
Cc: Joel Becker <jlbec(a)evilplan.org>
Cc: Junxiao Bi <junxiao.bi(a)oracle.com>
Cc: Changwei Ge <gechangwei(a)live.cn>
Cc: Jun Piao <piaojun(a)huawei.com>
Cc: "Markov, Andrey" <Markov.Andrey(a)Dell.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/ocfs2/alloc.c | 46 +++++++++++----------------------------------
1 file changed, 12 insertions(+), 34 deletions(-)
--- a/fs/ocfs2/alloc.c~ocfs2-fix-data-corruption-after-conversion-from-inline-format
+++ a/fs/ocfs2/alloc.c
@@ -7045,7 +7045,7 @@ void ocfs2_set_inode_data_inline(struct
int ocfs2_convert_inline_data_to_extents(struct inode *inode,
struct buffer_head *di_bh)
{
- int ret, i, has_data, num_pages = 0;
+ int ret, has_data, num_pages = 0;
int need_free = 0;
u32 bit_off, num;
handle_t *handle;
@@ -7054,26 +7054,17 @@ int ocfs2_convert_inline_data_to_extents
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data;
struct ocfs2_alloc_context *data_ac = NULL;
- struct page **pages = NULL;
- loff_t end = osb->s_clustersize;
+ struct page *page = NULL;
struct ocfs2_extent_tree et;
int did_quota = 0;
has_data = i_size_read(inode) ? 1 : 0;
if (has_data) {
- pages = kcalloc(ocfs2_pages_per_cluster(osb->sb),
- sizeof(struct page *), GFP_NOFS);
- if (pages == NULL) {
- ret = -ENOMEM;
- mlog_errno(ret);
- return ret;
- }
-
ret = ocfs2_reserve_clusters(osb, 1, &data_ac);
if (ret) {
mlog_errno(ret);
- goto free_pages;
+ goto out;
}
}
@@ -7093,7 +7084,8 @@ int ocfs2_convert_inline_data_to_extents
}
if (has_data) {
- unsigned int page_end;
+ unsigned int page_end = min_t(unsigned, PAGE_SIZE,
+ osb->s_clustersize);
u64 phys;
ret = dquot_alloc_space_nodirty(inode,
@@ -7117,15 +7109,8 @@ int ocfs2_convert_inline_data_to_extents
*/
block = phys = ocfs2_clusters_to_blocks(inode->i_sb, bit_off);
- /*
- * Non sparse file systems zero on extend, so no need
- * to do that now.
- */
- if (!ocfs2_sparse_alloc(osb) &&
- PAGE_SIZE < osb->s_clustersize)
- end = PAGE_SIZE;
-
- ret = ocfs2_grab_eof_pages(inode, 0, end, pages, &num_pages);
+ ret = ocfs2_grab_eof_pages(inode, 0, page_end, &page,
+ &num_pages);
if (ret) {
mlog_errno(ret);
need_free = 1;
@@ -7136,20 +7121,15 @@ int ocfs2_convert_inline_data_to_extents
* This should populate the 1st page for us and mark
* it up to date.
*/
- ret = ocfs2_read_inline_data(inode, pages[0], di_bh);
+ ret = ocfs2_read_inline_data(inode, page, di_bh);
if (ret) {
mlog_errno(ret);
need_free = 1;
goto out_unlock;
}
- page_end = PAGE_SIZE;
- if (PAGE_SIZE > osb->s_clustersize)
- page_end = osb->s_clustersize;
-
- for (i = 0; i < num_pages; i++)
- ocfs2_map_and_dirty_page(inode, handle, 0, page_end,
- pages[i], i > 0, &phys);
+ ocfs2_map_and_dirty_page(inode, handle, 0, page_end, page, 0,
+ &phys);
}
spin_lock(&oi->ip_lock);
@@ -7180,8 +7160,8 @@ int ocfs2_convert_inline_data_to_extents
}
out_unlock:
- if (pages)
- ocfs2_unlock_and_free_pages(pages, num_pages);
+ if (page)
+ ocfs2_unlock_and_free_pages(&page, num_pages);
out_commit:
if (ret < 0 && did_quota)
@@ -7205,8 +7185,6 @@ out_commit:
out:
if (data_ac)
ocfs2_free_alloc_context(data_ac);
-free_pages:
- kfree(pages);
return ret;
}
_
From: Nadav Amit <namit(a)vmware.com>
Subject: userfaultfd: fix a race between writeprotect and exit_mmap()
A race is possible when a process exits, its VMAs are removed by
exit_mmap() and at the same time userfaultfd_writeprotect() is called.
The race was detected by KASAN on a development kernel, but it appears to
be possible on vanilla kernels as well.
Use mmget_not_zero() to prevent the race as done in other userfaultfd
operations.
Link: https://lkml.kernel.org/r/20210921200247.25749-1-namit@vmware.com
Fixes: 63b2d4174c4ad ("userfaultfd: wp: add the writeprotect API to userfaultfd ioctl")
Signed-off-by: Nadav Amit <namit(a)vmware.com>
Tested-by: Li Wang <liwang(a)redhat.com>
Reviewed-by: Peter Xu <peterx(a)redhat.com>
Cc: Andrea Arcangeli <aarcange(a)redhat.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/userfaultfd.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
--- a/fs/userfaultfd.c~userfaultfd-fix-a-race-between-writeprotect-and-exit_mmap
+++ a/fs/userfaultfd.c
@@ -1827,9 +1827,15 @@ static int userfaultfd_writeprotect(stru
if (mode_wp && mode_dontwake)
return -EINVAL;
- ret = mwriteprotect_range(ctx->mm, uffdio_wp.range.start,
- uffdio_wp.range.len, mode_wp,
- &ctx->mmap_changing);
+ if (mmget_not_zero(ctx->mm)) {
+ ret = mwriteprotect_range(ctx->mm, uffdio_wp.range.start,
+ uffdio_wp.range.len, mode_wp,
+ &ctx->mmap_changing);
+ mmput(ctx->mm);
+ } else {
+ return -ESRCH;
+ }
+
if (ret)
return ret;
_
From: Peter Xu <peterx(a)redhat.com>
Subject: mm/userfaultfd: selftests: fix memory corruption with thp enabled
In RHEL's gating selftests we've encountered memory corruption in the uffd
event test even with upstream kernel:
# ./userfaultfd anon 128 4
nr_pages: 32768, nr_pages_per_cpu: 32768
bounces: 3, mode: rnd racing read, userfaults: 6240 missing (6240) 14729 wp (14729)
bounces: 2, mode: racing read, userfaults: 1444 missing (1444) 28877 wp (28877)
bounces: 1, mode: rnd read, userfaults: 6055 missing (6055) 14699 wp (14699)
bounces: 0, mode: read, userfaults: 82 missing (82) 25196 wp (25196)
testing uffd-wp with pagemap (pgsize=4096): done
testing uffd-wp with pagemap (pgsize=2097152): done
testing events (fork, remap, remove): ERROR: nr 32427 memory corruption 0 1 (errno=0, line=963)
ERROR: faulting process failed (errno=0, line=1117)
It can be easily reproduced when global thp enabled, which is the default for
RHEL.
It's also known as a side effect of commit 0db282ba2c12 ("selftest: use
mmap instead of posix_memalign to allocate memory", 2021-07-23), which is
imho right itself on using mmap() to make sure the addresses will be
untagged even on arm.
The problem is, for each test we allocate buffers using two
allocate_area() calls. We assumed these two buffers won't affect each
other, however they could, because mmap() could have found that the two
buffers are near each other and having the same VMA flags, so they got
merged into one VMA.
It won't be a big problem if thp is not enabled, but when thp is
agressively enabled it means when initializing the src buffer it could
accidentally setup part of the dest buffer too when there's a shared THP
that overlaps the two regions. Then some of the dest buffer won't be able
to be trapped by userfaultfd missing mode, then it'll cause memory
corruption as described.
To fix it, do release_pages() after initializing the src buffer.
Since the previous two release_pages() calls are after
uffd_test_ctx_clear() which will unmap all the buffers anyway (which is
stronger than release pages; as unmap() also tear town pgtables), drop
them as they shouldn't really be anything useful.
We can mark the Fixes tag upon 0db282ba2c12 as it's reported to only
happen there, however the real "Fixes" IMHO should be 8ba6e8640844, as
before that commit we'll always do explicit release_pages() before
registration of uffd, and 8ba6e8640844 changed that logic by adding extra
unmap/map and we didn't release the pages at the right place. Meanwhile I
don't have a solid glue anyway on whether posix_memalign() could always
avoid triggering this bug, hence it's safer to attach this fix to commit
8ba6e8640844.
Link: https://lkml.kernel.org/r/20210923232512.210092-1-peterx@redhat.com
Fixes: 8ba6e8640844 ("userfaultfd/selftests: reinitialize test context in each test")
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1994931
Signed-off-by: Peter Xu <peterx(a)redhat.com>
Reported-by: Li Wang <liwan(a)redhat.com>
Tested-by: Li Wang <liwang(a)redhat.com>
Reviewed-by: Axel Rasmussen <axelrasmussen(a)google.com>
Cc: Andrea Arcangeli <aarcange(a)redhat.com>
Cc: Nadav Amit <nadav.amit(a)gmail.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
tools/testing/selftests/vm/userfaultfd.c | 23 ++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
--- a/tools/testing/selftests/vm/userfaultfd.c~mm-userfaultfd-selftests-fix-memory-corruption-with-thp-enabled
+++ a/tools/testing/selftests/vm/userfaultfd.c
@@ -414,9 +414,6 @@ static void uffd_test_ctx_init_ext(uint6
uffd_test_ops->allocate_area((void **)&area_src);
uffd_test_ops->allocate_area((void **)&area_dst);
- uffd_test_ops->release_pages(area_src);
- uffd_test_ops->release_pages(area_dst);
-
userfaultfd_open(features);
count_verify = malloc(nr_pages * sizeof(unsigned long long));
@@ -437,6 +434,26 @@ static void uffd_test_ctx_init_ext(uint6
*(area_count(area_src, nr) + 1) = 1;
}
+ /*
+ * After initialization of area_src, we must explicitly release pages
+ * for area_dst to make sure it's fully empty. Otherwise we could have
+ * some area_dst pages be errornously initialized with zero pages,
+ * hence we could hit memory corruption later in the test.
+ *
+ * One example is when THP is globally enabled, above allocate_area()
+ * calls could have the two areas merged into a single VMA (as they
+ * will have the same VMA flags so they're mergeable). When we
+ * initialize the area_src above, it's possible that some part of
+ * area_dst could have been faulted in via one huge THP that will be
+ * shared between area_src and area_dst. It could cause some of the
+ * area_dst won't be trapped by missing userfaults.
+ *
+ * This release_pages() will guarantee even if that happened, we'll
+ * proactively split the thp and drop any accidentally initialized
+ * pages within area_dst.
+ */
+ uffd_test_ops->release_pages(area_dst);
+
pipefd = malloc(sizeof(int) * nr_cpus * 2);
if (!pipefd)
err("pipefd");
_
Currently, Linux probes for X86_BUG_NULL_SEL unconditionally which
makes it unsafe to migrate in a virtualised environment as the
properties across the migration pool might differ.
To be specific, the case which goes wrong is:
1. Zen1 (or earlier) and Zen2 (or later) in a migration pool
2. Linux boots on Zen2, probes and finds the absence of X86_BUG_NULL_SEL
3. Linux is then migrated to Zen1
Linux is now running on a X86_BUG_NULL_SEL-impacted CPU while believing
that the bug is fixed.
The only way to address the problem is to fully trust the "no longer
affected" CPUID bit when virtualised, because in the above case it would
be clear deliberately to indicate the fact "you might migrate to
somewhere which has this behaviour".
Zen3 adds the NullSelectorClearsBase bit to indicate that loading
a NULL segment selector zeroes the base and limit fields, as well as
just attributes. Zen2 also has this behaviour but doesn't have the
NSCB bit.
Signed-off-by: Jane Malalane <jane.malalane(a)citrix.com>
---
CC: <x86(a)kernel.org>
CC: Thomas Gleixner <tglx(a)linutronix.de>
CC: Ingo Molnar <mingo(a)redhat.com>
CC: Borislav Petkov <bp(a)alien8.de>
CC: "H. Peter Anvin" <hpa(a)zytor.com>
CC: Pu Wen <puwen(a)hygon.cn>
CC: Paolo Bonzini <pbonzini(a)redhat.com>
CC: Sean Christopherson <seanjc(a)google.com>
CC: Peter Zijlstra <peterz(a)infradead.org>
CC: Andrew Cooper <andrew.cooper3(a)citrix.com>
CC: Yazen Ghannam <Yazen.Ghannam(a)amd.com>
CC: Brijesh Singh <brijesh.singh(a)amd.com>
CC: Huang Rui <ray.huang(a)amd.com>
CC: Andy Lutomirski <luto(a)kernel.org>
CC: Kim Phillips <kim.phillips(a)amd.com>
CC: <stable(a)vger.kernel.org>
v2:
* Deliberately not __init. early_init_*() not __init functions
* Fixed whitespace error flagged by scripts/checkpatch.pl
---
arch/x86/kernel/cpu/amd.c | 22 ++++++++++++++++++++++
arch/x86/kernel/cpu/common.c | 8 +++-----
arch/x86/kernel/cpu/cpu.h | 1 +
arch/x86/kernel/cpu/hygon.c | 22 ++++++++++++++++++++++
4 files changed, 48 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 2131af9f2fa2..1abfb0ae1f74 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -625,6 +625,7 @@ static void early_init_amd(struct cpuinfo_x86 *c)
{
u64 value;
u32 dummy;
+ bool nscb = false;
early_init_amd_mc(c);
@@ -650,6 +651,27 @@ static void early_init_amd(struct cpuinfo_x86 *c)
if (c->x86_power & BIT(14))
set_cpu_cap(c, X86_FEATURE_RAPL);
+ /*
+ * Zen1 and earlier CPUs don't clear segment base/limits when
+ * loading a NULL selector. This has been designated
+ * X86_BUG_NULL_SEG.
+ *
+ * Zen3 CPUs advertise Null Selector Clears Base in CPUID.
+ * Zen2 CPUs also have this behaviour, but no CPUID bit.
+ *
+ * A hypervisor may sythesize the bit, but may also hide it
+ * for migration safety, so we must not probe for model
+ * specific behaviour when virtualised.
+ */
+ if (c->extended_cpuid_level >= 0x80000021 && cpuid_eax(0x80000021) & BIT(6))
+ nscb = true;
+
+ if (!cpu_has(c, X86_FEATURE_HYPERVISOR) && !nscb && c->x86 == 0x17)
+ nscb = check_null_seg_clears_base(c);
+
+ if (!nscb)
+ set_cpu_bug(c, X86_BUG_NULL_SEG);
+
#ifdef CONFIG_X86_64
set_cpu_cap(c, X86_FEATURE_SYSCALL32);
#else
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 0f8885949e8c..2ca4afb97247 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1395,7 +1395,7 @@ void __init early_cpu_init(void)
early_identify_cpu(&boot_cpu_data);
}
-static void detect_null_seg_behavior(struct cpuinfo_x86 *c)
+bool check_null_seg_clears_base(struct cpuinfo_x86 *c)
{
#ifdef CONFIG_X86_64
/*
@@ -1418,10 +1418,10 @@ static void detect_null_seg_behavior(struct cpuinfo_x86 *c)
wrmsrl(MSR_FS_BASE, 1);
loadsegment(fs, 0);
rdmsrl(MSR_FS_BASE, tmp);
- if (tmp != 0)
- set_cpu_bug(c, X86_BUG_NULL_SEG);
wrmsrl(MSR_FS_BASE, old_base);
+ return tmp == 0;
#endif
+ return true;
}
static void generic_identify(struct cpuinfo_x86 *c)
@@ -1457,8 +1457,6 @@ static void generic_identify(struct cpuinfo_x86 *c)
get_model_name(c); /* Default name */
- detect_null_seg_behavior(c);
-
/*
* ESPFIX is a strange bug. All real CPUs have it. Paravirt
* systems that run Linux at CPL > 0 may or may not have the
diff --git a/arch/x86/kernel/cpu/cpu.h b/arch/x86/kernel/cpu/cpu.h
index 95521302630d..ad88bce508fa 100644
--- a/arch/x86/kernel/cpu/cpu.h
+++ b/arch/x86/kernel/cpu/cpu.h
@@ -75,6 +75,7 @@ extern int detect_extended_topology_early(struct cpuinfo_x86 *c);
extern int detect_extended_topology(struct cpuinfo_x86 *c);
extern int detect_ht_early(struct cpuinfo_x86 *c);
extern void detect_ht(struct cpuinfo_x86 *c);
+extern bool check_null_seg_clears_base(struct cpuinfo_x86 *c);
unsigned int aperfmperf_get_khz(int cpu);
diff --git a/arch/x86/kernel/cpu/hygon.c b/arch/x86/kernel/cpu/hygon.c
index 6d50136f7ab9..49bdb55efe52 100644
--- a/arch/x86/kernel/cpu/hygon.c
+++ b/arch/x86/kernel/cpu/hygon.c
@@ -240,6 +240,7 @@ static void bsp_init_hygon(struct cpuinfo_x86 *c)
static void early_init_hygon(struct cpuinfo_x86 *c)
{
u32 dummy;
+ bool nscb = false;
early_init_hygon_mc(c);
@@ -264,6 +265,27 @@ static void early_init_hygon(struct cpuinfo_x86 *c)
if (c->x86_power & BIT(14))
set_cpu_cap(c, X86_FEATURE_RAPL);
+ /*
+ * Zen1 and earlier CPUs don't clear segment base/limits when
+ * loading a NULL selector. This has been designated
+ * X86_BUG_NULL_SEG.
+ *
+ * Zen3 CPUs advertise Null Selector Clears Base in CPUID.
+ * Zen2 CPUs also have this behaviour, but no CPUID bit.
+ *
+ * A hypervisor may sythesize the bit, but may also hide it
+ * for migration safety, so we must not probe for model
+ * specific behaviour when virtualised.
+ */
+ if (c->extended_cpuid_level >= 0x80000021 && cpuid_eax(0x80000021) & BIT(6))
+ nscb = true;
+
+ if (!cpu_has(c, X86_FEATURE_HYPERVISOR) && !nscb && c->x86 == 0x18)
+ nscb = check_null_seg_clears_base(c);
+
+ if (!nscb)
+ set_cpu_bug(c, X86_BUG_NULL_SEG);
+
#ifdef CONFIG_X86_64
set_cpu_cap(c, X86_FEATURE_SYSCALL32);
#endif
--
2.11.0
This is the start of the stable review cycle for the 4.19.213 release.
There are 50 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 20 Oct 2021 13:23:15 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.213-rβ¦
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.19.213-rc1
Vegard Nossum <vegard.nossum(a)oracle.com>
r8152: select CRC32 and CRYPTO/CRYPTO_HASH/CRYPTO_SHA256
chongjiapeng <jiapeng.chong(a)linux.alibaba.com>
qed: Fix missing error code in qed_slowpath_start()
Sebastian Andrzej Siewior <bigeasy(a)linutronix.de>
mqprio: Correct stats in mqprio_dump_class_stats().
Jackie Liu <liuyun01(a)kylinos.cn>
acpi/arm64: fix next_platform_timer() section mismatch error
Dan Carpenter <dan.carpenter(a)oracle.com>
drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling
Dan Carpenter <dan.carpenter(a)oracle.com>
drm/msm/dsi: Fix an error code in msm_dsi_modeset_init()
Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
drm/msm/mdp5: fix cursor-related warnings
Colin Ian King <colin.king(a)canonical.com>
drm/msm: Fix null pointer dereference on pointer edp
Vadim Pasternak <vadimp(a)nvidia.com>
platform/mellanox: mlxreg-io: Fix argument base in kstrtou32() call
Dan Carpenter <dan.carpenter(a)oracle.com>
pata_legacy: fix a couple uninitialized variable bugs
Ziyang Xuan <william.xuanziyang(a)huawei.com>
NFC: digital: fix possible memory leak in digital_in_send_sdd_req()
Ziyang Xuan <william.xuanziyang(a)huawei.com>
NFC: digital: fix possible memory leak in digital_tg_listen_mdaa()
Ziyang Xuan <william.xuanziyang(a)huawei.com>
nfc: fix error handling of nfc_proto_register()
Arnd Bergmann <arnd(a)arndb.de>
ethernet: s2io: fix setting mac address during resume
Nanyong Sun <sunnanyong(a)huawei.com>
net: encx24j600: check error in devm_regmap_init_encx24j600
Vegard Nossum <vegard.nossum(a)oracle.com>
net: korina: select CRC32
Vegard Nossum <vegard.nossum(a)oracle.com>
net: arc: select CRC32
Eiichi Tsukata <eiichi.tsukata(a)nutanix.com>
sctp: account stream padding length for reconf chunk
Dan Carpenter <dan.carpenter(a)oracle.com>
iio: dac: ti-dac5571: fix an error code in probe()
Dan Carpenter <dan.carpenter(a)oracle.com>
iio: ssp_sensors: fix error code in ssp_print_mcu_debug()
Dan Carpenter <dan.carpenter(a)oracle.com>
iio: ssp_sensors: add more range checking in ssp_parse_dataframe()
Jiri Valek - 2N <valek(a)2n.cz>
iio: light: opt3001: Fixed timeout error when 0 lux
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
iio: adc128s052: Fix the error handling path of 'adc128_probe()'
Billy Tsai <billy_tsai(a)aspeedtech.com>
iio: adc: aspeed: set driver data when adc probe.
Borislav Petkov <bp(a)suse.de>
x86/Kconfig: Do not enable AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT automatically
Stephen Boyd <swboyd(a)chromium.org>
nvmem: Fix shift-out-of-bound (UBSAN) with byte size cells
Halil Pasic <pasic(a)linux.ibm.com>
virtio: write back F_VERSION_1 before validate
Tomaz Solc <tomaz.solc(a)tablix.org>
USB: serial: option: add prod. id for Quectel EG91
Daniele Palmas <dnlplm(a)gmail.com>
USB: serial: option: add Telit LE910Cx composition 0x1204
Yu-Tung Chang <mtwget(a)gmail.com>
USB: serial: option: add Quectel EC200S-CN module support
Aleksander Morgado <aleksander(a)aleksander.es>
USB: serial: qcserial: add EM9191 QDL support
Michael Cullen <michael(a)michaelcullen.name>
Input: xpad - add support for another USB ID of Nacon GC-100
Miquel Raynal <miquel.raynal(a)bootlin.com>
usb: musb: dsps: Fix the probe error path
Zhang Jianhua <chris.zjh(a)huawei.com>
efi: Change down_interruptible() in virt_efi_reset_system() to down_trylock()
Ard Biesheuvel <ardb(a)kernel.org>
efi/cper: use stack buffer for error record decoding
Arnd Bergmann <arnd(a)arndb.de>
cb710: avoid NULL pointer subtraction
Nikolay Martynov <mar.kolya(a)gmail.com>
xhci: Enable trust tx length quirk for Fresco FL11 USB controller
Pavankumar Kondeti <pkondeti(a)codeaurora.org>
xhci: Fix command ring pointer corruption while aborting a command
Jonathan Bell <jonathan(a)raspberrypi.com>
xhci: guard accesses to ep_state in xhci_endpoint_reset()
Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
mei: me: add Ice Lake-N device id.
James Morse <james.morse(a)arm.com>
x86/resctrl: Free the ctrlval arrays when domain_setup_mon_state() fails
Filipe Manana <fdmanana(a)suse.com>
btrfs: check for error when looking up inode during dir entry replay
Filipe Manana <fdmanana(a)suse.com>
btrfs: deal with errors when adding inode reference during log replay
Filipe Manana <fdmanana(a)suse.com>
btrfs: deal with errors when replaying dir entry during log replay
Roberto Sassu <roberto.sassu(a)huawei.com>
s390: fix strrchr() implementation
Steven Rostedt <rostedt(a)goodmis.org>
nds32/ftrace: Fix Error: invalid operands (*UND* and *UND* sections) for `^'
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek - ALC236 headset MIC recording issue
Werner Sembach <wse(a)tuxedocomputers.com>
ALSA: hda/realtek: Add quirk for Clevo X170KM-G
Werner Sembach <wse(a)tuxedocomputers.com>
ALSA: hda/realtek: Complete partial device name to avoid ambiguity
Takashi Iwai <tiwai(a)suse.de>
ALSA: seq: Fix a potential UAF by wrong private_free call order
-------------
Diffstat:
Makefile | 4 +--
arch/s390/lib/string.c | 15 +++++-----
arch/x86/Kconfig | 1 -
arch/x86/kernel/cpu/intel_rdt.c | 2 ++
drivers/acpi/arm64/gtdt.c | 2 +-
drivers/ata/pata_legacy.c | 6 ++--
drivers/firmware/efi/cper.c | 4 +--
drivers/firmware/efi/runtime-wrappers.c | 2 +-
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 16 +++++++++++
drivers/gpu/drm/msm/dsi/dsi.c | 4 ++-
drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +-
drivers/gpu/drm/msm/edp/edp_ctrl.c | 3 +-
drivers/iio/adc/aspeed_adc.c | 1 +
drivers/iio/adc/ti-adc128s052.c | 6 ++++
drivers/iio/common/ssp_sensors/ssp_spi.c | 11 ++++++--
drivers/iio/dac/ti-dac5571.c | 1 +
drivers/iio/light/opt3001.c | 6 ++--
drivers/input/joystick/xpad.c | 2 ++
drivers/misc/cb710/sgbuf2.c | 2 +-
drivers/misc/mei/hw-me-regs.h | 1 +
drivers/misc/mei/pci-me.c | 1 +
drivers/net/ethernet/Kconfig | 1 +
drivers/net/ethernet/arc/Kconfig | 1 +
drivers/net/ethernet/microchip/encx24j600-regmap.c | 10 +++++--
drivers/net/ethernet/microchip/encx24j600.c | 5 +++-
drivers/net/ethernet/microchip/encx24j600_hw.h | 4 +--
drivers/net/ethernet/neterion/s2io.c | 2 +-
drivers/net/ethernet/qlogic/qed/qed_main.c | 1 +
drivers/net/usb/Kconfig | 4 +++
drivers/nvmem/core.c | 3 +-
drivers/platform/mellanox/mlxreg-io.c | 2 +-
drivers/usb/host/xhci-pci.c | 2 ++
drivers/usb/host/xhci-ring.c | 14 +++++++---
drivers/usb/host/xhci.c | 5 ++++
drivers/usb/musb/musb_dsps.c | 4 ++-
drivers/usb/serial/option.c | 8 ++++++
drivers/usb/serial/qcserial.c | 1 +
drivers/virtio/virtio.c | 11 ++++++++
fs/btrfs/tree-log.c | 32 +++++++++++++++-------
net/nfc/af_nfc.c | 3 ++
net/nfc/digital_core.c | 9 ++++--
net/nfc/digital_technology.c | 8 ++++--
net/sched/sch_mqprio.c | 30 ++++++++++++--------
net/sctp/sm_make_chunk.c | 2 +-
scripts/recordmcount.pl | 2 +-
sound/core/seq_device.c | 8 ++----
sound/pci/hda/patch_realtek.c | 8 ++++--
47 files changed, 198 insertions(+), 74 deletions(-)
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: ite-cir: IR receiver stop working after receive overflow
Author: Sean Young <sean(a)mess.org>
Date: Sun Oct 17 13:01:15 2021 +0100
On an Intel NUC6iSYK, no IR is reported after a receive overflow.
When a receiver overflow occurs, this condition is only cleared by
reading the fifo. Make sure we read anything in the fifo.
Fixes: 28c7afb07ccf ("media: ite-cir: check for receive overflow")
Suggested-by: Bryan Pass <bryan.pass(a)gmail.com>
Tested-by: Bryan Pass <bryan.pass(a)gmail.com>
Cc: stable(a)vger.kernel.org>
Signed-off-by: Sean Young <sean(a)mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei(a)kernel.org>
drivers/media/rc/ite-cir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index 5bc23e8c6d91..4f77d4ebacdc 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -242,7 +242,7 @@ static irqreturn_t ite_cir_isr(int irq, void *data)
}
/* check for the receive interrupt */
- if (iflags & ITE_IRQ_RX_FIFO) {
+ if (iflags & (ITE_IRQ_RX_FIFO | ITE_IRQ_RX_FIFO_OVERRUN)) {
/* read the FIFO bytes */
rx_bytes = dev->params->get_rx_bytes(dev, rx_buf,
ITE_RX_FIFO_LEN);
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: rkvdec: Support dynamic resolution changes
Author: Chen-Yu Tsai <wenst(a)chromium.org>
Date: Fri Oct 8 11:04:23 2021 +0100
The mem-to-mem stateless decoder API specifies support for dynamic
resolution changes. In particular, the decoder should accept format
changes on the OUTPUT queue even when buffers have been allocated,
as long as it is not streaming.
Relax restrictions for S_FMT as described in the previous paragraph,
and as long as the codec format remains the same. This aligns it with
the Hantro and Cedrus decoders. This change was mostly based on commit
ae02d49493b5 ("media: hantro: Fix s_fmt for dynamic resolution changes").
Since rkvdec_s_fmt() is now just a wrapper around the output/capture
variants without any additional shared functionality, drop the wrapper
and call the respective functions directly.
Fixes: cd33c830448b ("media: rkvdec: Add the rkvdec driver")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Chen-Yu Tsai <wenst(a)chromium.org>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne(a)collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei(a)kernel.org>
drivers/staging/media/rkvdec/rkvdec.c | 40 +++++++++++++++++------------------
1 file changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c
index bf00fe6534a3..4fd4a2907da7 100644
--- a/drivers/staging/media/rkvdec/rkvdec.c
+++ b/drivers/staging/media/rkvdec/rkvdec.c
@@ -280,31 +280,20 @@ static int rkvdec_try_output_fmt(struct file *file, void *priv,
return 0;
}
-static int rkvdec_s_fmt(struct file *file, void *priv,
- struct v4l2_format *f,
- int (*try_fmt)(struct file *, void *,
- struct v4l2_format *))
+static int rkvdec_s_capture_fmt(struct file *file, void *priv,
+ struct v4l2_format *f)
{
struct rkvdec_ctx *ctx = fh_to_rkvdec_ctx(priv);
struct vb2_queue *vq;
+ int ret;
- if (!try_fmt)
- return -EINVAL;
-
- vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type);
+ /* Change not allowed if queue is busy */
+ vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx,
+ V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);
if (vb2_is_busy(vq))
return -EBUSY;
- return try_fmt(file, priv, f);
-}
-
-static int rkvdec_s_capture_fmt(struct file *file, void *priv,
- struct v4l2_format *f)
-{
- struct rkvdec_ctx *ctx = fh_to_rkvdec_ctx(priv);
- int ret;
-
- ret = rkvdec_s_fmt(file, priv, f, rkvdec_try_capture_fmt);
+ ret = rkvdec_try_capture_fmt(file, priv, f);
if (ret)
return ret;
@@ -319,9 +308,20 @@ static int rkvdec_s_output_fmt(struct file *file, void *priv,
struct v4l2_m2m_ctx *m2m_ctx = ctx->fh.m2m_ctx;
const struct rkvdec_coded_fmt_desc *desc;
struct v4l2_format *cap_fmt;
- struct vb2_queue *peer_vq;
+ struct vb2_queue *peer_vq, *vq;
int ret;
+ /*
+ * In order to support dynamic resolution change, the decoder admits
+ * a resolution change, as long as the pixelformat remains. Can't be
+ * done if streaming.
+ */
+ vq = v4l2_m2m_get_vq(m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE);
+ if (vb2_is_streaming(vq) ||
+ (vb2_is_busy(vq) &&
+ f->fmt.pix_mp.pixelformat != ctx->coded_fmt.fmt.pix_mp.pixelformat))
+ return -EBUSY;
+
/*
* Since format change on the OUTPUT queue will reset the CAPTURE
* queue, we can't allow doing so when the CAPTURE queue has buffers
@@ -331,7 +331,7 @@ static int rkvdec_s_output_fmt(struct file *file, void *priv,
if (vb2_is_busy(peer_vq))
return -EBUSY;
- ret = rkvdec_s_fmt(file, priv, f, rkvdec_try_output_fmt);
+ ret = rkvdec_try_output_fmt(file, priv, f);
if (ret)
return ret;
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: rkvdec: Do not override sizeimage for output format
Author: Chen-Yu Tsai <wenst(a)chromium.org>
Date: Fri Oct 8 11:04:22 2021 +0100
The rkvdec H.264 decoder currently overrides sizeimage for the output
format. This causes issues when userspace requires and requests a larger
buffer, but ends up with one of insufficient size.
Instead, only provide a default size if none was requested. This fixes
the video_decode_accelerator_tests from Chromium failing on the first
frame due to insufficient buffer space. It also aligns the behavior
of the rkvdec driver with the Hantro and Cedrus drivers.
Fixes: cd33c830448b ("media: rkvdec: Add the rkvdec driver")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Chen-Yu Tsai <wenst(a)chromium.org>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne(a)collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei(a)kernel.org>
drivers/staging/media/rkvdec/rkvdec-h264.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/drivers/staging/media/rkvdec/rkvdec-h264.c b/drivers/staging/media/rkvdec/rkvdec-h264.c
index 76e97cbe2512..951e19231da2 100644
--- a/drivers/staging/media/rkvdec/rkvdec-h264.c
+++ b/drivers/staging/media/rkvdec/rkvdec-h264.c
@@ -1015,8 +1015,9 @@ static int rkvdec_h264_adjust_fmt(struct rkvdec_ctx *ctx,
struct v4l2_pix_format_mplane *fmt = &f->fmt.pix_mp;
fmt->num_planes = 1;
- fmt->plane_fmt[0].sizeimage = fmt->width * fmt->height *
- RKVDEC_H264_MAX_DEPTH_IN_BYTES;
+ if (!fmt->plane_fmt[0].sizeimage)
+ fmt->plane_fmt[0].sizeimage = fmt->width * fmt->height *
+ RKVDEC_H264_MAX_DEPTH_IN_BYTES;
return 0;
}
This is a note to let you know that I've just added the patch titled
usb-storage: Add compatibility quirk flags for iODD 2531/2541
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the usb-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
>From 05c8f1b67e67dcd786ae3fe44492bbc617b4bd12 Mon Sep 17 00:00:00 2001
From: James Buren <braewoods+lkml(a)braewoods.net>
Date: Wed, 13 Oct 2021 20:55:04 -0500
Subject: usb-storage: Add compatibility quirk flags for iODD 2531/2541
These drive enclosures have firmware bugs that make it impossible to mount
a new virtual ISO image after Linux ejects the old one if the device is
locked by Linux. Windows bypasses this problem by the fact that they do
not lock the device. Add a quirk to disable device locking for these
drive enclosures.
Acked-by: Alan Stern <stern(a)rowland.harvard.edu>
Signed-off-by: James Buren <braewoods+lkml(a)braewoods.net>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20211014015504.2695089-1-braewoods+lkml@braewoodsβ¦
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/usb/storage/unusual_devs.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index c6b3fcf90180..29191d33c0e3 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -406,6 +406,16 @@ UNUSUAL_DEV( 0x04b8, 0x0602, 0x0110, 0x0110,
"785EPX Storage",
USB_SC_SCSI, USB_PR_BULK, NULL, US_FL_SINGLE_LUN),
+/*
+ * Reported by James Buren <braewoods+lkml(a)braewoods.net>
+ * Virtual ISOs cannot be remounted if ejected while the device is locked
+ * Disable locking to mimic Windows behavior that bypasses the issue
+ */
+UNUSUAL_DEV( 0x04c5, 0x2028, 0x0001, 0x0001,
+ "iODD",
+ "2531/2541",
+ USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE),
+
/*
* Not sure who reported this originally but
* Pavel Machek <pavel(a)ucw.cz> reported that the extra US_FL_SINGLE_LUN
--
2.33.1
The previous commit fixed handling of incomplete packets but broke error
handling: offsetof returns an unsigned value (size_t), but when compared
against the signed return value, the return value is interpreted as if
it were unsigned, so negative return values are never less than the
offset.
Fixes: 22d65765f211 ("HID: u2fzero: ignore incomplete packets without data")
Fixes: 42337b9d4d95 ("HID: add driver for U2F Zero built-in LED and RNG")
Signed-off-by: Andrej Shadura <andrew.shadura(a)collabora.co.uk>
---
drivers/hid/hid-u2fzero.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-u2fzero.c b/drivers/hid/hid-u2fzero.c
index d70cd3d7f583..5145d758bea0 100644
--- a/drivers/hid/hid-u2fzero.c
+++ b/drivers/hid/hid-u2fzero.c
@@ -200,7 +200,7 @@ static int u2fzero_rng_read(struct hwrng *rng, void *data,
ret = u2fzero_recv(dev, &req, &resp);
/* ignore errors or packets without data */
- if (ret < offsetof(struct u2f_hid_msg, init.data))
+ if (ret < 0 || ret < offsetof(struct u2f_hid_msg, init.data))
return 0;
/* only take the minimum amount of data it is safe to take */
--
2.33.0
Following build errors noticed while building Linux stable rc queue
with gcc-11 for arm and arm64 architecture.
- 5.4.154 gcc-11 arm FAILED
- 5.4.154 gcc-11 arm64 FAILED
- 4.19.212 gcc-11 arm FAILED
- 4.19.212 gcc-11 arm64 FAILED
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:1058:31: error:
'mdp5_crtc_get_vblank_counter' undeclared here (not in a function);
did you mean 'mdp5_crtc_vblank_on'?
1058 | .get_vblank_counter = mdp5_crtc_get_vblank_counter,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| mdp5_crtc_vblank_on
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:1059:27: error:
'msm_crtc_enable_vblank' undeclared here (not in a function); did you
mean 'drm_crtc_handle_vblank'?
1059 | .enable_vblank = msm_crtc_enable_vblank,
| ^~~~~~~~~~~~~~~~~~~~~~
| drm_crtc_handle_vblank
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:1060:27: error:
'msm_crtc_disable_vblank' undeclared here (not in a function); did you
mean 'mdp5_disable_vblank'?
1060 | .disable_vblank = msm_crtc_disable_vblank,
| ^~~~~~~~~~~~~~~~~~~~~~~
| mdp5_disable_vblank
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:1061:10: error: 'const
struct drm_crtc_funcs' has no member named 'get_vblank_timestamp'
1061 | .get_vblank_timestamp =
drm_crtc_vblank_helper_get_vblank_timestamp,
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:1061:33: error:
'drm_crtc_vblank_helper_get_vblank_timestamp' undeclared here (not in
a function)
1061 | .get_vblank_timestamp =
drm_crtc_vblank_helper_get_vblank_timestamp,
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:1061:33: warning: excess
elements in struct initializer
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c:1061:33: note: (near
initialization for 'mdp5_crtc_no_lm_cursor_funcs')
make[5]: *** [scripts/Makefile.build:262:
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.o] Error 1
make[5]: Target '__build' not remade because of errors.
make[4]: *** [scripts/Makefile.build:497: drivers/gpu/drm/msm] Error 2
make[4]: Target '__build' not remade because of errors.
make[3]: *** [scripts/Makefile.build:497: drivers/gpu/drm] Error 2
make[3]: Target '__build' not remade because of errors.
make[2]: *** [scripts/Makefile.build:497: drivers/gpu] Error 2
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1734: drivers] Error 2
make[1]: Target '_all' not remade because of errors.
make: *** [Makefile:179: sub-make] Error 2
Build config:
https://builds.tuxbuild.com/1zgK0LewhdaH7jb2PYiEaTFPgT9/config
Reported-by: Linux Kernel Functional Testing <lkft(a)linaro.org>
steps to reproduce:
https://builds.tuxbuild.com/1zgK0LewhdaH7jb2PYiEaTFPgT9/tuxmake_reproducer.β¦
--
Linaro LKFT
https://lkft.linaro.org
From: Roman Li <Roman.Li(a)amd.com>
[Why]
On renoir usb-c port stops functioning on resume after f/w update.
New dmub firmware caused regression due to conflict with dmcu.
With new dmub f/w dmcu is superseded and should be disabled.
[How]
- Disable dmcu for all dcn21.
Check dmesg for dmub f/w version.
The old firmware (before regression):
[drm] DMUB hardware initialized: version=0x00000001
All other versions require that patch for renoir.
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1735
Cc: stable(a)vger.kernel.org
Signed-off-by: Roman Li <Roman.Li(a)amd.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index ff54550..e56f73e 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1356,8 +1356,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
switch (adev->ip_versions[DCE_HWIP][0]) {
case IP_VERSION(2, 1, 0):
init_data.flags.gpu_vm_support = true;
- if (ASICREV_IS_GREEN_SARDINE(adev->external_rev_id))
- init_data.flags.disable_dmcu = true;
+ init_data.flags.disable_dmcu = true;
break;
case IP_VERSION(1, 0, 0):
case IP_VERSION(1, 0, 1):
--
2.7.4
mv88e6xxx_port_ppu_updates() interpretes data in the PORT_STS
register incorrectly for internal ports (ie no PPU). In these
cases, the PHY_DETECT bit indicates link status. This results
in forcing the MAC state whenever the PHY link goes down which
is not intended. As a side effect, LED's configured to show
link status stay lit even though the physical link is down.
Add a check in mac_link_down and mac_link_up to see if it
concerns an external port and only then, look at PPU status.
Difference from upstream commit:
ops->port_sync_link() renamed to ops->port_set_link()
Fixes: 5d5b231da7ac (net: dsa: mv88e6xxx: use PHY_DETECT in mac_link_up/mac_link_down)
Cc: <stable(a)vger.kernel.org> # 5.10
Signed-off-by: Maarten Zanders <maarten.zanders(a)mind.be>
---
drivers/net/dsa/mv88e6xxx/chip.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 18388ea5ebd9..afc5500ef8ed 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -726,7 +726,11 @@ static void mv88e6xxx_mac_link_down(struct dsa_switch *ds, int port,
ops = chip->info->ops;
mv88e6xxx_reg_lock(chip);
- if ((!mv88e6xxx_port_ppu_updates(chip, port) ||
+ /* Internal PHYs propagate their configuration directly to the MAC.
+ * External PHYs depend on whether the PPU is enabled for this port.
+ */
+ if (((!mv88e6xxx_phy_is_internal(ds, port) &&
+ !mv88e6xxx_port_ppu_updates(chip, port)) ||
mode == MLO_AN_FIXED) && ops->port_set_link)
err = ops->port_set_link(chip, port, LINK_FORCED_DOWN);
mv88e6xxx_reg_unlock(chip);
@@ -749,7 +753,12 @@ static void mv88e6xxx_mac_link_up(struct dsa_switch *ds, int port,
ops = chip->info->ops;
mv88e6xxx_reg_lock(chip);
- if (!mv88e6xxx_port_ppu_updates(chip, port) || mode == MLO_AN_FIXED) {
+ /* Internal PHYs propagate their configuration directly to the MAC.
+ * External PHYs depend on whether the PPU is enabled for this port.
+ */
+ if ((!mv88e6xxx_phy_is_internal(ds, port) &&
+ !mv88e6xxx_port_ppu_updates(chip, port)) ||
+ mode == MLO_AN_FIXED) {
/* FIXME: for an automedia port, should we force the link
* down here - what if the link comes up due to "other" media
* while we're bringing the port up, how is the exclusivity
--
2.25.1
On the 88W8897 PCIe+USB card the firmware randomly crashes after setting
the TX ring write pointer. The issue is present in the latest firmware
version 15.68.19.p21 of the PCIe+USB card.
Those firmware crashes can be worked around by reading any PCI register
of the card after setting that register, so read the PCI_VENDOR_ID
register here. The reason this works is probably because we keep the bus
from entering an ASPM state for a bit longer, because that's what causes
the cards firmware to crash.
This fixes a bug where during RX/TX traffic and with ASPM L1 substates
enabled (the specific substates where the issue happens appear to be
platform dependent), the firmware crashes and eventually a command
timeout appears in the logs.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=109681
Cc: stable(a)vger.kernel.org
Signed-off-by: Jonas DreΓler <verdre(a)v0yd.nl>
---
drivers/net/wireless/marvell/mwifiex/pcie.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
index c6ccce426b49..641fa539de1f 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
@@ -1490,6 +1490,14 @@ mwifiex_pcie_send_data(struct mwifiex_adapter *adapter, struct sk_buff *skb,
ret = -1;
goto done_unmap;
}
+
+ /* The firmware (latest version 15.68.19.p21) of the 88W8897 PCIe+USB card
+ * seems to crash randomly after setting the TX ring write pointer when
+ * ASPM powersaving is enabled. A workaround seems to be keeping the bus
+ * busy by reading a random register afterwards.
+ */
+ mwifiex_read_reg(adapter, PCI_VENDOR_ID, &rx_val);
+
if ((mwifiex_pcie_txbd_not_full(card)) &&
tx_param->next_pkt_len) {
/* have more packets and TxBD still can hold more */
--
2.31.1
The patch below does not apply to the 5.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 43ba33b4f143965a451cfdc1e826b61f6933c887 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Date: Tue, 12 Oct 2021 14:40:43 +0300
Subject: [PATCH] net: dsa: tag_ocelot_8021q: fix inability to inject STP BPDUs
into BLOCKING ports
When setting up a bridge with stp_state 1, topology changes are not
detected and loops are not blocked. This is because the standard way of
transmitting a packet, based on VLAN IDs redirected by VCAP IS2 to the
right egress port, does not override the port STP state (in the case of
Ocelot switches, that's really the PGID_SRC masks).
To force a packet to be injected into a port that's BLOCKING, we must
send it as a control packet, which means in the case of this tagger to
send it using the manual register injection method. We already do this
for PTP frames, extend the logic to apply to any link-local MAC DA.
Fixes: 7c83a7c539ab ("net: dsa: add a second tagger for Ocelot switches based on tag_8021q")
Signed-off-by: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli(a)gmail.com>
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
diff --git a/net/dsa/tag_ocelot_8021q.c b/net/dsa/tag_ocelot_8021q.c
index d05c352f96e5..3412051981d7 100644
--- a/net/dsa/tag_ocelot_8021q.c
+++ b/net/dsa/tag_ocelot_8021q.c
@@ -42,8 +42,9 @@ static struct sk_buff *ocelot_xmit(struct sk_buff *skb,
u16 tx_vid = dsa_8021q_tx_vid(dp->ds, dp->index);
u16 queue_mapping = skb_get_queue_mapping(skb);
u8 pcp = netdev_txq_to_tc(netdev, queue_mapping);
+ struct ethhdr *hdr = eth_hdr(skb);
- if (ocelot_ptp_rew_op(skb))
+ if (ocelot_ptp_rew_op(skb) || is_link_local_ether_addr(hdr->h_dest))
return ocelot_defer_xmit(dp, skb);
return dsa_8021q_xmit(skb, netdev, ETH_P_8021Q,
The patch below does not apply to the 5.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 1328a883258b4507909090ed0a9ad63771f9f780 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Date: Tue, 12 Oct 2021 14:40:42 +0300
Subject: [PATCH] net: dsa: felix: purge skb from TX timestamping queue if it
cannot be sent
At present, when a PTP packet which requires TX timestamping gets
dropped under congestion by the switch, things go downhill very fast.
The driver keeps a clone of that skb in a queue of packets awaiting TX
timestamp interrupts, but interrupts will never be raised for the
dropped packets.
Moreover, matching timestamped packets to timestamps is done by a 2-bit
timestamp ID, and this can wrap around and we can match on the wrong skb.
Since with the default NPI-based tagging protocol, we get no notification
about packet drops, the best we can do is eventually recover from the
drop of a PTP frame: its skb will be dead memory until another skb which
was assigned the same timestamp ID happens to find it.
However, with the ocelot-8021q tagger which injects packets using the
manual register interface, it appears that we can check for more
information, such as:
- whether the input queue has reached the high watermark or not
- whether the injection group's FIFO can accept additional data or not
so we know that a PTP frame is likely to get dropped before actually
sending it, and drop it ourselves (because DSA uses NETIF_F_LLTX, so it
can't return NETDEV_TX_BUSY to ask the qdisc to requeue the packet).
But when we do that, we can also remove the skb from the timestamping
queue, because there surely won't be any timestamp that matches it.
Fixes: 0a6f17c6ae21 ("net: dsa: tag_ocelot_8021q: add support for PTP timestamping")
Signed-off-by: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
index f8603e068e7c..9af8f900aa56 100644
--- a/drivers/net/dsa/ocelot/felix.c
+++ b/drivers/net/dsa/ocelot/felix.c
@@ -1074,6 +1074,33 @@ static int felix_init_structs(struct felix *felix, int num_phys_ports)
return 0;
}
+static void ocelot_port_purge_txtstamp_skb(struct ocelot *ocelot, int port,
+ struct sk_buff *skb)
+{
+ struct ocelot_port *ocelot_port = ocelot->ports[port];
+ struct sk_buff *clone = OCELOT_SKB_CB(skb)->clone;
+ struct sk_buff *skb_match = NULL, *skb_tmp;
+ unsigned long flags;
+
+ if (!clone)
+ return;
+
+ spin_lock_irqsave(&ocelot_port->tx_skbs.lock, flags);
+
+ skb_queue_walk_safe(&ocelot_port->tx_skbs, skb, skb_tmp) {
+ if (skb != clone)
+ continue;
+ __skb_unlink(skb, &ocelot_port->tx_skbs);
+ skb_match = skb;
+ break;
+ }
+
+ spin_unlock_irqrestore(&ocelot_port->tx_skbs.lock, flags);
+
+ WARN_ONCE(!skb_match,
+ "Could not find skb clone in TX timestamping list\n");
+}
+
#define work_to_xmit_work(w) \
container_of((w), struct felix_deferred_xmit_work, work)
@@ -1097,6 +1124,7 @@ static void felix_port_deferred_xmit(struct kthread_work *work)
if (!retries) {
dev_err(ocelot->dev, "port %d failed to inject skb\n",
port);
+ ocelot_port_purge_txtstamp_skb(ocelot, port, skb);
kfree_skb(skb);
return;
}
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From ebb4c6a990f786d7e0e4618a0d3766cd660125d8 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Date: Tue, 12 Oct 2021 14:40:39 +0300
Subject: [PATCH] net: mscc: ocelot: cross-check the sequence id from the
timestamp FIFO with the skb PTP header
The sad reality is that when a PTP frame with a TX timestamping request
is transmitted, it isn't guaranteed that it will make it all the way to
the wire (due to congestion inside the switch), and that a timestamp
will be taken by the hardware and placed in the timestamp FIFO where an
IRQ will be raised for it.
The implication is that if enough PTP frames are silently dropped by the
hardware such that the timestamp ID has rolled over, it is possible to
match a timestamp to an old skb.
Furthermore, nobody will match on the real skb corresponding to this
timestamp, since we stupidly matched on a previous one that was stale in
the queue, and stopped there.
So PTP timestamping will be broken and there will be no way to recover.
It looks like the hardware parses the sequenceID from the PTP header,
and also provides that metadata for each timestamp. The driver currently
ignores this, but it shouldn't.
As an extra resiliency measure, do the following:
- check whether the PTP sequenceID also matches between the skb and the
timestamp, treat the skb as stale otherwise and free it
- if we see a stale skb, don't stop there and try to match an skb one
more time, chances are there's one more skb in the queue with the same
timestamp ID, otherwise we wouldn't have ever found the stale one (it
is by timestamp ID that we matched it).
While this does not prevent PTP packet drops, it at least prevents
the catastrophic consequences of incorrect timestamp matching.
Since we already call ptp_classify_raw in the TX path, save the result
in the skb->cb of the clone, and just use that result in the interrupt
code path.
Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support")
Signed-off-by: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index 3b1f0bb6a414..f0044329e3d7 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -675,6 +675,7 @@ int ocelot_port_txtstamp_request(struct ocelot *ocelot, int port,
return err;
OCELOT_SKB_CB(skb)->ptp_cmd = ptp_cmd;
+ OCELOT_SKB_CB(*clone)->ptp_class = ptp_class;
}
return 0;
@@ -708,6 +709,17 @@ static void ocelot_get_hwtimestamp(struct ocelot *ocelot,
spin_unlock_irqrestore(&ocelot->ptp_clock_lock, flags);
}
+static bool ocelot_validate_ptp_skb(struct sk_buff *clone, u16 seqid)
+{
+ struct ptp_header *hdr;
+
+ hdr = ptp_parse_header(clone, OCELOT_SKB_CB(clone)->ptp_class);
+ if (WARN_ON(!hdr))
+ return false;
+
+ return seqid == ntohs(hdr->sequence_id);
+}
+
void ocelot_get_txtstamp(struct ocelot *ocelot)
{
int budget = OCELOT_PTP_QUEUE_SZ;
@@ -715,10 +727,10 @@ void ocelot_get_txtstamp(struct ocelot *ocelot)
while (budget--) {
struct sk_buff *skb, *skb_tmp, *skb_match = NULL;
struct skb_shared_hwtstamps shhwtstamps;
+ u32 val, id, seqid, txport;
struct ocelot_port *port;
struct timespec64 ts;
unsigned long flags;
- u32 val, id, txport;
val = ocelot_read(ocelot, SYS_PTP_STATUS);
@@ -731,6 +743,7 @@ void ocelot_get_txtstamp(struct ocelot *ocelot)
/* Retrieve the ts ID and Tx port */
id = SYS_PTP_STATUS_PTP_MESS_ID_X(val);
txport = SYS_PTP_STATUS_PTP_MESS_TXPORT_X(val);
+ seqid = SYS_PTP_STATUS_PTP_MESS_SEQ_ID(val);
port = ocelot->ports[txport];
@@ -740,6 +753,7 @@ void ocelot_get_txtstamp(struct ocelot *ocelot)
spin_unlock(&ocelot->ts_id_lock);
/* Retrieve its associated skb */
+try_again:
spin_lock_irqsave(&port->tx_skbs.lock, flags);
skb_queue_walk_safe(&port->tx_skbs, skb, skb_tmp) {
@@ -755,6 +769,14 @@ void ocelot_get_txtstamp(struct ocelot *ocelot)
if (WARN_ON(!skb_match))
continue;
+ if (!ocelot_validate_ptp_skb(skb_match, seqid)) {
+ dev_err_ratelimited(ocelot->dev,
+ "port %d received stale TX timestamp for seqid %d, discarding\n",
+ txport, seqid);
+ dev_kfree_skb_any(skb);
+ goto try_again;
+ }
+
/* Get the h/w timestamp */
ocelot_get_hwtimestamp(ocelot, &ts);
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h
index b0ece85d9a76..cabacef8731c 100644
--- a/include/soc/mscc/ocelot.h
+++ b/include/soc/mscc/ocelot.h
@@ -697,6 +697,7 @@ struct ocelot_policer {
struct ocelot_skb_cb {
struct sk_buff *clone;
+ unsigned int ptp_class; /* valid only for clones */
u8 ptp_cmd;
u8 ts_id;
};
The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From ebb4c6a990f786d7e0e4618a0d3766cd660125d8 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Date: Tue, 12 Oct 2021 14:40:39 +0300
Subject: [PATCH] net: mscc: ocelot: cross-check the sequence id from the
timestamp FIFO with the skb PTP header
The sad reality is that when a PTP frame with a TX timestamping request
is transmitted, it isn't guaranteed that it will make it all the way to
the wire (due to congestion inside the switch), and that a timestamp
will be taken by the hardware and placed in the timestamp FIFO where an
IRQ will be raised for it.
The implication is that if enough PTP frames are silently dropped by the
hardware such that the timestamp ID has rolled over, it is possible to
match a timestamp to an old skb.
Furthermore, nobody will match on the real skb corresponding to this
timestamp, since we stupidly matched on a previous one that was stale in
the queue, and stopped there.
So PTP timestamping will be broken and there will be no way to recover.
It looks like the hardware parses the sequenceID from the PTP header,
and also provides that metadata for each timestamp. The driver currently
ignores this, but it shouldn't.
As an extra resiliency measure, do the following:
- check whether the PTP sequenceID also matches between the skb and the
timestamp, treat the skb as stale otherwise and free it
- if we see a stale skb, don't stop there and try to match an skb one
more time, chances are there's one more skb in the queue with the same
timestamp ID, otherwise we wouldn't have ever found the stale one (it
is by timestamp ID that we matched it).
While this does not prevent PTP packet drops, it at least prevents
the catastrophic consequences of incorrect timestamp matching.
Since we already call ptp_classify_raw in the TX path, save the result
in the skb->cb of the clone, and just use that result in the interrupt
code path.
Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support")
Signed-off-by: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index 3b1f0bb6a414..f0044329e3d7 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -675,6 +675,7 @@ int ocelot_port_txtstamp_request(struct ocelot *ocelot, int port,
return err;
OCELOT_SKB_CB(skb)->ptp_cmd = ptp_cmd;
+ OCELOT_SKB_CB(*clone)->ptp_class = ptp_class;
}
return 0;
@@ -708,6 +709,17 @@ static void ocelot_get_hwtimestamp(struct ocelot *ocelot,
spin_unlock_irqrestore(&ocelot->ptp_clock_lock, flags);
}
+static bool ocelot_validate_ptp_skb(struct sk_buff *clone, u16 seqid)
+{
+ struct ptp_header *hdr;
+
+ hdr = ptp_parse_header(clone, OCELOT_SKB_CB(clone)->ptp_class);
+ if (WARN_ON(!hdr))
+ return false;
+
+ return seqid == ntohs(hdr->sequence_id);
+}
+
void ocelot_get_txtstamp(struct ocelot *ocelot)
{
int budget = OCELOT_PTP_QUEUE_SZ;
@@ -715,10 +727,10 @@ void ocelot_get_txtstamp(struct ocelot *ocelot)
while (budget--) {
struct sk_buff *skb, *skb_tmp, *skb_match = NULL;
struct skb_shared_hwtstamps shhwtstamps;
+ u32 val, id, seqid, txport;
struct ocelot_port *port;
struct timespec64 ts;
unsigned long flags;
- u32 val, id, txport;
val = ocelot_read(ocelot, SYS_PTP_STATUS);
@@ -731,6 +743,7 @@ void ocelot_get_txtstamp(struct ocelot *ocelot)
/* Retrieve the ts ID and Tx port */
id = SYS_PTP_STATUS_PTP_MESS_ID_X(val);
txport = SYS_PTP_STATUS_PTP_MESS_TXPORT_X(val);
+ seqid = SYS_PTP_STATUS_PTP_MESS_SEQ_ID(val);
port = ocelot->ports[txport];
@@ -740,6 +753,7 @@ void ocelot_get_txtstamp(struct ocelot *ocelot)
spin_unlock(&ocelot->ts_id_lock);
/* Retrieve its associated skb */
+try_again:
spin_lock_irqsave(&port->tx_skbs.lock, flags);
skb_queue_walk_safe(&port->tx_skbs, skb, skb_tmp) {
@@ -755,6 +769,14 @@ void ocelot_get_txtstamp(struct ocelot *ocelot)
if (WARN_ON(!skb_match))
continue;
+ if (!ocelot_validate_ptp_skb(skb_match, seqid)) {
+ dev_err_ratelimited(ocelot->dev,
+ "port %d received stale TX timestamp for seqid %d, discarding\n",
+ txport, seqid);
+ dev_kfree_skb_any(skb);
+ goto try_again;
+ }
+
/* Get the h/w timestamp */
ocelot_get_hwtimestamp(ocelot, &ts);
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h
index b0ece85d9a76..cabacef8731c 100644
--- a/include/soc/mscc/ocelot.h
+++ b/include/soc/mscc/ocelot.h
@@ -697,6 +697,7 @@ struct ocelot_policer {
struct ocelot_skb_cb {
struct sk_buff *clone;
+ unsigned int ptp_class; /* valid only for clones */
u8 ptp_cmd;
u8 ts_id;
};
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From fba01283d85a09e0e2ef552c6e764b903111d90a Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Date: Tue, 12 Oct 2021 14:40:38 +0300
Subject: [PATCH] net: mscc: ocelot: deny TX timestamping of non-PTP packets
It appears that Ocelot switches cannot timestamp non-PTP frames,
I tested this using the isochron program at:
https://github.com/vladimiroltean/tsn-scripts
with the result that the driver increments the ocelot_port->ts_id
counter as expected, puts it in the REW_OP, but the hardware seems to
not timestamp these packets at all, since no IRQ is emitted.
Therefore check whether we are sending PTP frames, and refuse to
populate REW_OP otherwise.
Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support")
Signed-off-by: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index 687c07c338cd..3b1f0bb6a414 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -618,16 +618,12 @@ u32 ocelot_ptp_rew_op(struct sk_buff *skb)
}
EXPORT_SYMBOL(ocelot_ptp_rew_op);
-static bool ocelot_ptp_is_onestep_sync(struct sk_buff *skb)
+static bool ocelot_ptp_is_onestep_sync(struct sk_buff *skb,
+ unsigned int ptp_class)
{
struct ptp_header *hdr;
- unsigned int ptp_class;
u8 msgtype, twostep;
- ptp_class = ptp_classify_raw(skb);
- if (ptp_class == PTP_CLASS_NONE)
- return false;
-
hdr = ptp_parse_header(skb, ptp_class);
if (!hdr)
return false;
@@ -647,11 +643,20 @@ int ocelot_port_txtstamp_request(struct ocelot *ocelot, int port,
{
struct ocelot_port *ocelot_port = ocelot->ports[port];
u8 ptp_cmd = ocelot_port->ptp_cmd;
+ unsigned int ptp_class;
int err;
+ /* Don't do anything if PTP timestamping not enabled */
+ if (!ptp_cmd)
+ return 0;
+
+ ptp_class = ptp_classify_raw(skb);
+ if (ptp_class == PTP_CLASS_NONE)
+ return -EINVAL;
+
/* Store ptp_cmd in OCELOT_SKB_CB(skb)->ptp_cmd */
if (ptp_cmd == IFH_REW_OP_ORIGIN_PTP) {
- if (ocelot_ptp_is_onestep_sync(skb)) {
+ if (ocelot_ptp_is_onestep_sync(skb, ptp_class)) {
OCELOT_SKB_CB(skb)->ptp_cmd = ptp_cmd;
return 0;
}
The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From fba01283d85a09e0e2ef552c6e764b903111d90a Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Date: Tue, 12 Oct 2021 14:40:38 +0300
Subject: [PATCH] net: mscc: ocelot: deny TX timestamping of non-PTP packets
It appears that Ocelot switches cannot timestamp non-PTP frames,
I tested this using the isochron program at:
https://github.com/vladimiroltean/tsn-scripts
with the result that the driver increments the ocelot_port->ts_id
counter as expected, puts it in the REW_OP, but the hardware seems to
not timestamp these packets at all, since no IRQ is emitted.
Therefore check whether we are sending PTP frames, and refuse to
populate REW_OP otherwise.
Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support")
Signed-off-by: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index 687c07c338cd..3b1f0bb6a414 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -618,16 +618,12 @@ u32 ocelot_ptp_rew_op(struct sk_buff *skb)
}
EXPORT_SYMBOL(ocelot_ptp_rew_op);
-static bool ocelot_ptp_is_onestep_sync(struct sk_buff *skb)
+static bool ocelot_ptp_is_onestep_sync(struct sk_buff *skb,
+ unsigned int ptp_class)
{
struct ptp_header *hdr;
- unsigned int ptp_class;
u8 msgtype, twostep;
- ptp_class = ptp_classify_raw(skb);
- if (ptp_class == PTP_CLASS_NONE)
- return false;
-
hdr = ptp_parse_header(skb, ptp_class);
if (!hdr)
return false;
@@ -647,11 +643,20 @@ int ocelot_port_txtstamp_request(struct ocelot *ocelot, int port,
{
struct ocelot_port *ocelot_port = ocelot->ports[port];
u8 ptp_cmd = ocelot_port->ptp_cmd;
+ unsigned int ptp_class;
int err;
+ /* Don't do anything if PTP timestamping not enabled */
+ if (!ptp_cmd)
+ return 0;
+
+ ptp_class = ptp_classify_raw(skb);
+ if (ptp_class == PTP_CLASS_NONE)
+ return -EINVAL;
+
/* Store ptp_cmd in OCELOT_SKB_CB(skb)->ptp_cmd */
if (ptp_cmd == IFH_REW_OP_ORIGIN_PTP) {
- if (ocelot_ptp_is_onestep_sync(skb)) {
+ if (ocelot_ptp_is_onestep_sync(skb, ptp_class)) {
OCELOT_SKB_CB(skb)->ptp_cmd = ptp_cmd;
return 0;
}
The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 9fde506e0c53b8309f69b18b4b8144c544b4b3b1 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Date: Tue, 12 Oct 2021 14:40:37 +0300
Subject: [PATCH] net: mscc: ocelot: warn when a PTP IRQ is raised for an
unknown skb
When skb_match is NULL, it means we received a PTP IRQ for a timestamp
ID that the kernel has no idea about, since there is no skb in the
timestamping queue with that timestamp ID.
This is a grave error and not something to just "continue" over.
So print a big warning in case this happens.
Also, move the check above ocelot_get_hwtimestamp(), there is no point
in reading the full 64-bit current PTP time if we're not going to do
anything with it anyway for this skb.
Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support")
Signed-off-by: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli(a)gmail.com>
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index 9c62f1d13adc..687c07c338cd 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -747,12 +747,12 @@ void ocelot_get_txtstamp(struct ocelot *ocelot)
spin_unlock_irqrestore(&port->tx_skbs.lock, flags);
+ if (WARN_ON(!skb_match))
+ continue;
+
/* Get the h/w timestamp */
ocelot_get_hwtimestamp(ocelot, &ts);
- if (unlikely(!skb_match))
- continue;
-
/* Set the timestamp into the skb */
memset(&shhwtstamps, 0, sizeof(shhwtstamps));
shhwtstamps.hwtstamp = ktime_set(ts.tv_sec, ts.tv_nsec);
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 52849bcf0029ccc553be304e4f804938a39112e2 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Date: Tue, 12 Oct 2021 14:40:36 +0300
Subject: [PATCH] net: mscc: ocelot: avoid overflowing the PTP timestamp FIFO
PTP packets with 2-step TX timestamp requests are matched to packets
based on the egress port number and a 6-bit timestamp identifier.
All PTP timestamps are held in a common FIFO that is 128 entry deep.
This patch ensures that back-to-back timestamping requests cannot exceed
the hardware FIFO capacity. If that happens, simply send the packets
without requesting a TX timestamp to be taken (in the case of felix,
since the DSA API has a void return code in ds->ops->port_txtstamp) or
drop them (in the case of ocelot).
I've moved the ts_id_lock from a per-port basis to a per-switch basis,
because we need separate accounting for both numbers of PTP frames in
flight. And since we need locking to inc/dec the per-switch counter,
that also offers protection for the per-port counter and hence there is
no reason to have a per-port counter anymore.
Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support")
Signed-off-by: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
index a3a9636430d6..50ef20724958 100644
--- a/drivers/net/dsa/ocelot/felix.c
+++ b/drivers/net/dsa/ocelot/felix.c
@@ -1291,8 +1291,12 @@ static void felix_txtstamp(struct dsa_switch *ds, int port,
if (!ocelot->ptp)
return;
- if (ocelot_port_txtstamp_request(ocelot, port, skb, &clone))
+ if (ocelot_port_txtstamp_request(ocelot, port, skb, &clone)) {
+ dev_err_ratelimited(ds->dev,
+ "port %d delivering skb without TX timestamp\n",
+ port);
return;
+ }
if (clone)
OCELOT_SKB_CB(skb)->clone = clone;
diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index c43c8f53faaf..9c62f1d13adc 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -569,22 +569,36 @@ void ocelot_phylink_mac_link_up(struct ocelot *ocelot, int port,
}
EXPORT_SYMBOL_GPL(ocelot_phylink_mac_link_up);
-static void ocelot_port_add_txtstamp_skb(struct ocelot *ocelot, int port,
- struct sk_buff *clone)
+static int ocelot_port_add_txtstamp_skb(struct ocelot *ocelot, int port,
+ struct sk_buff *clone)
{
struct ocelot_port *ocelot_port = ocelot->ports[port];
+ unsigned long flags;
+
+ spin_lock_irqsave(&ocelot->ts_id_lock, flags);
- spin_lock(&ocelot_port->ts_id_lock);
+ if (ocelot_port->ptp_skbs_in_flight == OCELOT_MAX_PTP_ID ||
+ ocelot->ptp_skbs_in_flight == OCELOT_PTP_FIFO_SIZE) {
+ spin_unlock_irqrestore(&ocelot->ts_id_lock, flags);
+ return -EBUSY;
+ }
skb_shinfo(clone)->tx_flags |= SKBTX_IN_PROGRESS;
/* Store timestamp ID in OCELOT_SKB_CB(clone)->ts_id */
OCELOT_SKB_CB(clone)->ts_id = ocelot_port->ts_id;
+
ocelot_port->ts_id++;
if (ocelot_port->ts_id == OCELOT_MAX_PTP_ID)
ocelot_port->ts_id = 0;
+
+ ocelot_port->ptp_skbs_in_flight++;
+ ocelot->ptp_skbs_in_flight++;
+
skb_queue_tail(&ocelot_port->tx_skbs, clone);
- spin_unlock(&ocelot_port->ts_id_lock);
+ spin_unlock_irqrestore(&ocelot->ts_id_lock, flags);
+
+ return 0;
}
u32 ocelot_ptp_rew_op(struct sk_buff *skb)
@@ -633,6 +647,7 @@ int ocelot_port_txtstamp_request(struct ocelot *ocelot, int port,
{
struct ocelot_port *ocelot_port = ocelot->ports[port];
u8 ptp_cmd = ocelot_port->ptp_cmd;
+ int err;
/* Store ptp_cmd in OCELOT_SKB_CB(skb)->ptp_cmd */
if (ptp_cmd == IFH_REW_OP_ORIGIN_PTP) {
@@ -650,7 +665,10 @@ int ocelot_port_txtstamp_request(struct ocelot *ocelot, int port,
if (!(*clone))
return -ENOMEM;
- ocelot_port_add_txtstamp_skb(ocelot, port, *clone);
+ err = ocelot_port_add_txtstamp_skb(ocelot, port, *clone);
+ if (err)
+ return err;
+
OCELOT_SKB_CB(skb)->ptp_cmd = ptp_cmd;
}
@@ -709,9 +727,14 @@ void ocelot_get_txtstamp(struct ocelot *ocelot)
id = SYS_PTP_STATUS_PTP_MESS_ID_X(val);
txport = SYS_PTP_STATUS_PTP_MESS_TXPORT_X(val);
- /* Retrieve its associated skb */
port = ocelot->ports[txport];
+ spin_lock(&ocelot->ts_id_lock);
+ port->ptp_skbs_in_flight--;
+ ocelot->ptp_skbs_in_flight--;
+ spin_unlock(&ocelot->ts_id_lock);
+
+ /* Retrieve its associated skb */
spin_lock_irqsave(&port->tx_skbs.lock, flags);
skb_queue_walk_safe(&port->tx_skbs, skb, skb_tmp) {
@@ -1950,7 +1973,6 @@ void ocelot_init_port(struct ocelot *ocelot, int port)
struct ocelot_port *ocelot_port = ocelot->ports[port];
skb_queue_head_init(&ocelot_port->tx_skbs);
- spin_lock_init(&ocelot_port->ts_id_lock);
/* Basic L2 initialization */
@@ -2083,6 +2105,7 @@ int ocelot_init(struct ocelot *ocelot)
mutex_init(&ocelot->stats_lock);
mutex_init(&ocelot->ptp_lock);
spin_lock_init(&ocelot->ptp_clock_lock);
+ spin_lock_init(&ocelot->ts_id_lock);
snprintf(queue_name, sizeof(queue_name), "%s-stats",
dev_name(ocelot->dev));
ocelot->stats_queue = create_singlethread_workqueue(queue_name);
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h
index 06706a9fd5b1..b0ece85d9a76 100644
--- a/include/soc/mscc/ocelot.h
+++ b/include/soc/mscc/ocelot.h
@@ -603,10 +603,10 @@ struct ocelot_port {
/* The VLAN ID that will be transmitted as untagged, on egress */
struct ocelot_vlan native_vlan;
+ unsigned int ptp_skbs_in_flight;
u8 ptp_cmd;
struct sk_buff_head tx_skbs;
u8 ts_id;
- spinlock_t ts_id_lock;
phy_interface_t phy_mode;
@@ -680,6 +680,9 @@ struct ocelot {
struct ptp_clock *ptp_clock;
struct ptp_clock_info ptp_info;
struct hwtstamp_config hwtstamp_config;
+ unsigned int ptp_skbs_in_flight;
+ /* Protects the 2-step TX timestamp ID logic */
+ spinlock_t ts_id_lock;
/* Protects the PTP interface state */
struct mutex ptp_lock;
/* Protects the PTP clock */
diff --git a/include/soc/mscc/ocelot_ptp.h b/include/soc/mscc/ocelot_ptp.h
index 6e54442b49ad..f085884b1fa2 100644
--- a/include/soc/mscc/ocelot_ptp.h
+++ b/include/soc/mscc/ocelot_ptp.h
@@ -14,6 +14,7 @@
#include <soc/mscc/ocelot.h>
#define OCELOT_MAX_PTP_ID 63
+#define OCELOT_PTP_FIFO_SIZE 128
#define PTP_PIN_CFG_RSZ 0x20
#define PTP_PIN_TOD_SEC_MSB_RSZ PTP_PIN_CFG_RSZ
The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 52849bcf0029ccc553be304e4f804938a39112e2 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Date: Tue, 12 Oct 2021 14:40:36 +0300
Subject: [PATCH] net: mscc: ocelot: avoid overflowing the PTP timestamp FIFO
PTP packets with 2-step TX timestamp requests are matched to packets
based on the egress port number and a 6-bit timestamp identifier.
All PTP timestamps are held in a common FIFO that is 128 entry deep.
This patch ensures that back-to-back timestamping requests cannot exceed
the hardware FIFO capacity. If that happens, simply send the packets
without requesting a TX timestamp to be taken (in the case of felix,
since the DSA API has a void return code in ds->ops->port_txtstamp) or
drop them (in the case of ocelot).
I've moved the ts_id_lock from a per-port basis to a per-switch basis,
because we need separate accounting for both numbers of PTP frames in
flight. And since we need locking to inc/dec the per-switch counter,
that also offers protection for the per-port counter and hence there is
no reason to have a per-port counter anymore.
Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support")
Signed-off-by: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
index a3a9636430d6..50ef20724958 100644
--- a/drivers/net/dsa/ocelot/felix.c
+++ b/drivers/net/dsa/ocelot/felix.c
@@ -1291,8 +1291,12 @@ static void felix_txtstamp(struct dsa_switch *ds, int port,
if (!ocelot->ptp)
return;
- if (ocelot_port_txtstamp_request(ocelot, port, skb, &clone))
+ if (ocelot_port_txtstamp_request(ocelot, port, skb, &clone)) {
+ dev_err_ratelimited(ds->dev,
+ "port %d delivering skb without TX timestamp\n",
+ port);
return;
+ }
if (clone)
OCELOT_SKB_CB(skb)->clone = clone;
diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index c43c8f53faaf..9c62f1d13adc 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -569,22 +569,36 @@ void ocelot_phylink_mac_link_up(struct ocelot *ocelot, int port,
}
EXPORT_SYMBOL_GPL(ocelot_phylink_mac_link_up);
-static void ocelot_port_add_txtstamp_skb(struct ocelot *ocelot, int port,
- struct sk_buff *clone)
+static int ocelot_port_add_txtstamp_skb(struct ocelot *ocelot, int port,
+ struct sk_buff *clone)
{
struct ocelot_port *ocelot_port = ocelot->ports[port];
+ unsigned long flags;
+
+ spin_lock_irqsave(&ocelot->ts_id_lock, flags);
- spin_lock(&ocelot_port->ts_id_lock);
+ if (ocelot_port->ptp_skbs_in_flight == OCELOT_MAX_PTP_ID ||
+ ocelot->ptp_skbs_in_flight == OCELOT_PTP_FIFO_SIZE) {
+ spin_unlock_irqrestore(&ocelot->ts_id_lock, flags);
+ return -EBUSY;
+ }
skb_shinfo(clone)->tx_flags |= SKBTX_IN_PROGRESS;
/* Store timestamp ID in OCELOT_SKB_CB(clone)->ts_id */
OCELOT_SKB_CB(clone)->ts_id = ocelot_port->ts_id;
+
ocelot_port->ts_id++;
if (ocelot_port->ts_id == OCELOT_MAX_PTP_ID)
ocelot_port->ts_id = 0;
+
+ ocelot_port->ptp_skbs_in_flight++;
+ ocelot->ptp_skbs_in_flight++;
+
skb_queue_tail(&ocelot_port->tx_skbs, clone);
- spin_unlock(&ocelot_port->ts_id_lock);
+ spin_unlock_irqrestore(&ocelot->ts_id_lock, flags);
+
+ return 0;
}
u32 ocelot_ptp_rew_op(struct sk_buff *skb)
@@ -633,6 +647,7 @@ int ocelot_port_txtstamp_request(struct ocelot *ocelot, int port,
{
struct ocelot_port *ocelot_port = ocelot->ports[port];
u8 ptp_cmd = ocelot_port->ptp_cmd;
+ int err;
/* Store ptp_cmd in OCELOT_SKB_CB(skb)->ptp_cmd */
if (ptp_cmd == IFH_REW_OP_ORIGIN_PTP) {
@@ -650,7 +665,10 @@ int ocelot_port_txtstamp_request(struct ocelot *ocelot, int port,
if (!(*clone))
return -ENOMEM;
- ocelot_port_add_txtstamp_skb(ocelot, port, *clone);
+ err = ocelot_port_add_txtstamp_skb(ocelot, port, *clone);
+ if (err)
+ return err;
+
OCELOT_SKB_CB(skb)->ptp_cmd = ptp_cmd;
}
@@ -709,9 +727,14 @@ void ocelot_get_txtstamp(struct ocelot *ocelot)
id = SYS_PTP_STATUS_PTP_MESS_ID_X(val);
txport = SYS_PTP_STATUS_PTP_MESS_TXPORT_X(val);
- /* Retrieve its associated skb */
port = ocelot->ports[txport];
+ spin_lock(&ocelot->ts_id_lock);
+ port->ptp_skbs_in_flight--;
+ ocelot->ptp_skbs_in_flight--;
+ spin_unlock(&ocelot->ts_id_lock);
+
+ /* Retrieve its associated skb */
spin_lock_irqsave(&port->tx_skbs.lock, flags);
skb_queue_walk_safe(&port->tx_skbs, skb, skb_tmp) {
@@ -1950,7 +1973,6 @@ void ocelot_init_port(struct ocelot *ocelot, int port)
struct ocelot_port *ocelot_port = ocelot->ports[port];
skb_queue_head_init(&ocelot_port->tx_skbs);
- spin_lock_init(&ocelot_port->ts_id_lock);
/* Basic L2 initialization */
@@ -2083,6 +2105,7 @@ int ocelot_init(struct ocelot *ocelot)
mutex_init(&ocelot->stats_lock);
mutex_init(&ocelot->ptp_lock);
spin_lock_init(&ocelot->ptp_clock_lock);
+ spin_lock_init(&ocelot->ts_id_lock);
snprintf(queue_name, sizeof(queue_name), "%s-stats",
dev_name(ocelot->dev));
ocelot->stats_queue = create_singlethread_workqueue(queue_name);
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h
index 06706a9fd5b1..b0ece85d9a76 100644
--- a/include/soc/mscc/ocelot.h
+++ b/include/soc/mscc/ocelot.h
@@ -603,10 +603,10 @@ struct ocelot_port {
/* The VLAN ID that will be transmitted as untagged, on egress */
struct ocelot_vlan native_vlan;
+ unsigned int ptp_skbs_in_flight;
u8 ptp_cmd;
struct sk_buff_head tx_skbs;
u8 ts_id;
- spinlock_t ts_id_lock;
phy_interface_t phy_mode;
@@ -680,6 +680,9 @@ struct ocelot {
struct ptp_clock *ptp_clock;
struct ptp_clock_info ptp_info;
struct hwtstamp_config hwtstamp_config;
+ unsigned int ptp_skbs_in_flight;
+ /* Protects the 2-step TX timestamp ID logic */
+ spinlock_t ts_id_lock;
/* Protects the PTP interface state */
struct mutex ptp_lock;
/* Protects the PTP clock */
diff --git a/include/soc/mscc/ocelot_ptp.h b/include/soc/mscc/ocelot_ptp.h
index 6e54442b49ad..f085884b1fa2 100644
--- a/include/soc/mscc/ocelot_ptp.h
+++ b/include/soc/mscc/ocelot_ptp.h
@@ -14,6 +14,7 @@
#include <soc/mscc/ocelot.h>
#define OCELOT_MAX_PTP_ID 63
+#define OCELOT_PTP_FIFO_SIZE 128
#define PTP_PIN_CFG_RSZ 0x20
#define PTP_PIN_TOD_SEC_MSB_RSZ PTP_PIN_CFG_RSZ
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From c57fe0037a4e3863d9b740f8c14df9c51ac31aa1 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Date: Tue, 12 Oct 2021 14:40:35 +0300
Subject: [PATCH] net: mscc: ocelot: make use of all 63 PTP timestamp
identifiers
At present, there is a problem when user space bombards a port with PTP
event frames which have TX timestamping requests (or when a tc-taprio
offload is installed on a port, which delays the TX timestamps by a
significant amount of time). The driver will happily roll over the 2-bit
timestamp ID and this will cause incorrect matches between an skb and
the TX timestamp collected from the FIFO.
The Ocelot switches have a 6-bit PTP timestamp identifier, and the value
63 is reserved, so that leaves identifiers 0-62 to be used.
The timestamp identifiers are selected by the REW_OP packet field, and
are actually shared between CPU-injected frames and frames which match a
VCAP IS2 rule that modifies the REW_OP. The hardware supports
partitioning between the two uses of the REW_OP field through the
PTP_ID_LOW and PTP_ID_HIGH registers, and by default reserves the PTP
IDs 0-3 for CPU-injected traffic and the rest for VCAP IS2.
The driver does not use VCAP IS2 to set REW_OP for 2-step timestamping,
and it also writes 0xffffffff to both PTP_ID_HIGH and PTP_ID_LOW in
ocelot_init_timestamp() which makes all timestamp identifiers available
to CPU injection.
Therefore, we can make use of all 63 timestamp identifiers, which should
allow more timestampable packets to be in flight on each port. This is
only part of the solution, more issues will be addressed in future changes.
Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support")
Signed-off-by: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index 4de58321907c..c43c8f53faaf 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -579,7 +579,9 @@ static void ocelot_port_add_txtstamp_skb(struct ocelot *ocelot, int port,
skb_shinfo(clone)->tx_flags |= SKBTX_IN_PROGRESS;
/* Store timestamp ID in OCELOT_SKB_CB(clone)->ts_id */
OCELOT_SKB_CB(clone)->ts_id = ocelot_port->ts_id;
- ocelot_port->ts_id = (ocelot_port->ts_id + 1) % 4;
+ ocelot_port->ts_id++;
+ if (ocelot_port->ts_id == OCELOT_MAX_PTP_ID)
+ ocelot_port->ts_id = 0;
skb_queue_tail(&ocelot_port->tx_skbs, clone);
spin_unlock(&ocelot_port->ts_id_lock);
diff --git a/include/soc/mscc/ocelot_ptp.h b/include/soc/mscc/ocelot_ptp.h
index ded497d72bdb..6e54442b49ad 100644
--- a/include/soc/mscc/ocelot_ptp.h
+++ b/include/soc/mscc/ocelot_ptp.h
@@ -13,6 +13,8 @@
#include <linux/ptp_clock_kernel.h>
#include <soc/mscc/ocelot.h>
+#define OCELOT_MAX_PTP_ID 63
+
#define PTP_PIN_CFG_RSZ 0x20
#define PTP_PIN_TOD_SEC_MSB_RSZ PTP_PIN_CFG_RSZ
#define PTP_PIN_TOD_SEC_LSB_RSZ PTP_PIN_CFG_RSZ
The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From c57fe0037a4e3863d9b740f8c14df9c51ac31aa1 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Date: Tue, 12 Oct 2021 14:40:35 +0300
Subject: [PATCH] net: mscc: ocelot: make use of all 63 PTP timestamp
identifiers
At present, there is a problem when user space bombards a port with PTP
event frames which have TX timestamping requests (or when a tc-taprio
offload is installed on a port, which delays the TX timestamps by a
significant amount of time). The driver will happily roll over the 2-bit
timestamp ID and this will cause incorrect matches between an skb and
the TX timestamp collected from the FIFO.
The Ocelot switches have a 6-bit PTP timestamp identifier, and the value
63 is reserved, so that leaves identifiers 0-62 to be used.
The timestamp identifiers are selected by the REW_OP packet field, and
are actually shared between CPU-injected frames and frames which match a
VCAP IS2 rule that modifies the REW_OP. The hardware supports
partitioning between the two uses of the REW_OP field through the
PTP_ID_LOW and PTP_ID_HIGH registers, and by default reserves the PTP
IDs 0-3 for CPU-injected traffic and the rest for VCAP IS2.
The driver does not use VCAP IS2 to set REW_OP for 2-step timestamping,
and it also writes 0xffffffff to both PTP_ID_HIGH and PTP_ID_LOW in
ocelot_init_timestamp() which makes all timestamp identifiers available
to CPU injection.
Therefore, we can make use of all 63 timestamp identifiers, which should
allow more timestampable packets to be in flight on each port. This is
only part of the solution, more issues will be addressed in future changes.
Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support")
Signed-off-by: Vladimir Oltean <vladimir.oltean(a)nxp.com>
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index 4de58321907c..c43c8f53faaf 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -579,7 +579,9 @@ static void ocelot_port_add_txtstamp_skb(struct ocelot *ocelot, int port,
skb_shinfo(clone)->tx_flags |= SKBTX_IN_PROGRESS;
/* Store timestamp ID in OCELOT_SKB_CB(clone)->ts_id */
OCELOT_SKB_CB(clone)->ts_id = ocelot_port->ts_id;
- ocelot_port->ts_id = (ocelot_port->ts_id + 1) % 4;
+ ocelot_port->ts_id++;
+ if (ocelot_port->ts_id == OCELOT_MAX_PTP_ID)
+ ocelot_port->ts_id = 0;
skb_queue_tail(&ocelot_port->tx_skbs, clone);
spin_unlock(&ocelot_port->ts_id_lock);
diff --git a/include/soc/mscc/ocelot_ptp.h b/include/soc/mscc/ocelot_ptp.h
index ded497d72bdb..6e54442b49ad 100644
--- a/include/soc/mscc/ocelot_ptp.h
+++ b/include/soc/mscc/ocelot_ptp.h
@@ -13,6 +13,8 @@
#include <linux/ptp_clock_kernel.h>
#include <soc/mscc/ocelot.h>
+#define OCELOT_MAX_PTP_ID 63
+
#define PTP_PIN_CFG_RSZ 0x20
#define PTP_PIN_TOD_SEC_MSB_RSZ PTP_PIN_CFG_RSZ
#define PTP_PIN_TOD_SEC_LSB_RSZ PTP_PIN_CFG_RSZ
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 90b7c1c66132c20e8a550006011a3cbfb73dbfc1 Mon Sep 17 00:00:00 2001
From: Marijn Suijten <marijn.suijten(a)somainline.org>
Date: Mon, 6 Sep 2021 22:25:51 +0200
Subject: [PATCH] drm/msm/dsi: dsi_phy_14nm: Take ready-bit into account in
poll_for_ready
The downstream driver models this PLL lock check as an if-elseif-else.
The only way to reach the else case where pll_locked=true [1] is by
succeeding both readl_poll_timeout_atomic calls (which return zero on
success) in the if _and_ elseif condition. Hence both the "lock" and
"ready" bit need to be tested in the SM_READY_STATUS register before
considering the PLL locked and ready to go.
Tested on the Sony Xperia XA2 Ultra (nile-discovery, sdm630).
[1]: https://source.codeaurora.org/quic/la/kernel/msm-4.19/tree/drivers/clk/qcomβ¦
Fixes: f079f6d999cb ("drm/msm/dsi: Add PHY/PLL for 8x96")
Signed-off-by: Marijn Suijten <marijn.suijten(a)somainline.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
Link: https://lore.kernel.org/r/20210906202552.824598-1-marijn.suijten@somainlineβ¦
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
Signed-off-by: Rob Clark <robdclark(a)chromium.org>
diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
index d13552b2213b..5b4e991f220d 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
@@ -110,14 +110,13 @@ static struct dsi_pll_14nm *pll_14nm_list[DSI_MAX];
static bool pll_14nm_poll_for_ready(struct dsi_pll_14nm *pll_14nm,
u32 nb_tries, u32 timeout_us)
{
- bool pll_locked = false;
+ bool pll_locked = false, pll_ready = false;
void __iomem *base = pll_14nm->phy->pll_base;
u32 tries, val;
tries = nb_tries;
while (tries--) {
- val = dsi_phy_read(base +
- REG_DSI_14nm_PHY_PLL_RESET_SM_READY_STATUS);
+ val = dsi_phy_read(base + REG_DSI_14nm_PHY_PLL_RESET_SM_READY_STATUS);
pll_locked = !!(val & BIT(5));
if (pll_locked)
@@ -126,23 +125,24 @@ static bool pll_14nm_poll_for_ready(struct dsi_pll_14nm *pll_14nm,
udelay(timeout_us);
}
- if (!pll_locked) {
- tries = nb_tries;
- while (tries--) {
- val = dsi_phy_read(base +
- REG_DSI_14nm_PHY_PLL_RESET_SM_READY_STATUS);
- pll_locked = !!(val & BIT(0));
+ if (!pll_locked)
+ goto out;
- if (pll_locked)
- break;
+ tries = nb_tries;
+ while (tries--) {
+ val = dsi_phy_read(base + REG_DSI_14nm_PHY_PLL_RESET_SM_READY_STATUS);
+ pll_ready = !!(val & BIT(0));
- udelay(timeout_us);
- }
+ if (pll_ready)
+ break;
+
+ udelay(timeout_us);
}
- DBG("DSI PLL is %slocked", pll_locked ? "" : "*not* ");
+out:
+ DBG("DSI PLL is %slocked, %sready", pll_locked ? "" : "*not* ", pll_ready ? "" : "*not* ");
- return pll_locked;
+ return pll_locked && pll_ready;
}
static void dsi_pll_14nm_config_init(struct dsi_pll_config *pconf)
The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 90b7c1c66132c20e8a550006011a3cbfb73dbfc1 Mon Sep 17 00:00:00 2001
From: Marijn Suijten <marijn.suijten(a)somainline.org>
Date: Mon, 6 Sep 2021 22:25:51 +0200
Subject: [PATCH] drm/msm/dsi: dsi_phy_14nm: Take ready-bit into account in
poll_for_ready
The downstream driver models this PLL lock check as an if-elseif-else.
The only way to reach the else case where pll_locked=true [1] is by
succeeding both readl_poll_timeout_atomic calls (which return zero on
success) in the if _and_ elseif condition. Hence both the "lock" and
"ready" bit need to be tested in the SM_READY_STATUS register before
considering the PLL locked and ready to go.
Tested on the Sony Xperia XA2 Ultra (nile-discovery, sdm630).
[1]: https://source.codeaurora.org/quic/la/kernel/msm-4.19/tree/drivers/clk/qcomβ¦
Fixes: f079f6d999cb ("drm/msm/dsi: Add PHY/PLL for 8x96")
Signed-off-by: Marijn Suijten <marijn.suijten(a)somainline.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
Link: https://lore.kernel.org/r/20210906202552.824598-1-marijn.suijten@somainlineβ¦
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
Signed-off-by: Rob Clark <robdclark(a)chromium.org>
diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
index d13552b2213b..5b4e991f220d 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
@@ -110,14 +110,13 @@ static struct dsi_pll_14nm *pll_14nm_list[DSI_MAX];
static bool pll_14nm_poll_for_ready(struct dsi_pll_14nm *pll_14nm,
u32 nb_tries, u32 timeout_us)
{
- bool pll_locked = false;
+ bool pll_locked = false, pll_ready = false;
void __iomem *base = pll_14nm->phy->pll_base;
u32 tries, val;
tries = nb_tries;
while (tries--) {
- val = dsi_phy_read(base +
- REG_DSI_14nm_PHY_PLL_RESET_SM_READY_STATUS);
+ val = dsi_phy_read(base + REG_DSI_14nm_PHY_PLL_RESET_SM_READY_STATUS);
pll_locked = !!(val & BIT(5));
if (pll_locked)
@@ -126,23 +125,24 @@ static bool pll_14nm_poll_for_ready(struct dsi_pll_14nm *pll_14nm,
udelay(timeout_us);
}
- if (!pll_locked) {
- tries = nb_tries;
- while (tries--) {
- val = dsi_phy_read(base +
- REG_DSI_14nm_PHY_PLL_RESET_SM_READY_STATUS);
- pll_locked = !!(val & BIT(0));
+ if (!pll_locked)
+ goto out;
- if (pll_locked)
- break;
+ tries = nb_tries;
+ while (tries--) {
+ val = dsi_phy_read(base + REG_DSI_14nm_PHY_PLL_RESET_SM_READY_STATUS);
+ pll_ready = !!(val & BIT(0));
- udelay(timeout_us);
- }
+ if (pll_ready)
+ break;
+
+ udelay(timeout_us);
}
- DBG("DSI PLL is %slocked", pll_locked ? "" : "*not* ");
+out:
+ DBG("DSI PLL is %slocked, %sready", pll_locked ? "" : "*not* ", pll_ready ? "" : "*not* ");
- return pll_locked;
+ return pll_locked && pll_ready;
}
static void dsi_pll_14nm_config_init(struct dsi_pll_config *pconf)
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 90b7c1c66132c20e8a550006011a3cbfb73dbfc1 Mon Sep 17 00:00:00 2001
From: Marijn Suijten <marijn.suijten(a)somainline.org>
Date: Mon, 6 Sep 2021 22:25:51 +0200
Subject: [PATCH] drm/msm/dsi: dsi_phy_14nm: Take ready-bit into account in
poll_for_ready
The downstream driver models this PLL lock check as an if-elseif-else.
The only way to reach the else case where pll_locked=true [1] is by
succeeding both readl_poll_timeout_atomic calls (which return zero on
success) in the if _and_ elseif condition. Hence both the "lock" and
"ready" bit need to be tested in the SM_READY_STATUS register before
considering the PLL locked and ready to go.
Tested on the Sony Xperia XA2 Ultra (nile-discovery, sdm630).
[1]: https://source.codeaurora.org/quic/la/kernel/msm-4.19/tree/drivers/clk/qcomβ¦
Fixes: f079f6d999cb ("drm/msm/dsi: Add PHY/PLL for 8x96")
Signed-off-by: Marijn Suijten <marijn.suijten(a)somainline.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
Link: https://lore.kernel.org/r/20210906202552.824598-1-marijn.suijten@somainlineβ¦
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
Signed-off-by: Rob Clark <robdclark(a)chromium.org>
diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
index d13552b2213b..5b4e991f220d 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
@@ -110,14 +110,13 @@ static struct dsi_pll_14nm *pll_14nm_list[DSI_MAX];
static bool pll_14nm_poll_for_ready(struct dsi_pll_14nm *pll_14nm,
u32 nb_tries, u32 timeout_us)
{
- bool pll_locked = false;
+ bool pll_locked = false, pll_ready = false;
void __iomem *base = pll_14nm->phy->pll_base;
u32 tries, val;
tries = nb_tries;
while (tries--) {
- val = dsi_phy_read(base +
- REG_DSI_14nm_PHY_PLL_RESET_SM_READY_STATUS);
+ val = dsi_phy_read(base + REG_DSI_14nm_PHY_PLL_RESET_SM_READY_STATUS);
pll_locked = !!(val & BIT(5));
if (pll_locked)
@@ -126,23 +125,24 @@ static bool pll_14nm_poll_for_ready(struct dsi_pll_14nm *pll_14nm,
udelay(timeout_us);
}
- if (!pll_locked) {
- tries = nb_tries;
- while (tries--) {
- val = dsi_phy_read(base +
- REG_DSI_14nm_PHY_PLL_RESET_SM_READY_STATUS);
- pll_locked = !!(val & BIT(0));
+ if (!pll_locked)
+ goto out;
- if (pll_locked)
- break;
+ tries = nb_tries;
+ while (tries--) {
+ val = dsi_phy_read(base + REG_DSI_14nm_PHY_PLL_RESET_SM_READY_STATUS);
+ pll_ready = !!(val & BIT(0));
- udelay(timeout_us);
- }
+ if (pll_ready)
+ break;
+
+ udelay(timeout_us);
}
- DBG("DSI PLL is %slocked", pll_locked ? "" : "*not* ");
+out:
+ DBG("DSI PLL is %slocked, %sready", pll_locked ? "" : "*not* ", pll_ready ? "" : "*not* ");
- return pll_locked;
+ return pll_locked && pll_ready;
}
static void dsi_pll_14nm_config_init(struct dsi_pll_config *pconf)
The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 90b7c1c66132c20e8a550006011a3cbfb73dbfc1 Mon Sep 17 00:00:00 2001
From: Marijn Suijten <marijn.suijten(a)somainline.org>
Date: Mon, 6 Sep 2021 22:25:51 +0200
Subject: [PATCH] drm/msm/dsi: dsi_phy_14nm: Take ready-bit into account in
poll_for_ready
The downstream driver models this PLL lock check as an if-elseif-else.
The only way to reach the else case where pll_locked=true [1] is by
succeeding both readl_poll_timeout_atomic calls (which return zero on
success) in the if _and_ elseif condition. Hence both the "lock" and
"ready" bit need to be tested in the SM_READY_STATUS register before
considering the PLL locked and ready to go.
Tested on the Sony Xperia XA2 Ultra (nile-discovery, sdm630).
[1]: https://source.codeaurora.org/quic/la/kernel/msm-4.19/tree/drivers/clk/qcomβ¦
Fixes: f079f6d999cb ("drm/msm/dsi: Add PHY/PLL for 8x96")
Signed-off-by: Marijn Suijten <marijn.suijten(a)somainline.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
Link: https://lore.kernel.org/r/20210906202552.824598-1-marijn.suijten@somainlineβ¦
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov(a)linaro.org>
Signed-off-by: Rob Clark <robdclark(a)chromium.org>
diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
index d13552b2213b..5b4e991f220d 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
@@ -110,14 +110,13 @@ static struct dsi_pll_14nm *pll_14nm_list[DSI_MAX];
static bool pll_14nm_poll_for_ready(struct dsi_pll_14nm *pll_14nm,
u32 nb_tries, u32 timeout_us)
{
- bool pll_locked = false;
+ bool pll_locked = false, pll_ready = false;
void __iomem *base = pll_14nm->phy->pll_base;
u32 tries, val;
tries = nb_tries;
while (tries--) {
- val = dsi_phy_read(base +
- REG_DSI_14nm_PHY_PLL_RESET_SM_READY_STATUS);
+ val = dsi_phy_read(base + REG_DSI_14nm_PHY_PLL_RESET_SM_READY_STATUS);
pll_locked = !!(val & BIT(5));
if (pll_locked)
@@ -126,23 +125,24 @@ static bool pll_14nm_poll_for_ready(struct dsi_pll_14nm *pll_14nm,
udelay(timeout_us);
}
- if (!pll_locked) {
- tries = nb_tries;
- while (tries--) {
- val = dsi_phy_read(base +
- REG_DSI_14nm_PHY_PLL_RESET_SM_READY_STATUS);
- pll_locked = !!(val & BIT(0));
+ if (!pll_locked)
+ goto out;
- if (pll_locked)
- break;
+ tries = nb_tries;
+ while (tries--) {
+ val = dsi_phy_read(base + REG_DSI_14nm_PHY_PLL_RESET_SM_READY_STATUS);
+ pll_ready = !!(val & BIT(0));
- udelay(timeout_us);
- }
+ if (pll_ready)
+ break;
+
+ udelay(timeout_us);
}
- DBG("DSI PLL is %slocked", pll_locked ? "" : "*not* ");
+out:
+ DBG("DSI PLL is %slocked, %sready", pll_locked ? "" : "*not* ", pll_ready ? "" : "*not* ");
- return pll_locked;
+ return pll_locked && pll_ready;
}
static void dsi_pll_14nm_config_init(struct dsi_pll_config *pconf)
The patch below does not apply to the 5.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 84c8a87402cf073ba7948dd62d4815a3f4a224c8 Mon Sep 17 00:00:00 2001
From: Maxim Mikityanskiy <maximmi(a)nvidia.com>
Date: Mon, 11 Oct 2021 18:39:35 +0300
Subject: [PATCH] net/mlx5e: Fix division by 0 in mlx5e_select_queue for
representors
Commit 846d6da1fcdb ("net/mlx5e: Fix division by 0 in
mlx5e_select_queue") makes mlx5e_build_nic_params assign a non-zero
initial value to priv->num_tc_x_num_ch, so that mlx5e_select_queue
doesn't fail with division by 0 if called before the first activation of
channels. However, the initialization flow of representors doesn't call
mlx5e_build_nic_params, so this bug can still happen with representors.
This commit fixes the bug by adding the missing assignment to
mlx5e_build_rep_params.
Fixes: 846d6da1fcdb ("net/mlx5e: Fix division by 0 in mlx5e_select_queue")
Signed-off-by: Maxim Mikityanskiy <maximmi(a)nvidia.com>
Reviewed-by: Tariq Toukan <tariqt(a)nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm(a)nvidia.com>
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index 0439203fc7d9..0684ac6699b2 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -618,6 +618,11 @@ static void mlx5e_build_rep_params(struct net_device *netdev)
params->mqprio.num_tc = 1;
params->tunneled_offload_en = false;
+ /* Set an initial non-zero value, so that mlx5e_select_queue won't
+ * divide by zero if called before first activating channels.
+ */
+ priv->num_tc_x_num_ch = params->num_channels * params->mqprio.num_tc;
+
mlx5_query_min_inline(mdev, ¶ms->tx_min_inline_mode);
}
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 43a4b4dbd48c9006ef64df3a12acf33bdfe11c61 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alvin=20=C5=A0ipraga?= <alsi(a)bang-olufsen.dk>
Date: Tue, 12 Oct 2021 13:27:31 +0200
Subject: [PATCH] net: dsa: fix spurious error message when unoffloaded port
leaves bridge
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Flip the sign of a return value check, thereby suppressing the following
spurious error:
port 2 failed to notify DSA_NOTIFIER_BRIDGE_LEAVE: -EOPNOTSUPP
... which is emitted when removing an unoffloaded DSA switch port from a
bridge.
Fixes: d371b7c92d19 ("net: dsa: Unset vlan_filtering when ports leave the bridge")
Signed-off-by: Alvin Ε ipraga <alsi(a)bang-olufsen.dk>
Reviewed-by: Vladimir Oltean <olteanv(a)gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli(a)gmail.com>
Link: https://lore.kernel.org/r/20211012112730.3429157-1-alvin@pqrs.dk
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
diff --git a/net/dsa/switch.c b/net/dsa/switch.c
index 1c797ec8e2c2..6466d0539af9 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
@@ -168,7 +168,7 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds,
if (extack._msg)
dev_err(ds->dev, "port %d: %s\n", info->port,
extack._msg);
- if (err && err != EOPNOTSUPP)
+ if (err && err != -EOPNOTSUPP)
return err;
}
The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 43a4b4dbd48c9006ef64df3a12acf33bdfe11c61 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alvin=20=C5=A0ipraga?= <alsi(a)bang-olufsen.dk>
Date: Tue, 12 Oct 2021 13:27:31 +0200
Subject: [PATCH] net: dsa: fix spurious error message when unoffloaded port
leaves bridge
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Flip the sign of a return value check, thereby suppressing the following
spurious error:
port 2 failed to notify DSA_NOTIFIER_BRIDGE_LEAVE: -EOPNOTSUPP
... which is emitted when removing an unoffloaded DSA switch port from a
bridge.
Fixes: d371b7c92d19 ("net: dsa: Unset vlan_filtering when ports leave the bridge")
Signed-off-by: Alvin Ε ipraga <alsi(a)bang-olufsen.dk>
Reviewed-by: Vladimir Oltean <olteanv(a)gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli(a)gmail.com>
Link: https://lore.kernel.org/r/20211012112730.3429157-1-alvin@pqrs.dk
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
diff --git a/net/dsa/switch.c b/net/dsa/switch.c
index 1c797ec8e2c2..6466d0539af9 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
@@ -168,7 +168,7 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds,
if (extack._msg)
dev_err(ds->dev, "port %d: %s\n", info->port,
extack._msg);
- if (err && err != EOPNOTSUPP)
+ if (err && err != -EOPNOTSUPP)
return err;
}
The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 4a3e0aeddf091f00974b02627c157843ce382a24 Mon Sep 17 00:00:00 2001
From: Maarten Zanders <maarten.zanders(a)mind.be>
Date: Mon, 11 Oct 2021 16:27:20 +0200
Subject: [PATCH] net: dsa: mv88e6xxx: don't use PHY_DETECT on internal PHY's
mv88e6xxx_port_ppu_updates() interpretes data in the PORT_STS
register incorrectly for internal ports (ie no PPU). In these
cases, the PHY_DETECT bit indicates link status. This results
in forcing the MAC state whenever the PHY link goes down which
is not intended. As a side effect, LED's configured to show
link status stay lit even though the physical link is down.
Add a check in mac_link_down and mac_link_up to see if it
concerns an external port and only then, look at PPU status.
Fixes: 5d5b231da7ac (net: dsa: mv88e6xxx: use PHY_DETECT in mac_link_up/mac_link_down)
Reported-by: Maarten Zanders <m.zanders(a)televic.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier(a)bootlin.com>
Signed-off-by: Maarten Zanders <maarten.zanders(a)mind.be>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index d7b29792732b..8dadcae93c9b 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -750,7 +750,11 @@ static void mv88e6xxx_mac_link_down(struct dsa_switch *ds, int port,
ops = chip->info->ops;
mv88e6xxx_reg_lock(chip);
- if ((!mv88e6xxx_port_ppu_updates(chip, port) ||
+ /* Internal PHYs propagate their configuration directly to the MAC.
+ * External PHYs depend on whether the PPU is enabled for this port.
+ */
+ if (((!mv88e6xxx_phy_is_internal(ds, port) &&
+ !mv88e6xxx_port_ppu_updates(chip, port)) ||
mode == MLO_AN_FIXED) && ops->port_sync_link)
err = ops->port_sync_link(chip, port, mode, false);
mv88e6xxx_reg_unlock(chip);
@@ -773,7 +777,12 @@ static void mv88e6xxx_mac_link_up(struct dsa_switch *ds, int port,
ops = chip->info->ops;
mv88e6xxx_reg_lock(chip);
- if (!mv88e6xxx_port_ppu_updates(chip, port) || mode == MLO_AN_FIXED) {
+ /* Internal PHYs propagate their configuration directly to the MAC.
+ * External PHYs depend on whether the PPU is enabled for this port.
+ */
+ if ((!mv88e6xxx_phy_is_internal(ds, port) &&
+ !mv88e6xxx_port_ppu_updates(chip, port)) ||
+ mode == MLO_AN_FIXED) {
/* FIXME: for an automedia port, should we force the link
* down here - what if the link comes up due to "other" media
* while we're bringing the port up, how is the exclusivity