On Wed, Feb 14, 2024 at 04:15:00PM -0300, Ricardo B. Marliere wrote:
> Since commit d492cc2573a0 ("driver core: device.h: make struct
> bus_type a const *"), the driver core can properly handle constant
> struct bus_type, move the kunit_bus_type variable to be a constant
> structure as well,
On Wed, Feb 14, 2024 at 05:36:38PM -0600, Elizabeth Figura wrote:
> This corresponds to the NT syscall NtCreateSemaphore().
>
> Semaphores are one of three types of object to be implemented in this driver,
> the others being mutexes and events.
>
> An NT semaphore contains a 32-bit counter, and
On Wed, Feb 14, 2024 at 06:01:22PM -0600, Elizabeth Figura wrote:
> On Wednesday, 14 February 2024 17:36:36 CST Elizabeth Figura wrote:
> > This patch series introduces a new char misc driver, /dev/ntsync, which is
> > used
> > to implement Windows NT synchronization primitives.
>
> Ugh, sorry,
On 2/14/24 10:19 PM, Ryan Roberts wrote:
> On 02/02/2024 11:31, Muhammad Usama Anjum wrote:
>> Conform the layout, informational and status messages to TAP. No
>> functional change is intended other than the layout of output messages.
>>
>> Signed-off-by: Muhammad Usama Anjum
>> ---
>>
On Fri, Feb 2, 2024 at 4:05 PM Mark Brown wrote:
>
> Since multiple architectures have support for shadow stacks and we need to
> select support for this feature in several places in the generic code
> provide a generic config option that the architectures can select.
>
> Suggested-by: David
On Fri, Feb 2, 2024 at 4:05 PM Mark Brown wrote:
>
> There are a number of architectures with shadow stack features which we are
> presenting to userspace with as consistent an API as we can (though there
> are some architecture specifics). Especially given that there are some
> important
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski :
On Tue, 13 Feb 2024 06:20:55 -0800 you wrote:
> Test runners on debug kernels occasionally fail with:
>
> # # RUN tls_err.13_aes_gcm.poll_partial_rec_async ...
> # #
Hi,
On 2/14/24 15:36, Elizabeth Figura wrote:
> ntsync uses a misc device as the simplest and least intrusive uAPI interface.
>
> Each file description on the device represents an isolated NT instance,
> intended
> to correspond to a single NT virtual machine.
>
> Signed-off-by: Elizabeth
A gentle reminder.
Thanks,
SJ
On Fri, 9 Feb 2024 09:42:43 -0800 SeongJae Park wrote:
> On Fri, 9 Feb 2024 10:30:38 + "Mohamed Abuelfotoh, Hazem"
> wrote:
>
> > On 08/02/2024 21:29, SeongJae Park wrote:
> > > CAUTION: This email originated from outside of the organization. Do not
> > >
On Wed, Feb 14, 2024 at 04:25:14PM -0800, Jakub Kicinski wrote:
> On Wed, 14 Feb 2024 22:46:46 +0100 Jakub Sitnicki wrote:
> > > On second thought, if I can suggest a follow up change so this:
> > >
> > > ok 17 # XFAIL SCTP doesn't support IP_BIND_ADDRESS_NO_PORT
> > >
> > > ... becomes this
> > >
On Wed, 14 Feb 2024 22:46:46 +0100 Jakub Sitnicki wrote:
> > On second thought, if I can suggest a follow up change so this:
> >
> > ok 17 # XFAIL SCTP doesn't support IP_BIND_ADDRESS_NO_PORT
> >
> > ... becomes this
> >
> > ok 17 ip_local_port_range.ip4_stcp.late_bind # XFAIL SCTP doesn't support
The pull request you sent on Tue, 13 Feb 2024 17:06:58 -0700:
> git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
> tags/linux_kselftest-kunit-fixes-6.8-rc5
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/91f842ffe6ca1e97a3966e9e499c3ac6fbcc4bc4
On Wednesday, 14 February 2024 17:36:36 CST Elizabeth Figura wrote:
> This patch series introduces a new char misc driver, /dev/ntsync, which is
> used
> to implement Windows NT synchronization primitives.
Ugh, sorry, I made a bit of a mess while sending this revision. I accidentally
sent 000*
Add an overall explanation of the driver architecture, and complete and precise
specification for its intended behaviour.
Signed-off-by: Elizabeth Figura
---
Documentation/userspace-api/index.rst | 1 +
Documentation/userspace-api/ntsync.rst | 399 +
2 files changed,
Test a more realistic usage pattern, and one with heavy contention, in order to
actually exercise ntsync's internal synchronization.
This test has several threads in a tight loop acquiring a mutex, modifying some
shared data, and then releasing the mutex. At the end we check if the data is
Add myself as maintainer, supported by CodeWeavers.
Signed-off-by: Elizabeth Figura
---
MAINTAINERS | 9 +
1 file changed, 9 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 960512bec428..e80ed255951b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15591,6 +15591,15 @@ T:
Expand the alert tests to cover alerting a thread mid-wait, to test that the
relevant scheduling logic works correctly.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 62 +++
1 file changed, 62 insertions(+)
diff --git
Test the "alert" functionality of NTSYNC_IOC_WAIT_ALL and NTSYNC_IOC_WAIT_ANY,
when a wait is woken with an alert and when it is woken by an object.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 179 +-
1 file changed, 176 insertions(+), 3
Expand the contended wait tests, which previously only covered events and
semaphores, to cover events as well.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 151 +-
1 file changed, 147 insertions(+), 4 deletions(-)
diff --git
Test event-specific ioctls NTSYNC_IOC_EVENT_SET, NTSYNC_IOC_EVENT_RESET,
NTSYNC_IOC_EVENT_PULSE, NTSYNC_IOC_EVENT_READ for auto-reset events, and
waiting on auto-reset events.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 59 +++
1 file
Test event-specific ioctls NTSYNC_IOC_EVENT_SET, NTSYNC_IOC_EVENT_RESET,
NTSYNC_IOC_EVENT_PULSE, NTSYNC_IOC_EVENT_READ for manual-reset events, and
waiting on manual-reset events.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 89 +++
1 file
Test contended "wait-for-all" waits, to make sure that scheduling and wakeup
logic works correctly, and that the wait only exits once objects are all
simultaneously signaled.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 98 +++
1 file
Test contended "wait-for-any" waits, to make sure that scheduling and wakeup
logic works correctly.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 150 ++
1 file changed, 150 insertions(+)
diff --git
Test basic synchronous functionality of NTSYNC_IOC_WAIT_ALL, and when objects
are considered simultaneously signaled.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 99 ++-
1 file changed, 97 insertions(+), 2 deletions(-)
diff --git
Test basic synchronous functionality of NTSYNC_IOC_WAIT_ANY, when objects are
considered signaled or not signaled, and how they are affected by a successful
wait.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 119 ++
1 file changed, 119
Test mutex-specific ioctls NTSYNC_IOC_MUTEX_UNLOCK and NTSYNC_IOC_MUTEX_READ,
and waiting on mutexes.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 196 ++
1 file changed, 196 insertions(+)
diff --git
Wine has tests for its synchronization primitives, but these are more accessible
to kernel developers, and also allow us to test some edge cases that Wine does
not care about.
This patch adds tests for semaphore-specific ioctls NTSYNC_IOC_SEM_POST and
NTSYNC_IOC_SEM_READ, and waiting on
NtWaitForMultipleObjects() can receive a timeout in two forms, relative or
absolute. Relative timeouts are unaffected by changes to the system time and do
not count down while the system suspends; for absolute timeouts the opposite is
true.
In order to make the interface and implementation
This patch series introduces a new char misc driver, /dev/ntsync, which is used
to implement Windows NT synchronization primitives.
This was previously submitted as an RFC [1]. Since there were no major changes
requested to the last RFC revision, I've stripped the RFC prefix.
[1]
NT waits can optionally be made "alertable". This is a special channel for
thread wakeup that is mildly similar to SIGIO. A thread has an internal single
bit of "alerted" state, and if a thread is made alerted while an alertable wait,
the wait will return a special value, consume the "alerted"
This corresponds to the NT syscall NtQueryEvent().
This returns the signaled state of the event and whether it is manual-reset.
Signed-off-by: Elizabeth Figura
---
drivers/misc/ntsync.c | 21 +
include/uapi/linux/ntsync.h | 1 +
2 files changed, 22 insertions(+)
ntsync uses a misc device as the simplest and least intrusive uAPI interface.
Each file description on the device represents an isolated NT instance, intended
to correspond to a single NT virtual machine.
Signed-off-by: Elizabeth Figura
---
drivers/misc/Kconfig | 9
This corresponds to the NT syscall NtQueryMutant().
This returns the recursion count, owner, and abandoned state of the mutex.
Signed-off-by: Elizabeth Figura
---
drivers/misc/ntsync.c | 23 +++
include/uapi/linux/ntsync.h | 1 +
2 files changed, 24 insertions(+)
This corresponds to the NT syscall NtQuerySemaphore().
This returns the current count and maximum count of the semaphore.
Signed-off-by: Elizabeth Figura
---
drivers/misc/ntsync.c | 21 +
include/uapi/linux/ntsync.h | 1 +
2 files changed, 22 insertions(+)
diff
This corresponds to the NT syscall NtPulseEvent().
This wakes up any waiters as if the event had been set, but does not set the
event, instead resetting it if it had been signalled. Thus, for a manual-reset
event, all waiters are woken, whereas for an auto-reset event, at most one
waiter is
This does not correspond to any NT syscall. Rather, when a thread dies, it
should be called by the NT emulator for each mutex.
NT mutexes are robust (in the pthread sense). When an NT thread dies, any
mutexes it owned are immediately released. Acquisition of those mutexes by other
threads will
This corresponds to the NT syscall NtSetEvent().
This sets the event to the signaled state, and returns its previous state.
Signed-off-by: Elizabeth Figura
---
drivers/misc/ntsync.c | 37 +
include/uapi/linux/ntsync.h | 1 +
2 files changed, 38
This corresponds to the NT syscall NtResetEvent().
This sets the event to the unsignaled state, and returns its previous state.
Signed-off-by: Elizabeth Figura
---
drivers/misc/ntsync.c | 22 ++
include/uapi/linux/ntsync.h | 1 +
2 files changed, 23 insertions(+)
This corresponds to part of the functionality of the NT syscall
NtWaitForMultipleObjects(). Specifically, it implements the behaviour where
the third argument (wait_any) is TRUE, and it does not handle alertable waits.
Those features have been split out into separate patches to ease review.
This is similar to NTSYNC_IOC_WAIT_ANY, but waits until all of the objects are
simultaneously signaled, and then acquires all of them as a single atomic
operation.
Signed-off-by: Elizabeth Figura
---
drivers/misc/ntsync.c | 242 ++--
This corresponds to the NT syscall NtCreateSemaphore().
Semaphores are one of three types of object to be implemented in this driver,
the others being mutexes and events.
An NT semaphore contains a 32-bit counter, and is signaled and can be acquired
when the counter is nonzero. The counter has a
This corresponds to the NT syscall NtReleaseSemaphore().
This increases the semaphore's internal counter by the given value, and returns
the previous value. If the counter would overflow the defined maximum, the
function instead fails and returns -EOVERFLOW.
Signed-off-by: Elizabeth Figura
---
This corresponds to the NT syscall NtCreateMutant().
An NT mutex is recursive, with a 32-bit recursion counter. When acquired via
NtWaitForMultipleObjects(), the recursion counter is incremented by one.
The OS records the thread which acquired it. However, in order to keep this
driver
This corresponds to the NT syscall NtReleaseMutant().
This syscall decrements the mutex's recursion count by one, and returns the
previous value. If the mutex is not owned by the given owner ID, the function
instead fails and returns -EPERM.
Signed-off-by: Elizabeth Figura
---
This correspond to the NT syscall NtCreateEvent().
An NT event holds a single bit of state denoting whether it is signaled or
unsignaled.
There are two types of events: manual-reset and automatic-reset. When an
automatic-reset event is acquired via a wait function, its state is reset to
On Wed, Feb 14, 2024 at 08:40 PM +01, Jakub Sitnicki wrote:
[...]
> On second thought, if I can suggest a follow up change so this:
>
> ok 17 # XFAIL SCTP doesn't support IP_BIND_ADDRESS_NO_PORT
>
> ... becomes this
>
> ok 17 ip_local_port_range.ip4_stcp.late_bind # XFAIL SCTP doesn't support
>
On Wed, Feb 14, 2024 at 3:07 PM Mimi Zohar wrote:
> On Tue, 2024-02-13 at 10:33 -0500, Paul Moore wrote:
> > On Tue, Feb 13, 2024 at 7:59 AM Roberto Sassu
> > wrote:
> > > On Mon, 2024-02-12 at 16:16 -0500, Paul Moore wrote:
> > > > On Mon, Feb 12, 2024 at 4:06 PM Mimi Zohar wrote:
> > > > > Hi
On Tue, 13 Feb 2024, Mark Brown wrote:
The futex_requeue_pi test program is run a number of times with different
options to provide multiple test cases. Currently every time it runs it
reports the result with a consistent string, meaning that automated systems
parsing the TAP output from a test
On Tue, 2024-02-13 at 10:33 -0500, Paul Moore wrote:
> On Tue, Feb 13, 2024 at 7:59 AM Roberto Sassu
> wrote:
> > On Mon, 2024-02-12 at 16:16 -0500, Paul Moore wrote:
> > > On Mon, Feb 12, 2024 at 4:06 PM Mimi Zohar wrote:
> > > > Hi Roberto,
> > > >
> > > >
> > > > > diff --git
On Tue, Feb 13, 2024 at 07:44 AM -08, Jakub Kicinski wrote:
> Selftest summary includes XFAIL but there's no way to use
> it from within the harness. Support it in a similar way to skip.
>
> Currently tests report skip for things they expect to fail
> e.g. when given combination of parameters is
;
---
base-commit: 76021a887a50892fd969cd42a5f3467f5696e50e
change-id: 20240214-bus_cleanup-kunit-840cd37b0e10
Best regards,
--
Ricardo B. Marliere
On 14/02/2024 17:19, Ryan Roberts wrote:
> On 02/02/2024 11:31, Muhammad Usama Anjum wrote:
>> Conform the layout, informational and status messages to TAP. No
>> functional change is intended other than the layout of output messages.
>>
>> Signed-off-by: Muhammad Usama Anjum
>> ---
>>
The test sets a hardware breakpoint and uses a bpf program to suppress the
side effects of a perf event sample, including I/O availability signals,
SIGTRAPs, and decrementing the event counter limit, if the ip matches the
expected value. Then the function with the breakpoint is executed multiple
On Wed, Feb 14, 2024 at 12:18:14PM -0500, Zi Yan wrote:
> Hi Pankaj,
>
> On 13 Feb 2024, at 16:55, Zi Yan wrote:
>
> > From: Zi Yan
> >
> > Hi all,
> >
> > File folio supports any order and multi-size THP is upstreamed[1], so both
> > file and anonymous folios can be >0 order. Currently,
This test checks that we can actually delay a workload in a sleepable
context through bpf_timer.
When an event is injected, we push it on a map of type queue and schedule
a work.
When that work kicks in, it pulls the event from the queue, and wakes
up userspace through a ring buffer.
The use of
Export the sleepable kfuncs we have on HID-BPF in tracing bpf programs,
but with the condition of being used in a sleepable context.
This allows to use the bpf_timer when used in a sleepable context
through bpf_timer_set_sleepable_cb() and initiate work from a device event.
Signed-off-by:
Usual way of testing, we call the function and ensures we receive
the event
Signed-off-by: Benjamin Tissoires
---
no changes in v2
---
tools/testing/selftests/hid/hid_bpf.c | 49 +-
tools/testing/selftests/hid/progs/hid.c| 22 ++
On 02/02/2024 11:31, Muhammad Usama Anjum wrote:
> Conform the layout, informational and status messages to TAP. No
> functional change is intended other than the layout of output messages.
>
> Signed-off-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/mm/khugepaged.c | 3 +-
>
It can be interesting to inject events from BPF as if the event were
to come from the device.
For example, some multitouch devices do not all the time send a proximity
out event, and we might want to send it for the physical device.
Compared to uhid, we can now inject events on any physical
This time we need to ensure uhid receives it, thus the new mutex and
condition.
Signed-off-by: Benjamin Tissoires
---
no changes in v2
---
tools/testing/selftests/hid/hid_bpf.c | 63 ++
tools/testing/selftests/hid/progs/hid.c| 24 +
We currently only export hid_hw_raw_request() as a BPF kfunc.
However, some devices require an explicit write on the Output Report
instead of the use of the control channel.
So also export hid_hw_output_report to BPF
Signed-off-by: Benjamin Tissoires
---
no changes in v2
---
No code change, just move down the hid_bpf_get_data() kfunc definition
so we have only one block of __bpf_kfunc_start/end_defs()
Signed-off-by: Benjamin Tissoires
---
no changes in v2
---
drivers/hid/bpf/hid_bpf_dispatch.c | 80 ++
1 file changed, 38
These 2 maps types are required for HID-BPF when a user wants to do
IO with a device from a sleepable tracing point.
Allowing BPF_MAP_TYPE_QUEUE (and therefore BPF_MAP_TYPE_STACK) allows
for a BPF program to prepare from an IRQ the list of HID commands to send
back to the device and then these
They are implemented as a kfunc, which means a little bit of tweaks in
the verifier.
Signed-off-by: Benjamin Tissoires
---
changes in v2 (compared to the one attaches to v1 0/9):
- make use of a kfunc
- add a (non-used) BPF_F_TIMER_SLEEPABLE
- the callback is *not* called, it makes the kernel
No code change, but it'll allow to have only one place to change
everything when we add in_sleepable in cur_state.
Signed-off-by: Benjamin Tissoires
---
changes in v2 (compared to the one attaches to v1 0/9):
- dropped the cur_state flag, so it can be put first
---
kernel/bpf/verifier.c | 19
Hi Pankaj,
On 13 Feb 2024, at 16:55, Zi Yan wrote:
> From: Zi Yan
>
> Hi all,
>
> File folio supports any order and multi-size THP is upstreamed[1], so both
> file and anonymous folios can be >0 order. Currently, split_huge_page()
> only splits a huge page to order-0 pages, but splitting to
[Still a RFC: there are a lot of FIXMEs in the code, and
calling the sleepable timer cb actually crashes.]
[Also using bpf-next as the base tree as there will be conflicting
changes otherwise]
This is crashing, and I have a few questions in the code (look for all
of the FIXMEs), so sending this
On Feb 13 2024, Kumar Kartikeya Dwivedi wrote:
> On Tue, 13 Feb 2024 at 18:46, Benjamin Tissoires wrote:
> >
> > On Feb 12 2024, Alexei Starovoitov wrote:
> > > On Mon, Feb 12, 2024 at 10:21 AM Benjamin Tissoires
> > > wrote:
> > > >
> > > > On Mon, Feb 12, 2024 at 6:46 PM Toke Høiland-Jørgensen
On 14/02/2024 16:20, Sean Christopherson wrote:
On Wed, Feb 14, 2024, Paul Durrant wrote:
On 07/02/2024 04:03, Sean Christopherson wrote:
+s390 folks (question on kvm_is_error_gpa() for ya)
But! kvm_is_error_gpa() already exists, and it very, very sneakily does a
memslot
lookup and checks
On 14/02/2024 16:28, Zi Yan wrote:
> On 14 Feb 2024, at 11:22, Ryan Roberts wrote:
>
>> On 14/02/2024 16:11, Zi Yan wrote:
>>> On 14 Feb 2024, at 5:38, Ryan Roberts wrote:
>>>
On 13/02/2024 21:55, Zi Yan wrote:
> From: Zi Yan
>
> To split a THP to any lower order (except
On 14 Feb 2024, at 5:55, David Hildenbrand wrote:
> On 14.02.24 11:50, Ryan Roberts wrote:
>> On 13/02/2024 22:31, Zi Yan wrote:
>>> On 13 Feb 2024, at 17:21, David Hildenbrand wrote:
>>>
On 13.02.24 22:55, Zi Yan wrote:
> From: Zi Yan
>
> Hi all,
>
> File folio supports
On 14 Feb 2024, at 11:22, Ryan Roberts wrote:
> On 14/02/2024 16:11, Zi Yan wrote:
>> On 14 Feb 2024, at 5:38, Ryan Roberts wrote:
>>
>>> On 13/02/2024 21:55, Zi Yan wrote:
From: Zi Yan
To split a THP to any lower order (except order-1) pages, we need to
reform THPs on
On 14/02/2024 16:19, Zi Yan wrote:
> On 14 Feb 2024, at 5:43, Ryan Roberts wrote:
>
>> On 13/02/2024 21:55, Zi Yan wrote:
>>> From: Zi Yan
>>>
>>> To minimize the number of pages after a huge page truncation, we do not
>>> need to split it all the way down to order-0. The huge page has at most
On 14/02/2024 16:11, Zi Yan wrote:
> On 14 Feb 2024, at 5:38, Ryan Roberts wrote:
>
>> On 13/02/2024 21:55, Zi Yan wrote:
>>> From: Zi Yan
>>>
>>> To split a THP to any lower order (except order-1) pages, we need to
>>> reform THPs on subpages at given order and add page refcount based on the
On Wed, Feb 14, 2024, Paul Durrant wrote:
> On 07/02/2024 04:03, Sean Christopherson wrote:
> > +s390 folks (question on kvm_is_error_gpa() for ya)
> > But! kvm_is_error_gpa() already exists, and it very, very sneakily does a
> > memslot
> > lookup and checks for a valid HVA.
> >
> > s390
On 14 Feb 2024, at 5:43, Ryan Roberts wrote:
> On 13/02/2024 21:55, Zi Yan wrote:
>> From: Zi Yan
>>
>> To minimize the number of pages after a huge page truncation, we do not
>> need to split it all the way down to order-0. The huge page has at most
>> three parts, the part before offset, the
On 14 Feb 2024, at 5:38, Ryan Roberts wrote:
> On 13/02/2024 21:55, Zi Yan wrote:
>> From: Zi Yan
>>
>> To split a THP to any lower order (except order-1) pages, we need to
>> reform THPs on subpages at given order and add page refcount based on the
>> new page order. Also we need to
On 14/02/2024 16:01, Sean Christopherson wrote:
On Tue, Feb 06, 2024, David Woodhouse wrote:
On Tue, 2024-02-06 at 20:03 -0800, Sean Christopherson wrote:
+s390 folks (question on kvm_is_error_gpa() for ya)
On Mon, Jan 15, 2024, Paul Durrant wrote:
@@ -1398,7 +1414,9 @@ void
On Tue, Feb 06, 2024, David Woodhouse wrote:
> On Tue, 2024-02-06 at 20:03 -0800, Sean Christopherson wrote:
> > +s390 folks (question on kvm_is_error_gpa() for ya)
> >
> > On Mon, Jan 15, 2024, Paul Durrant wrote:
> > > @@ -1398,7 +1414,9 @@ void kvm_gpc_deactivate(struct gfn_to_pfn_cache
> > >
On 2/13/24 21:11, Mina Almasry wrote:
On Tue, Feb 13, 2024 at 5:28 AM Pavel Begunkov wrote:
...
A bit of a churn with the padding and nesting net_iov but looks
sturdier. No duplication, and you can just check positions of the
structure instead of per-field NET_IOV_ASSERT_OFFSET, which you
On 14 Feb 2024, at 4:34, David Hildenbrand wrote:
> On 13.02.24 22:55, Zi Yan wrote:
>> From: Zi Yan
>>
>> It adds a new_order parameter to set new page order in page owner.
>> It prepares for upcoming changes to support split huge page to any
>> lower order.
>>
>> Signed-off-by: Zi Yan
>> ---
On 07/02/2024 04:03, Sean Christopherson wrote:
+s390 folks (question on kvm_is_error_gpa() for ya)
On Mon, Jan 15, 2024, Paul Durrant wrote:
@@ -1398,7 +1414,9 @@ void kvm_gpc_deactivate(struct gfn_to_pfn_cache *gpc);
static inline void kvm_gpc_mark_dirty(struct gfn_to_pfn_cache *gpc)
{
On 14 Feb 2024, at 4:14, David Hildenbrand wrote:
> On 13.02.24 22:55, Zi Yan wrote:
>> From: Zi Yan
>>
>> We do not have non power of two pages, using nr is error prone if nr
>> is not power-of-two. Use page order instead.
>>
>> Signed-off-by: Zi Yan
>> ---
>> include/linux/page_owner.h | 8
On 14 Feb 2024, at 4:12, David Hildenbrand wrote:
> On 13.02.24 22:55, Zi Yan wrote:
>> From: Zi Yan
>>
>> We do not have non power of two pages, using nr is error prone if nr
>> is not power-of-two. Use page order instead.
>>
>> Signed-off-by: Zi Yan
>> ---
>> include/linux/memcontrol.h | 4
From: Jeff Xu
selftest for memory sealing change in mmap() and mseal().
Signed-off-by: Jeff Xu
---
tools/testing/selftests/mm/.gitignore |1 +
tools/testing/selftests/mm/Makefile |1 +
tools/testing/selftests/mm/mseal_test.c | 1836 +++
3 files changed, 1838
From: Jeff Xu
Sealing read-only of elf mapping so it can't be changed by mprotect.
Signed-off-by: Jeff Xu
---
tools/testing/selftests/mm/.gitignore | 1 +
tools/testing/selftests/mm/Makefile | 1 +
tools/testing/selftests/mm/seal_elf.c | 183 ++
3 files changed,
From: Jeff Xu
Add documentation for mseal().
Signed-off-by: Jeff Xu
---
Documentation/userspace-api/index.rst | 1 +
Documentation/userspace-api/mseal.rst | 199 ++
2 files changed, 200 insertions(+)
create mode 100644 Documentation/userspace-api/mseal.rst
diff
From: Jeff Xu
The new mseal() is an syscall on 64 bit CPU, and with
following signature:
int mseal(void addr, size_t len, unsigned long flags)
addr/len: memory range.
flags: reserved.
mseal() blocks following operations for the given memory range.
1> Unmapping, moving to another location, and
From: Jeff Xu
Wire up mseal syscall for all architectures.
Signed-off-by: Jeff Xu
---
arch/alpha/kernel/syscalls/syscall.tbl | 1 +
arch/arm/tools/syscall.tbl | 1 +
arch/arm64/include/asm/unistd.h | 2 +-
arch/arm64/include/asm/unistd32.h | 2 ++
From: Jeff Xu
This is V9 version, with removing MAP_SEALABLE and PROT_SEAL
from mmap(), adding perfrmance benchmark and a test
to demo the sealing of read-only memory segment of elf mapping.
--
This patchset proposes a new mseal()
Alexei Starovoitov writes:
> On Tue, Feb 13, 2024 at 08:51:26PM +0100, Toke Høiland-Jørgensen wrote:
>> Kumar Kartikeya Dwivedi writes:
>>
>> > On Tue, 13 Feb 2024 at 18:46, Benjamin Tissoires
>> > wrote:
>> >>
>> >> On Feb 12 2024, Alexei Starovoitov wrote:
>> >> > On Mon, Feb 12, 2024 at
Hi!
I was running some KASan tests with kunit.py recently and noticed that
when KASan is run in hw tags mode, we manually have to add the required
`mte=on` option to kunit_tool's qemu invocation, as the tests will
otherwise crash.
To make life easier, I was looking into ways for kunit.py to
The KVM RISC-V allows Zacas extension for Guest/VM so let us
add this extension to get-reg-list test.
Signed-off-by: Anup Patel
---
tools/testing/selftests/kvm/riscv/get-reg-list.c | 4
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/kvm/riscv/get-reg-list.c
We extend the KVM ISA extension ONE_REG interface to allow KVM
user space to detect and enable Zacas extension for Guest/VM.
Signed-off-by: Anup Patel
---
arch/riscv/include/uapi/asm/kvm.h | 1 +
arch/riscv/kvm/vcpu_onereg.c | 2 ++
2 files changed, 3 insertions(+)
diff --git
The KVM RISC-V allows Ztso extension for Guest/VM so let us
add this extension to get-reg-list test.
Signed-off-by: Anup Patel
---
tools/testing/selftests/kvm/riscv/get-reg-list.c | 4
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/kvm/riscv/get-reg-list.c
We extend the KVM ISA extension ONE_REG interface to allow KVM
user space to detect and enable Ztso extension for Guest/VM.
Signed-off-by: Anup Patel
---
arch/riscv/include/uapi/asm/kvm.h | 1 +
arch/riscv/kvm/vcpu_onereg.c | 2 ++
2 files changed, 3 insertions(+)
diff --git
The SEED CSR access from VS/VU mode (guest) will always trap to
HS-mode (KVM) when Zkr extension is available to the Guest/VM.
We must forward this CSR access to KVM user space so that it
can be emulated based on the method chosen by VMM.
Fixes: f370b4e668f0 ("RISC-V: KVM: Allow scalar crypto
This series extends the KVM RISC-V ONE_REG interface to report few more
ISA extensions namely: Ztso and Zacas. These extensions are already
supported by the HWPROBE interface in Linux-6.8 kernel.
To test these patches, use KVMTOOL from the riscv_more_exts_round2_v1
branch at:
On 14.02.24 11:50, Ryan Roberts wrote:
On 13/02/2024 22:31, Zi Yan wrote:
On 13 Feb 2024, at 17:21, David Hildenbrand wrote:
On 13.02.24 22:55, Zi Yan wrote:
From: Zi Yan
Hi all,
File folio supports any order and multi-size THP is upstreamed[1], so both
file and anonymous folios can be >0
On 13/02/2024 22:31, Zi Yan wrote:
> On 13 Feb 2024, at 17:21, David Hildenbrand wrote:
>
>> On 13.02.24 22:55, Zi Yan wrote:
>>> From: Zi Yan
>>>
>>> Hi all,
>>>
>>> File folio supports any order and multi-size THP is upstreamed[1], so both
>>> file and anonymous folios can be >0 order.
1 - 100 of 108 matches
Mail list logo