On 7/19/2024 10:13 AM, Paul Moore wrote:
On Fri, Jul 12, 2024 at 5:44 PM Paul Moore wrote:
On Thu, Jul 11, 2024 at 7:13 AM Xu Kuohai wrote:
From: Xu Kuohai
LSM BPF prog returning a positive number attached to the hook
file_alloc_security makes kernel panic.
Here is a panic log:
[ 441.235
On 7/18/24 17:49, David Finkel wrote:
I spent some time today attempting to implement this.
Here's a branch on github that compiles, and I think is close to what you
described, but is definitely still a WIP:
https://github.com/torvalds/linux/compare/master...dfinkel:linux:memcg2_memory_peak_fd
On Fri, Jul 12, 2024 at 5:44 PM Paul Moore wrote:
> On Thu, Jul 11, 2024 at 7:13 AM Xu Kuohai wrote:
> > From: Xu Kuohai
> >
> > LSM BPF prog returning a positive number attached to the hook
> > file_alloc_security makes kernel panic.
> >
> > Here is a panic log:
> >
> > [ 441.235774] BUG: kern
On Jul 11, 2024 Xu Kuohai wrote:
>
> To be consistent with most LSM hooks, convert the return value of
> hook audit_rule_match to 0 or a negative error code.
>
> Before:
> - Hook audit_rule_match returns 1 if the rule matches, 0 if it not,
> and negative error code otherwise.
>
> After:
> - H
On Jul 11, 2024 Xu Kuohai wrote:
>
> To be consistent with most LSM hooks, convert the return value of
> hook key_getsecurity to 0 or a negative error code.
>
> Before:
> - Hook key_getsecurity returns length of value on success or a
> negative error code on failure.
>
> After:
> - Hook key_g
On Jul 11, 2024 Xu Kuohai wrote:
>
> To be consistent with most LSM hooks, convert the return value of
> hook getprocattr to 0 or a negative error code.
>
> Before:
> - Hook getprocattr returns length of value on success or a negative
> error code on failure.
>
> After:
> - Hook getprocattr r
On Jul 11, 2024 Xu Kuohai wrote:
>
> To be consistent with most LSM hooks, convert the return value of
> hook setprocattr to 0 or a negative error code.
>
> Before:
> - Hook setprocattr returns the number of bytes written on success
> or a negative error code on failure.
>
> After:
> - Hook s
On Jul 11, 2024 Xu Kuohai wrote:
>
> To be consistent with most LSM hooks, convert the return value of
> hook getselfattr to 0 or a negative error code.
>
> Before:
> - Hook getselfattr returns number of attributes found on success
> or a negative error code on failure.
>
> After:
> - Hook ge
On Jul 11, 2024 Xu Kuohai wrote:
>
> To be consistent with most LSM hooks, convert the return value of
> hook inode_copy_up_xattr to 0 or a negative error code.
>
> Before:
> - Hook inode_copy_up_xattr returns 0 when accepting xattr, 1 when
> discarding xattr, -EOPNOTSUPP if it does not know x
On Jul 11, 2024 Xu Kuohai wrote:
>
> To be consistent with most LSM hooks, convert the return value of
> hook inode_listsecurity to 0 or a negative error code.
>
> Before:
> - Hook inode_listsecurity returns number of bytes used/required on
> success or a negative error code on failure.
>
> A
On Jul 11, 2024 Xu Kuohai wrote:
>
> To be consistent with most LSM hooks, convert the return value of
> hook inode_getsecurity to 0 or a negative error code.
>
> Before:
> - Hook inode_getsecurity returns size of buffer on success or a
> negative error code on failure.
>
> After:
> - Hook in
On Jul 11, 2024 Xu Kuohai wrote:
>
> To be consistent with most LSM hooks, convert the return value of
> hook inode_need_killpriv to 0 or a negative error code.
>
> Before:
> - Both hook inode_need_killpriv and func security_inode_need_killpriv
> return > 0 if security_inode_killpriv is requir
On Jul 11, 2024 Xu Kuohai wrote:
>
> To be consistent with most LSM hooks, convert the return value of
> hook vm_enough_memory to 0 or a negative error code.
>
> Before:
> - Hook vm_enough_memory returns 1 if permission is granted, 0 if not.
> - LSM_RET_DEFAULT(vm_enough_memory_mm) is 1.
>
> Af
Thiago Jung Bauermann writes:
> # # Finishing up...
> # # Thread-4030 exited with error code 255
> # not ok 1 Thread-4030
> # # Thread-4031 exited with error code 255
> # not ok 2 Thread-4031
> # # Thread-4032 exited with error code 255
> # not ok 3 Thread-4032
> # # Thread-4033 exited with error
Mark Brown writes:
> Add a stress test which runs one more process than we have CPUs spinning
> through a very recursive function with frequent syscalls immediately prior
> to return and signals being injected every 100ms. The goal is to flag up
> any scheduling related issues, for example failur
Mark Brown writes:
> Do some testing of the signal handling for GCS, checking that a GCS
> frame has the expected information in it and that the expected signals
> are delivered with invalid operations.
>
> Reviewed-by: Thiago Jung Bauermann
> Signed-off-by: Mark Brown
> ---
> tools/testing/se
On 7/17/24 11:22 PM, Geliang Tang wrote:
From: Geliang Tang
Use local helper make_client() in drop_on_lookup(), drop_on_reuseport()
and run_multi_prog_lookup() instead of using make_socket() + connect().
Then make_socket() and inetaddr_len() can be dropped.
Signed-off-by: Geliang Tang
---
.
Mark Brown writes:
> On Thu, Jul 18, 2024 at 01:14:41PM -0300, Thiago Jung Bauermann wrote:
>
>> In my FVP VM, this test gets a GCS SIGSEGV before running the first test:
>
> Do you have THP enabled? That still doesn't work (I'm expecting it to
> be fixed with -rc1).
I did have it enabled. Afte
On Wed, Jul 17, 2024 at 1:04 PM Johannes Weiner wrote:
>
> On Tue, Jul 16, 2024 at 06:44:11AM -1000, Tejun Heo wrote:
> > Hello,
> >
> > On Tue, Jul 16, 2024 at 03:48:17PM +0200, Michal Hocko wrote:
> > ...
> > > > This behavior is particularly useful for work scheduling systems that
> > > > need
On 7/17/24 11:22 PM, Geliang Tang wrote:
From: Geliang Tang
This patch uses the new helper connect_to_addr_str() in make_client()
instead of using local defined function make_socket() + connect(). This
local function can be dropped latter.
A new parameter "expect_errno" is added for make_clien
On 7/17/24 11:22 PM, Geliang Tang wrote:
diff --git a/tools/testing/selftests/bpf/network_helpers.c
b/tools/testing/selftests/bpf/network_helpers.c
index 15e0e0bb7553..48c27c810db7 100644
--- a/tools/testing/selftests/bpf/network_helpers.c
+++ b/tools/testing/selftests/bpf/network_helpers.c
@@ -
Test that clks registered with 'struct clk_parent_data' work as
intended and can find their parents.
Cc: Christian Marangi
Cc: Brendan Higgins
Reviewed-by: David Gow
Cc: Rae Moar
Signed-off-by: Stephen Boyd
---
drivers/clk/Kconfig | 2 +
drivers/clk/Makefile
Test that the fixed rate basic type clk works as intended.
Cc: Brendan Higgins
Cc: David Gow
Cc: Rae Moar
Signed-off-by: Stephen Boyd
---
drivers/clk/.kunitconfig | 2 +
drivers/clk/Kconfig| 9 +
drivers/clk/Makefile | 2 +
Unit tests are more ergonomic and simpler to understand if they don't
have to hoist a bunch of code into the test harness init and exit
functions. Add some test managed wrappers for the clk APIs so that clk
unit tests can write more code in the actual test and less code in the
harness.
Only add AP
Introduce KUnit resource wrappers around platform_driver_register(),
platform_device_alloc(), and platform_device_add() so that test authors
can register platform drivers/devices from their tests and have the
drivers/devices automatically be unregistered when the test is done.
This makes test setu
Test the KUnit test managed overlay APIs. Confirm that platform devices
are created and destroyed properly. This provides us confidence that the
test managed APIs work correctly and can be relied upon to provide tests
with fake platform devices and device nodes via overlays compiled into
the kernel
Add the vendor prefix "test" to reserve a vendor prefix for bindings
that are purely for testing device tree code. This allows test code to
write bindings that can be checked by the schema validator.
Reviewed-by: Rob Herring
Reviewed-by: David Gow
Cc: Krzysztof Kozlowski
Cc: Conor Dooley
Signe
Add test managed wrappers for of_overlay_apply() that automatically
removes the overlay when the test is finished. This API is intended for
use by KUnit tests that test code which relies on 'struct device_node's
and of_*() APIs.
KUnit tests will call of_overlay_apply_kunit() to load an overlay tha
On July 12, 2024 8:12:51 AM PDT, Sean Christopherson wrote:
>On Wed, Jul 10, 2024, Xin3 Li wrote:
>> > On Wed, Feb 07, 2024, Xin Li wrote:
>> > > Switch MSR_IA32_FRED_RSP0 between host and guest in
>> > > vmx_prepare_switch_to_{host,guest}().
>> > >
>> > > MSR_IA32_FRED_RSP0 is used during ring 3
We'd like to apply overlays to the root node in KUnit so we can test
platform devices created as children of the root node.
On some architectures (powerpc), the root node isn't marked with
OF_POPULATED_BUS. If an overlay tries to modify the root node on these
platforms it will fail, while on other
This patch series adds unit tests for the clk fixed rate basic type and
the clk registration functions that use struct clk_parent_data. To get
there, we add support for loading device tree overlays onto the live DTB
along with probing platform drivers to bind to device nodes in the
overlays. With t
> > thus we need to:
> >
> > 1) *always* save guest FRED RSP0 in vmx_prepare_switch_to_host().
> >
> > 2) *always* restore guest FRED RSP0 in vmx_prepare_switch_to_guest(),
> >because sometimes context switches happen but the CPU does NOT
> >return to user mode thus the user return framewor
On 7/18/24 4:51 AM, Lin Yikai wrote:
v1:
- patch 2:
- [1/2] add bpf_file_d_path helper
- [2/2] add selftest to it
Hi, we are looking to add the "bpf_file_d_path" helper,
used to retrieve the path from a struct file object.
bpf_file_d_path(void *file, char *dst, u32 size);
On Thu, Jul 18, 2024 at 01:14:41PM -0300, Thiago Jung Bauermann wrote:
> In my FVP VM, this test gets a GCS SIGSEGV before running the first test:
Do you have THP enabled? That still doesn't work (I'm expecting it to
be fixed with -rc1).
signature.asc
Description: PGP signature
Mark Brown writes:
> There are things like threads which nolibc struggles with which we want
> to add coverage for, and the ABI allows us to test most of these even if
> libc itself does not understand GCS so add a test application built
> using the system libc.
>
> Reviewed-by: Thiago Jung Bauer
On 7/18/24 05:32, Muhammad Usama Anjum wrote:
Changes since v1:
- Correct the description of patches with what improvements they are
bringing and why they are required
Changes since v2:
- Update descriptions of patches and add output before/after
Muhammad Usama Anjum (4):
selftests: x86:
On 7/18/24 05:32, Muhammad Usama Anjum wrote:
Removes manual counting of pass and fail tests. This increases readability
of tests, but also improves maintainability of the tests. Print logs in
standard format (without [RUN], [OK] tags)
Signed-off-by: Muhammad Usama Anjum
---
Changes since v1:
-
On Tue, Jul 16, 2024 at 09:49:12AM +0530, Dev Jain wrote:
>
> On 7/13/24 04:47, Remington Brasga wrote:
> > The string passed to ksft_test_result_skip is missing the `type_name`
> >
> > Signed-off-by: Remington Brasga
> > ---
> > clang-tidy reported clang-diagnostic-format-insufficient-args warn
On Tue, 16 Jul 2024 16:47:58 +0200,
Mark Brown wrote:
>
> The first patch fixes unstable naming of tests due to probe ordering not
> being stable, the second just provides a bit more information.
>
> Signed-off-by: Mark Brown
> ---
> Changes in v2:
> - Switch to using ID rather than longame.
> -
On Wed, Jul 17, 2024, Xin3 Li wrote:
> > > > > E.g. if it's somewhere in task_struct, then kvm_on_user_return()
> > > > > would restore the current task's desired RSP0.
> > > >
> > > > So you're suggesting to extend the framework to allow per task
> > > > constants?
> > >
> > > Yeah, or more likel
Hi, Adding test for bpf_file_d_path helper.
It passed the test in my environment using QEMU
(./test_progs -t file_d_path)
Below are some partial results:
'''
+ [ -x /etc/rcS.d/S50-startup ]
+ /etc/rcS.d/S50-startup
./test_progs -t file_d_path
Summary: 1/0 PASSED, 0 SKIPPED, 0 FAILED
'''
Add the "bpf_file_d_path" helper function
to retrieve the path from a struct file object.
But there is no need to include vmlinux.h
or reference the definition of struct file.
Additionally, update the bpf.h tools uapi header.
Signed-off-by: Lin Yikai
---
include/uapi/linux/bpf.h | 20
v1:
- patch 2:
- [1/2] add bpf_file_d_path helper
- [2/2] add selftest to it
Hi, we are looking to add the "bpf_file_d_path" helper,
used to retrieve the path from a struct file object.
bpf_file_d_path(void *file, char *dst, u32 size);
It's worth noting that the "file" par
Remove the manual pass/fail tests counting and use kselftests helpers
which improves readability as well. Print details about errno if error
occurs and also print logs in standard format.
Signed-off-by: Muhammad Usama Anjum
---
Changes since v1:
- correct description of the patch
Changes since v
Add the test skip support instead of returning success at skip time for
the kselftest runner script to understand correct exit status. Add logs
to print details about errno if error occurs. Needless to say, all of
this improves readability and maintainability.
Signed-off-by: Muhammad Usama Anjum
Correct the skip, pass and fail return codes. Otherwise the test always
return 0. After the chaanges, correct number of stats about passed or
failed tests is being returned. Also print logs in standard format.
Signed-off-by: Muhammad Usama Anjum
---
Changes since v1:
- correct description of the
Removes manual counting of pass and fail tests. This increases readability
of tests, but also improves maintainability of the tests. Print logs in
standard format (without [RUN], [OK] tags)
Signed-off-by: Muhammad Usama Anjum
---
Changes since v1:
- correct description of the patch
Changes since
Changes since v1:
- Correct the description of patches with what improvements they are
bringing and why they are required
Changes since v2:
- Update descriptions of patches and add output before/after
Muhammad Usama Anjum (4):
selftests: x86: check_initial_reg_state: remove manual counting an
> From: Liu, Yi L
> Sent: Friday, June 28, 2024 5:06 PM
>
> @@ -3289,7 +3290,20 @@ static int __iommu_set_group_pasid(struct
> iommu_domain *domain,
>
> if (device == last_gdev)
> break;
> - ops->remove_dev_pasid(device->dev, pasid, domain);
> +
On Wed 17-07-24 16:44:53, Johannes Weiner wrote:
[...]
> The problem is that once global resetting is allowed, it makes the
> number reported in memory.peak unreliable for everyone. You just don't
> know, and can't tell, if somebody wrote to it recently. It's not too
> much of a leap to say this br
On 7/17/24 3:01 AM, Shuah Khan wrote:
> On 7/12/24 01:30, Muhammad Usama Anjum wrote:
>> Return correct exit status, KSFT_SKIP if the pre-conditions aren't met.
>> Return KSFT_FAIL if error occurs. Use ksft_finished() which will
>> compmare the total planned tests with passed tests to return the ex
51 matches
Mail list logo