If the outer layer for loop is iterated more than once and it fails not
in the first iteration, the filtered_suite and filtered_suite->test_cases
allocated in the last kunit_filter_attr_tests() in last inner for loop
is leaked.
So add a new free_filtered_suite err label and free the filtered_suite
When CONFIG_KUNIT_ALL_TESTS=y, making CONFIG_DEBUG_KMEMLEAK=y and
CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN=y, the below memory leak is detected.
If kunit_filter_suites() succeeds, not only copy but also filtered_suite
and filtered_suite->test_cases should be freed.
So use kunit_free_suite_set() to free th
If the outer layer for loop is iterated more than once and it fails not
in the first iteration, the copy pointer has been moved. So it should free
the original copy's backup copy_start.
Fixes: abbf73816b6f ("kunit: fix possible memory leak in kunit_filter_suites()")
Signed-off-by: Jinjie Ruan
Rev
modprobe cpumask_kunit and rmmod cpumask_kunit, kmemleak detect
a suspected memory leak as below.
If kunit_filter_suites() in kunit_module_init() succeeds, the
suite_set.start will not be NULL and the kunit_free_suite_set() in
kunit_module_exit() should free all the memory which has not
been freed
The test_cases is not freed in kunit_free_suite_set().
And the copy pointer may be moved in kunit_filter_suites().
The filtered_suite and filtered_suite->test_cases allocated in the last
kunit_filter_attr_tests() in last inner for loop may be leaked if
kunit_filter_suites() fails.
If kunit_filte
On 9/20/23 9:10 PM, Liu, Yi L wrote:
+
+ domain = iommu_domain_alloc(dev->bus);
No need to bounce between core and driver. Just,
intel_iommu_domain_alloc(IOMMU_DOMAIN_UNMANAGED);
and fully initialize it before return.
If you are going to do that then intel_iommu_domain_alloc() s
On Wed, Sep 20, 2023 at 6:56 AM Anup Patel wrote:
>
> On Wed, Sep 20, 2023 at 1:24 AM Atish Patra wrote:
> >
> > On Mon, Sep 18, 2023 at 11:07 AM Anup Patel wrote:
> > >
> > > Same set of ISA_EXT registers are not present on all host because
> > > ISA_EXT registers are visible to the KVM user sp
David Howells wrote:
> Hi Jens,
>
> Can you consider taking this through the block tree?
Sorry, I forgot to remove the 'RFC' tag in the subject.
David
On Wed, Sep 20, 2023 at 02:56:29PM -0500, Rob Herring wrote:
> On Wed, Sep 20, 2023 at 10:03:06AM -0400, Nícolas F. R. A. Prado wrote:
> > On Mon, Aug 28, 2023 at 05:13:09PM -0400, Nícolas F. R. A. Prado wrote:
> > >
> > > Regressions that cause a device to no longer be probed by a driver can
> >
David Howells wrote:
> diff --git a/arch/loongarch/include/asm/page.h
> b/arch/loongarch/include/asm/page.h
> index 63f137ce82a4..c7c5f5b4c0d3 100644
> --- a/arch/loongarch/include/asm/page.h
> +++ b/arch/loongarch/include/asm/page.h
> @@ -32,6 +32,7 @@
>
> #include
> #include
> +#include
On 9/20/2023 14:34, Oleksandr Natalenko wrote:
Hello.
On středa 20. září 2023 18:56:09 CEST Mario Limonciello wrote:
When applied on top of v6.5.3 this breaks turbo on my 5950X after
suspend/resume cycle. Please see the scenario description below.
If I boot v6.5.3 + this patchset, then `turbo
On Wed, Sep 20, 2023 at 10:03:06AM -0400, Nícolas F. R. A. Prado wrote:
> On Mon, Aug 28, 2023 at 05:13:09PM -0400, Nícolas F. R. A. Prado wrote:
> >
> > Regressions that cause a device to no longer be probed by a driver can
> > have a big impact on the platform's functionality, and despite being
Hello.
On středa 20. září 2023 18:56:09 CEST Mario Limonciello wrote:
> > When applied on top of v6.5.3 this breaks turbo on my 5950X after
> > suspend/resume cycle. Please see the scenario description below.
> >
> > If I boot v6.5.3 + this patchset, then `turbostat` reports ~4.9 GHz on core
>
On Wed, Sep 20, 2023 at 03:20:58PM +0100, Mark Rutland wrote:
> Hi Naresh,
>
> As a general thing, for arm64 issues could you please Cc the linux-arm-kernel
> mailing list?
>
> On Wed, Sep 20, 2023 at 02:40:24PM +0200, Naresh Kamboju wrote:
> > Following selftests: user_events: ftrace_test runnin
On 9/19/2023 14:01, Oleksandr Natalenko wrote:
Meng Li (7):
x86: Drop CPU_SUP_INTEL from SCHED_MC_PRIO for the expansion.
acpi: cppc: Add get the highest performance cppc control
cpufreq: amd-pstate: Enable amd-pstate preferred core supporting.
cpufreq: Add a notification message that
On Tue, Sep 19, 2023 at 11:26:21AM -0400, Nícolas F. R. A. Prado wrote:
> When parsing the configs, keep track of card configurations that match
> the current system but haven't matched any card, and report those as
> test failures as they represent that a card which was expected to be
> present on
On Tue, 19 Sep 2023 17:26:21 +0200,
Nícolas F. R. A. Prado wrote:
>
> When parsing the configs, keep track of card configurations that match
> the current system but haven't matched any card, and report those as
> test failures as they represent that a card which was expected to be
> present on th
On Wed, Sep 20, 2023 at 3:49 AM Suren Baghdasaryan wrote:
> On Tue, Sep 19, 2023 at 4:51 PM Jann Horn wrote:
> > On Wed, Sep 20, 2023 at 1:08 AM Suren Baghdasaryan
> > wrote:
> > > On Thu, Sep 14, 2023 at 7:28 PM Jann Horn wrote:
> > > > On Thu, Sep 14, 2023 at 5:26 PM Suren Baghdasaryan
> >
On Wed, Sep 20, 2023 at 09:16:08PM +0530, Anup Patel wrote:
> Currently the AIA ONE_REG registers are reported by get-reg-list
> as new registers for various vcpu_reg_list configs whenever Ssaia
> is available on the host because Ssaia extension can only be
> disabled by Smstateen extension which i
The riscv_vcpu_get_isa_ext_single() should fail with -ENOENT error
when corresponding ISA extension is not available on the host.
Fixes: e98b1085be79 ("RISC-V: KVM: Factor-out ONE_REG related code to its own
source file")
Signed-off-by: Anup Patel
Reviewed-by: Atish Patra
Reviewed-by: Andrew Jo
Currently the AIA ONE_REG registers are reported by get-reg-list
as new registers for various vcpu_reg_list configs whenever Ssaia
is available on the host because Ssaia extension can only be
disabled by Smstateen extension which is not always available.
To tackle this, we should filter-out AIA ON
Same set of ISA_EXT registers are not present on all host because
ISA_EXT registers are visible to the KVM user space based on the
ISA extensions available on the host. Also, disabling an ISA
extension using corresponding ISA_EXT register does not affect
the visibility of the ISA_EXT register itsel
The ISA_EXT registers to enabled/disable ISA extensions for VCPU
are always available when underlying host has the corresponding
ISA extension. The copy_isa_ext_reg_indices() called by the
KVM_GET_REG_LIST API does not align with this expectation so
let's fix it.
Fixes: 031f9efafc08 ("KVM: riscv:
This series includes few assorted fixes for KVM RISC-V ONE_REG interface
and KVM_GET_REG_LIST API.
These patches can also be found in riscv_kvm_onereg_fixes_v2 branch at:
https://github.com/avpatel/linux.git
Changes since v1:
- Addressed Drew's comments in PATCH4
Anup Patel (4):
RISC-V: KVM:
Hi Naresh,
As a general thing, for arm64 issues could you please Cc the linux-arm-kernel
mailing list?
On Wed, Sep 20, 2023 at 02:40:24PM +0200, Naresh Kamboju wrote:
> Following selftests: user_events: ftrace_test running on arm64 Juno-r2
> Linux next-20230919.
> Reported-by: Linux Kernel Functi
On Mon, Aug 28, 2023 at 05:13:09PM -0400, Nícolas F. R. A. Prado wrote:
>
> Regressions that cause a device to no longer be probed by a driver can
> have a big impact on the platform's functionality, and despite being
> relatively common there isn't currently any generic test to detect them.
> As
On Wed, Sep 20, 2023 at 1:24 AM Atish Patra wrote:
>
> On Mon, Sep 18, 2023 at 11:07 AM Anup Patel wrote:
> >
> > Same set of ISA_EXT registers are not present on all host because
> > ISA_EXT registers are visible to the KVM user space based on the
> > ISA extensions available on the host. Also,
On Wed, Sep 20, 2023 at 1:43 AM Atish Patra wrote:
>
> On Mon, Sep 18, 2023 at 11:07 AM Anup Patel wrote:
> >
> > Currently the AIA ONE_REG registers are reported by get-reg-list
> > as new registers for various vcpu_reg_list configs whenever Ssaia
> > is available on the host because Ssaia exten
On Wed, Sep 20, 2023 at 10:54 AM Andrew Jones wrote:
>
> On Mon, Sep 18, 2023 at 11:36:46PM +0530, Anup Patel wrote:
> > Currently the AIA ONE_REG registers are reported by get-reg-list
> > as new registers for various vcpu_reg_list configs whenever Ssaia
> > is available on the host because Ssaia
Hello:
This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt :
On Fri, 15 Sep 2023 12:01:13 +0200 you wrote:
> kselftests fails to build because the mm/testcases subdirectory is not
> created and then the compiler fails to output the binary there.
>
> So fix this by simply removing
> From: Baolu Lu
> Sent: Wednesday, September 20, 2023 1:29 PM
>
> On 9/19/23 5:25 PM, Yi Liu wrote:
> > This adds the domain_alloc_user op implementation. It supports allocating
> > domains to be used as parent under nested translation.
>
> Documentation/process/submitting-patches.rst:
>
> Des
On Wed, Sep 20, 2023 at 01:10:04PM +, Liu, Yi L wrote:
> > From: Jason Gunthorpe
> > Sent: Wednesday, September 20, 2023 9:05 PM
> >
> > On Wed, Sep 20, 2023 at 01:28:41PM +0800, Baolu Lu wrote:
> > > >
> > > > diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
> > > > ind
> From: Yang, Weijiang
> Sent: Wednesday, September 20, 2023 1:41 PM
> On 9/19/2023 5:25 PM, Yi Liu wrote:
> > This adds the domain_alloc_user op implementation. It supports allocating
> > domains to be used as parent under nested translation.
> >
> > Signed-off-by: Yi Liu
> > ---
> > drivers/i
> From: Jason Gunthorpe
> Sent: Wednesday, September 20, 2023 9:05 PM
>
> On Wed, Sep 20, 2023 at 01:28:41PM +0800, Baolu Lu wrote:
> > >
> > > diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
> > > index 5db283c17e0d..491bcde1ff96 100644
> > > --- a/drivers/iommu/intel/iomm
Consolidate the test vector struct in the kunit tests so that the bvec
pattern check helpers can share with the kvec check helpers.
Signed-off-by: David Howells
cc: Christoph Hellwig
cc: Christian Brauner
cc: Jens Axboe
cc: Al Viro
cc: David Hildenbrand
cc: John Hubbard
cc: Brendan Higgins
Add extraction kunit tests for ITER_UBUF- and ITER_IOVEC-type iterators.
This attaches a userspace VM with a mapped file in it temporarily to the
test thread.
[!] Note that this requires the kernel thread running the test to obtain
and deploy an mm_struct so that a user-side buffer can be created
Add kunit tests to benchmark 256MiB copies to a UBUF iterator and an IOVEC
iterator. This attaches a userspace VM with a mapped file in it
temporarily to the test thread.
Signed-off-by: David Howells
cc: Andrew Morton
cc: Christoph Hellwig
cc: Christian Brauner
cc: Jens Axboe
cc: Al Viro
cc
Create a function to set up a userspace VM for the kunit testing thread and
set up a buffer within it such that ITER_UBUF and ITER_IOVEC tests can be
performed.
Note that this requires current->mm to point to a sufficiently set up
mm_struct. This is done by partially mirroring what execve does.
Consolidate some of the repeated code snippets into helper functions to
reduce the line count.
Signed-off-by: David Howells
cc: Christoph Hellwig
cc: Christian Brauner
cc: Jens Axboe
cc: Al Viro
cc: David Hildenbrand
cc: John Hubbard
cc: Brendan Higgins
cc: David Gow
cc: linux-kselftest@v
On Wed, Sep 20, 2023 at 01:41:07PM +0800, Yang, Weijiang wrote:
> On 9/19/2023 5:25 PM, Yi Liu wrote:
> > This adds the domain_alloc_user op implementation. It supports allocating
> > domains to be used as parent under nested translation.
> >
> > Signed-off-by: Yi Liu
> > ---
> > drivers/iommu/
On Wed, Sep 20, 2023 at 01:28:41PM +0800, Baolu Lu wrote:
> >
> > diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
> > index 5db283c17e0d..491bcde1ff96 100644
> > --- a/drivers/iommu/intel/iommu.c
> > +++ b/drivers/iommu/intel/iommu.c
> > @@ -4074,6 +4074,25 @@ static struct
Add copy kunit tests for ITER_UBUF- and ITER_IOVEC-type iterators. This
attaches a userspace VM with a mapped file in it temporarily to the test
thread.
Signed-off-by: David Howells
cc: Andrew Morton
cc: Christoph Hellwig
cc: Christian Brauner
cc: Jens Axboe
cc: Al Viro
cc: Matthew Wilcox
Make the BVEC-testing functions use the consolidated pattern checking
functions to reduce the amount of duplicated code.
Signed-off-by: David Howells
cc: Christoph Hellwig
cc: Christian Brauner
cc: Jens Axboe
cc: Al Viro
cc: David Hildenbrand
cc: John Hubbard
cc: Brendan Higgins
cc: David
Add kunit tests to benchmark 256MiB copies to a KVEC iterator, a BVEC
iterator, an XARRAY iterator and to a loop that allocates 256-page BVECs
and fills them in (similar to a maximal bio struct being set up).
Signed-off-by: David Howells
cc: Christoph Hellwig
cc: Christian Brauner
cc: Jens Axbo
Hi Jens,
Can you consider taking this through the block tree?
These patches make some changes to the kunit tests previously added for
iov_iter testing, in particular adding testing of UBUF/IOVEC iterators and
some benchmarking:
(1) Clean up a couple of checkpatch style complaints.
(2) Consoli
Fix some checkpatch complaints in the new iov_iter kunit tests:
(1) Some lines had eight spaces instead of a tab at the start.
(2) Checkpatch doesn't like (void*)(unsigned long)0xnULL, so switch to
using POISON_POINTER_DELTA plus an offset instead.
Reported-by: Johannes Thumshirn
Sig
Following selftests: user_events: ftrace_test running on arm64 Juno-r2
Linux next-20230919.
Reported-by: Linux Kernel Functional Testing
kselftest: Running tests in user_events
TAP version 13
1..4
# timeout set to 90
# selftests: user_events: ftrace_test
[ 1138.755735] Unable to handle kernel pa
On 9/19/23 11:12, Johannes Nixdorf wrote:
Add a suite covering the fdb_n_learned and fdb_max_learned bridge
features, touching all special cases in accounting at least once.
Signed-off-by: Johannes Nixdorf
---
tools/testing/selftests/net/forwarding/Makefile| 3 +-
.../net/forwarding/br
On 9/19/23 11:12, Johannes Nixdorf wrote:
Add a Kconfig option to configure a default FDB learning limit system
wide, so a distributor building a special purpose kernel can limit all
created bridges by default.
The limit is only a soft default setting and overrideable on a per bridge
basis using
On 9/19/23 11:12, Johannes Nixdorf wrote:
The previous patch added accounting and a limit for the number of
dynamically learned FDB entries per bridge. However it did not provide
means to actually configure those bounds or read back the count. This
patch does that.
Two new netlink attributes are
On 9/19/23 11:12, Johannes Nixdorf wrote:
A malicious actor behind one bridge port may spam the kernel with packets
with a random source MAC address, each of which will create an FDB entry,
each of which is a dynamic allocation in the kernel.
There are roughly 2^48 different MAC addresses, furth
On 9/19/23 11:12, Johannes Nixdorf wrote:
Set any new attributes added to br_policy to be parsed strictly, to
prevent userspace from passing garbage.
Signed-off-by: Johannes Nixdorf
---
net/bridge/br_netlink.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/bridge/br_netlink.c b/ne
On 9/19/23 11:12, Johannes Nixdorf wrote:
In preparation of the following fdb limit for dynamically learned entries,
allow fdb_create to detect that the entry was added by the user. This
way it can skip applying the limit in this case.
Signed-off-by: Johannes Nixdorf
---
net/bridge/br_fdb.c |
Hi, looks good to me. Also ran it without problems on Intel(R) Xeon(R)
Platinum 8360Y.
Reviewed-by: Maciej Wieczor-Retman
Tested-by: Maciej Wieczor-Retman
--
Kind regards
Maciej Wieczór-Retman
Kunit recently gained support to setup attributes, the first one being
the speed of a given test, then allowing to filter out slow tests.
A slow test is defined in the documentation as taking more than one
second. There's an another speed attribute called "super slow" but whose
definition is less
On Tue, Sep 19, 2023 at 09:23:43AM +0530, Anup Patel wrote:
> We have a new conditional operations related ISA extensions so let us add
> these extensions to get-reg-list test.
>
> Signed-off-by: Anup Patel
> ---
> tools/testing/selftests/kvm/riscv/get-reg-list.c | 4
> 1 file changed, 4 in
On Tue, Sep 19, 2023 at 09:23:42AM +0530, Anup Patel wrote:
> We have a new smstateen registers as separate sub-type of CSR ONE_REG
> interface so let us add these registers to get-reg-list test.
>
> Signed-off-by: Anup Patel
> ---
> .../selftests/kvm/riscv/get-reg-list.c| 34 +++
On Tue, Sep 19, 2023 at 09:23:41AM +0530, Anup Patel wrote:
> We have a new senvcfg register in the general CSR ONE_REG interface
> so let us add it to get-reg-list test.
>
> Signed-off-by: Anup Patel
> ---
> tools/testing/selftests/kvm/riscv/get-reg-list.c | 3 +++
> 1 file changed, 3 insertion
On Tue, Sep 19, 2023 at 09:23:40AM +0530, Anup Patel wrote:
> We extend the KVM ISA extension ONE_REG interface to allow KVM
> user space to detect and enable Zicond extension for Guest/VM.
>
> Signed-off-by: Anup Patel
> ---
> arch/riscv/include/uapi/asm/kvm.h | 1 +
> arch/riscv/kvm/vcpu_onere
On Tue, Sep 19, 2023 at 09:23:39AM +0530, Anup Patel wrote:
> We extend the KVM ISA extension ONE_REG interface to allow KVM
> user space to detect and enable XVentanaCondOps extension for
> Guest/VM.
>
> Signed-off-by: Anup Patel
> ---
> arch/riscv/include/uapi/asm/kvm.h | 1 +
> arch/riscv/kvm
On Tue, Sep 19, 2023 at 09:23:38AM +0530, Anup Patel wrote:
> The RISC-V integer conditional (Zicond) operation extension defines
> standard conditional arithmetic and conditional-select/move operations
> which are inspired from the XVentanaCondOps extension. In fact, QEMU
> RISC-V also has support
On Tue, Sep 19, 2023 at 09:23:37AM +0530, Anup Patel wrote:
> The Veyron-V1 CPU supports custom conditional arithmetic and
> conditional-select/move operations referred to as XVentanaCondOps
> extension. In fact, QEMU RISC-V also has support for emulating
> XVentanaCondOps extension.
>
> Let us de
On Wed, Sep 20, 2023 at 07:24:16AM +0200, Andrew Jones wrote:
> On Mon, Sep 18, 2023 at 11:36:46PM +0530, Anup Patel wrote:
> > Currently the AIA ONE_REG registers are reported by get-reg-list
> > as new registers for various vcpu_reg_list configs whenever Ssaia
> > is available on the host because
Hi,
On Tue, Sep 19, 2023 at 03:48:55PM -0400, Rae Moar wrote:
> On Mon, Sep 11, 2023 at 5:51 AM Maxime Ripard wrote:
> >
> > Kunit recently gained support to setup attributes, the first one being
> > the speed of a given test, then allowing to filter out slow tests.
> >
> > A slow test is defined
On 2023/9/20 5:19, Rae Moar wrote:
> On Thu, Sep 14, 2023 at 7:47 AM 'Jinjie Ruan' via KUnit Development
> wrote:
>>
>> If kunit_filter_suites() succeeds, not only copy but also filtered_suite
>> and filtered_suite->test_cases should be freed.
>>
>> So use kunit_free_suite_set() to free the fil
65 matches
Mail list logo