On Tue, 5 Dec 2023 at 06:19, Rae Moar wrote:
>
> Add functionality to run built-in tests after boot by writing to a
> debugfs file.
>
> Add a new debugfs file labeled "run" for each test suite to use for
> this purpose.
>
> As an example, write to the file using the following:
>
> echo "any
On Tue, 5 Dec 2023 at 06:19, Rae Moar wrote:
>
> Expand the documentation on the KUnit debugfs filesystem on the
> run_manual.rst page.
>
> Add section describing how to access results using debugfs.
>
> Add section describing how to run tests after boot using debugfs.
>
> Signed-off-by: Rae Moar
On Tue, 5 Dec 2023 at 06:19, Rae Moar wrote:
>
> Add is_init test attribute of type bool. Add to_string, get, and filter
> methods to lib/kunit/attributes.c.
>
> Mark each of the tests in the init section with the is_init=true attribute.
>
> Add is_init to the attributes documentation.
>
>
On Tue, 5 Dec 2023 at 06:19, Rae Moar wrote:
>
> Add example_init_test_suite to allow for testing the feature of running
> test suites marked as init to indicate they use init data and/or
> functions.
>
> This suite should always pass and uses a simple init function.
>
> This suite can also be
On Tue, 5 Dec 2023 at 06:19, Rae Moar wrote:
>
> Add KUNIT_INIT_TABLE to the INIT_DATA linker section.
>
> Alter the KUnit macros to create init tests:
> kunit_test_init_section_suites
>
> Update lib/kunit/executor.c to run both the suites in KUNIT_TABLE and
> KUNIT_INIT_TABLE.
>
> Signed-off-by:
On Tue, 5 Dec 2023 at 06:19, Rae Moar wrote:
>
> Alter the linker section of KUNIT_TABLE to move it out of INIT_DATA and
> into DATA_DATA.
>
> Data for KUnit tests does not need to be in the init section.
>
> In order to run tests again after boot the KUnit data cannot be labeled as
> init data
Mark Brown writes:
> +static bool gcs_signal_cap_valid(u64 addr, u64 val)
> +{
> + /*
> + * The top bit should be set, this is an invalid address for
> + * EL0 and will only be set for caps created by signals.
> + */
> + if (!(val & GCS_SIGNAL_CAP_FLAG))
> +
...and, somehow I failed to Cc Peter Z. Doing that now.
thanks,
John Hubbard
NVIDIA
On 12/8/23 18:01, John Hubbard wrote:
This reverts commit 9fc96c7c19df ("selftests: error out if kernel header
files are not yet built").
It turns out that requiring the kernel headers to be built as a
This reverts commit 9fc96c7c19df ("selftests: error out if kernel header
files are not yet built").
It turns out that requiring the kernel headers to be built as a
prerequisite to building selftests, does not work in many cases. For
example, Peter Zijlstra writes:
"My biggest beef with the whole
On Fri, Nov 17, 2023 at 05:07:11AM -0800, Yi Liu wrote:
> Take Intel VT-d as an example, the stage-1 translation table is I/O page
> table. As the below diagram shows, guest I/O page table pointer in GPA
> (guest physical address) is passed to host and be used to perform the stage-1
> address
On 12/8/23 14:10, Peter Zijlstra wrote:
So as David already argued, the current thing does not in fact help with
b. You just have to install once and the error goes away, then carry
that tree for a year and you're running old crap again.
My biggest beef with the whole thing is that I simply do
On Sat, Dec 09, 2023 at 01:59:16PM +1300, Robert O'Callahan wrote:
> overriding clone_args::shadow_stack_size to zero in the call to
> clone3(), instead having the replay task call map_shadow_stack() to
> put the the shadow stack in the right place, and then setting its SSP
> via ptrace. Will
On Wed, 29 Nov 2023 at 07:31, Mark Brown wrote:
> Since clone3() is readily extensible let's add support for specifying a
> shadow stack when creating a new thread or process in a similar manner
> to how the normal stack is specified, keeping the current implicit
> allocation behaviour if one is
> >> >> > Exiting-event identification can also have bit 13 set, indicating a
> >> >> > nested exception encountered and caused VM-exit. when reinjecting the
> >> >> > exception to guests, kvm needs to set the "nested" bit, right? I
> >> >> > suspect some changes to e.g., handle_exception_nmi()
On Fri, Dec 8, 2023 at 2:56 PM Pavel Begunkov wrote:
>
> On 12/8/23 00:52, Mina Almasry wrote:
...
> > + if (pool->p.queue)
> > + binding = READ_ONCE(pool->p.queue->binding);
> > +
> > + if (binding) {
> > + pool->mp_ops = _devmem_ops;
> > +
On 12/8/23 00:52, Mina Almasry wrote:
Implement a memory provider that allocates dmabuf devmem page_pool_iovs.
The provider receives a reference to the struct netdev_dmabuf_binding
via the pool->mp_priv pointer. The driver needs to set this pointer for
the provider in the page_pool_params.
The
On 12/8/23 00:52, Mina Almasry wrote:
Implement a memory provider that allocates dmabuf devmem page_pool_iovs.
The provider receives a reference to the struct netdev_dmabuf_binding
via the pool->mp_priv pointer. The driver needs to set this pointer for
the provider in the page_pool_params.
The
On Fri, Dec 08, 2023 at 12:29:37PM -0800, John Hubbard wrote:
> I don't have a strong opinion about how this should be done, and in
> fact I believed at the time that I was bringing the system into
> compliance with what everyone wanted here. :)
>
> There seem to be two conflicting visions:
>
>
On 11/6/23 22:55, Willem de Bruijn wrote:
On Mon, Nov 6, 2023 at 2:34 PM Stanislav Fomichev wrote:
On 11/06, Willem de Bruijn wrote:
IMHO, we need a better UAPI to receive the tokens and give them back to
the kernel. CMSG + setsockopt(SO_DEVMEM_DONTNEED) get the job done,
but look dated and
On Fri, Dec 8, 2023 at 11:22 AM Mina Almasry wrote:
>
> On Fri, Dec 8, 2023 at 9:48 AM David Ahern wrote:
> >
> > On 12/7/23 5:52 PM, Mina Almasry wrote:
> ...
> > > +
> > > + xa_for_each(>bound_rxq_list, xa_idx, rxq) {
> > > + if (rxq->binding == binding) {
> > > +
On 12/8/23 07:21, David Hildenbrand wrote:
On 08.12.23 16:14, Peter Zijlstra wrote:
On Fri, Nov 03, 2023 at 01:22:54PM +0100, David Hildenbrand wrote:
On 03.11.23 13:16, Peter Zijlstra wrote:
On Tue, Jun 06, 2023 at 12:16:37AM -0700, John Hubbard wrote:
As per a discussion with Muhammad Usama
On 11/9/23 16:07, Edward Cree wrote:
On 09/11/2023 02:39, Mina Almasry wrote:
On Wed, Nov 8, 2023 at 7:36 AM Edward Cree wrote:
If not then surely the way to return a memory area
in an io_uring idiom is just to post a new read sqe ('RX descriptor')
pointing into it, rather than
On 11/6/23 22:34, Stanislav Fomichev wrote:
On 11/06, Willem de Bruijn wrote:
IMHO, we need a better UAPI to receive the tokens and give them back to
the kernel. CMSG + setsockopt(SO_DEVMEM_DONTNEED) get the job done,
but look dated and hacky :-(
We should either do some kind of user/kernel
On Wed, Dec 6, 2023 at 3:23 AM David Gow wrote:
>
> We missed one of the casts of kfree() to kunit_action_t in kunit-test,
> which was only enabled when debugfs was in use. This could potentially
> break CFI.
>
> Use the existing wrapper function instead.
>
> Signed-off-by: David Gow
Hello!
On Fri, Dec 8, 2023 at 9:57 AM David Ahern wrote:
>
> On 12/7/23 5:52 PM, Mina Almasry wrote:
> > Major changes in v1:
> > --
> >
> > 1. Implemented MVP queue API ndos to remove the userspace-visible
> >driver reset.
> >
> > 2. Fixed issues in the napi_pp_put_page() devmem frag
On Fri, Dec 8, 2023 at 9:56 AM David Ahern wrote:
>
> On 12/7/23 5:52 PM, Mina Almasry wrote:
> > diff --git a/net/core/dev.c b/net/core/dev.c
> > index b8c8be5a912e..30667e4c3b95 100644
> > --- a/net/core/dev.c
> > +++ b/net/core/dev.c
> > @@ -2120,6 +2120,41 @@ static int
On Fri, Dec 8, 2023 at 9:55 AM David Ahern wrote:
>
> On 12/7/23 5:52 PM, Mina Almasry wrote:
> > In tcp_recvmsg_locked(), detect if the skb being received by the user
> > is a devmem skb. In this case - if the user provided the MSG_SOCK_DEVMEM
> > flag - pass it to tcp_recvmsg_devmem() for
On Fri, Dec 8, 2023 at 9:48 AM David Ahern wrote:
>
> On 12/7/23 5:52 PM, Mina Almasry wrote:
...
> > +
> > + xa_for_each(>bound_rxq_list, xa_idx, rxq) {
> > + if (rxq->binding == binding) {
> > + /* We hold the rtnl_lock while binding/unbinding
> > +
Add test for parsing attributes to kunit_tool_test.py. Test checks
attributes are parsed and saved in the test logs.
This test also checks that the attributes have not interfered with the
parsing of other test information, specifically the suite header as
the test plan was being incorrectely
Add parsing of attributes as diagnostic data. Fixes issue with test plan
being parsed incorrectly as diagnostic data when located after
suite-level attributes.
Note that if there does not exist a test plan line, the diagnostic lines
between the suite header and the first result will be saved in
On 12/7/23 5:52 PM, Mina Almasry wrote:
> Major changes in v1:
> --
>
> 1. Implemented MVP queue API ndos to remove the userspace-visible
>driver reset.
>
> 2. Fixed issues in the napi_pp_put_page() devmem frag unref path.
>
> 3. Removed RFC tag.
>
> Many smaller addressed
On 12/7/23 5:52 PM, Mina Almasry wrote:
> diff --git a/net/core/dev.c b/net/core/dev.c
> index b8c8be5a912e..30667e4c3b95 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -2120,6 +2120,41 @@ static int netdev_restart_rx_queue(struct net_device
> *dev, int rxq_idx)
> return err;
>
On 12/7/23 5:52 PM, Mina Almasry wrote:
> In tcp_recvmsg_locked(), detect if the skb being received by the user
> is a devmem skb. In this case - if the user provided the MSG_SOCK_DEVMEM
> flag - pass it to tcp_recvmsg_devmem() for custom handling.
>
> tcp_recvmsg_devmem() copies any data in the
* Kees Cook [231207 16:04]:
> On Thu, Dec 07, 2023 at 02:33:19PM -0500, Liam R. Howlett wrote:
> > mas_prev() was setting the ma_underflow condition when the limit was
> > reached and not when the limit was attempting to go lower. This
> > resulted in the incorrect behaviour on subsequent
On 12/7/23 5:52 PM, Mina Almasry wrote:
> +
> +static int netdev_restart_rx_queue(struct net_device *dev, int rxq_idx)
> +{
> + void *new_mem;
> + void *old_mem;
> + int err;
> +
> + if (!dev || !dev->netdev_ops)
> + return -EINVAL;
> +
> + if
On Fri, Dec 08, 2023 at 10:39:27AM -0300, Nícolas F. R. A. Prado wrote:
> When walking directory trees, instead of looking for specific files and
> running dirname to get the parent folder, traverse all folders and
> ignore the ones not containing the desired files. This avoids the need
> to call
On Fri, Dec 8, 2023 at 12:07 AM Marco Elver wrote:
> I think that's easy to fix by just defining TRAP_PERF yourself
Yeah that would work here.
- Kyle
On Thu, Dec 07, 2023, Shaoqin Huang wrote:
> When running the set_memory_region_test on arm64 platform, it causes the
> below assert:
>
> Test Assertion Failure
> set_memory_region_test.c:355: r && errno == EINVAL
> pid=40695 tid=40695 errno=0 - Success
> 1
On Fri, Dec 8, 2023 at 1:30 AM Yunsheng Lin wrote:
>
>
> As mentioned before, it seems we need to have the above checking every
> time we need to do some per-page handling in page_pool core, is there
> a plan in your mind how to remove those kind of checking in the future?
>
I see 2 ways to
Hi Mina,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
url:
https://github.com/intel-lab-lkp/linux/commits/Mina-Almasry/net-page_pool-factor-out-releasing-DMA-from-releasing-the-page/20231208-085531
base: net-next/main
patch link
Hi Mina,
kernel test robot noticed the following build errors:
[auto build test ERROR on net-next/main]
url:
https://github.com/intel-lab-lkp/linux/commits/Mina-Almasry/net-page_pool-factor-out-releasing-DMA-from-releasing-the-page/20231208-085531
base: net-next/main
patch link:
https
Hi Mina,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
url:
https://github.com/intel-lab-lkp/linux/commits/Mina-Almasry/net-page_pool-factor-out-releasing-DMA-from-releasing-the-page/20231208-085531
base: net-next/main
patch link
On 08.12.23 16:14, Peter Zijlstra wrote:
On Fri, Nov 03, 2023 at 01:22:54PM +0100, David Hildenbrand wrote:
On 03.11.23 13:16, Peter Zijlstra wrote:
On Tue, Jun 06, 2023 at 12:16:37AM -0700, John Hubbard wrote:
As per a discussion with Muhammad Usama Anjum [1], the following is how
one is
On Fri, Nov 03, 2023 at 01:22:54PM +0100, David Hildenbrand wrote:
> On 03.11.23 13:16, Peter Zijlstra wrote:
> > On Tue, Jun 06, 2023 at 12:16:37AM -0700, John Hubbard wrote:
> > > As per a discussion with Muhammad Usama Anjum [1], the following is how
> > > one is supposed to build selftests:
>
On Thu, Dec 07, 2023 at 08:18:49PM +, Mark Brown wrote:
> On Mon, Aug 28, 2023 at 05:13:12PM -0400, Nícolas F. R. A. Prado wrote:
> > Introduce a new kselftest to detect devices that were declared in the
> > Devicetree, and are expected to be probed by a driver, but weren't.
>
> I've been
On Fri, Dec 08, 2023 at 01:57:26PM +0800, Baolu Lu wrote:
> On 12/1/23 10:24 PM, Jason Gunthorpe wrote:
> > On Thu, Oct 26, 2023 at 10:49:24AM +0800, Lu Baolu wrote:
> > > Hi folks,
> > >
> > > This series implements the functionality of delivering IO page faults to
> > > user space through the
On Fri, Dec 08, 2023 at 01:47:35PM +0800, Baolu Lu wrote:
> On 12/8/23 1:17 AM, Jason Gunthorpe wrote:
> > On Thu, Dec 07, 2023 at 05:34:10PM +0100, Joel Granados wrote:
> > > > @@ -58,6 +255,8 @@ static void hw_pagetable_fault_free(struct
> > > > hw_pgtable_fault *fault)
> > > >
When walking directory trees, instead of looking for specific files and
running dirname to get the parent folder, traverse all folders and
ignore the ones not containing the desired files. This avoids the need
to call dirname inside the loop, which gives a big performance boost,
approximately
Hi John, Muhammad,
On Tue, 6 Jun 2023, John Hubbard wrote:
> As per a discussion with Muhammad Usama Anjum [1], the following is how
> one is supposed to build selftests:
>
> make headers && make -C tools/testing/selftests/mm
>
> Change the selftest build system's lib.mk to fail out with a
On Fri 2023-12-08 09:06:30, Miroslav Benes wrote:
> > > My idea is to abandon this way completely, take the selftests and build
> > > and run them on the system right away.
> > >
> > > Both should be doable, hopefully, if we wire it all correctly... and
> > > document it.
> > >
> > I can't
Hello:
This series was applied to netdev/net-next.git (main)
by David S. Miller :
On Wed, 6 Dec 2023 15:07:52 +0800 you wrote:
> Here is the 2nd part of converting net selftests to run in unique namespace.
> This part converts all bridge, vxlan, vrf tests.
>
> Here is the part 1 link:
>
On 2023/12/1 23:24, Jason Gunthorpe wrote:
On Thu, Oct 26, 2023 at 10:49:28AM +0800, Lu Baolu wrote:
+static ssize_t hwpt_fault_fops_write(struct file *filep,
+const char __user *buf,
+size_t count, loff_t *ppos)
+{
+
Using struct root_device to create fake devices for tests is something
of a hack. The new struct kunit_device is meant for this purpose, so use
it instead.
Acked-by: Mark Brown
Signed-off-by: David Gow
---
sound/soc/soc-topology-test.c | 10 ++
1 file changed, 2 insertions(+), 8
Using struct root_device to create fake devices for tests is something
of a hack. The new struct kunit_device is meant for this purpose, so use
it instead.
Reviewed-by: Matti Vaittinen
Acked-by: Kees Cook
Signed-off-by: David Gow
---
lib/fortify_kunit.c | 5 +++--
1 file changed, 3
Using struct root_device to create fake devices for tests is something
of a hack. The new struct kunit_device is meant for this purpose, so use
it instead.
Reviewed-by: Matti Vaittinen
Signed-off-by: David Gow
---
lib/overflow_kunit.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Tests for drivers often require a struct device to pass to other
functions. While it's possible to create these with
root_device_register(), or to use something like a platform device, this
is both a misuse of those APIs, and can be difficult to clean up after,
for example, a failed assertion.
KUnit tests often need to provide a struct device, and thus far have
mostly been using root_device_register() or platform devices to create
a 'fake device' for use with, e.g., code which uses device-managed
resources. This has several disadvantages, including not being designed
for test use,
On 2023/12/8 8:52, Mina Almasry wrote:
> Overload the LSB of struct page* to indicate that it's a page_pool_iov.
>
> Refactor mm calls on struct page* into helpers, and add page_pool_iov
> handling on those helpers. Modify callers of these mm APIs with calls to
> these helpers instead.
>
> In
On Fri, 8 Dec 2023 at 02:08, Kyle Huey wrote:
>
> On Thu, Dec 7, 2023 at 2:56 PM Kyle Huey wrote:
> >
> > On Thu, Dec 7, 2023 at 11:20 AM Marco Elver wrote:
> > >
> > > On Thu, 7 Dec 2023 at 20:12, Andrii Nakryiko
> > > wrote:
> > > >
> > > > On Thu, Dec 7, 2023 at 8:35 AM Kyle Huey wrote:
>
> > My idea is to abandon this way completely, take the selftests and build
> > and run them on the system right away.
> >
> > Both should be doable, hopefully, if we wire it all correctly... and
> > document it.
> >
> I can't think of why it shouldn't continue to work, even in a future
>
60 matches
Mail list logo