public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v1] mseal02: Handle multiple errnos for 32-bit compat mode
@ 2026-01-28  0:28 Wei Gao via ltp
  2026-02-18 13:34 ` Andrea Cervesato via ltp
  2026-02-26  2:25 ` [LTP] [PATCH v2] " Wei Gao via ltp
  0 siblings, 2 replies; 12+ messages in thread
From: Wei Gao via ltp @ 2026-01-28  0:28 UTC (permalink / raw)
  To: ltp

In 32-bit compat mode, the overflow_size (calculated using a 32-bit ULONG_MAX)
does not cause a 64-bit integer wrap-around when added to the start address.
Consequently, the kernel see valid range that points to unmapped space, returning
ENOMEM instead of the expected EINVAL.

Signed-off-by: Wei Gao <wegao@suse.com>
---
 testcases/kernel/syscalls/mseal/mseal02.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/testcases/kernel/syscalls/mseal/mseal02.c b/testcases/kernel/syscalls/mseal/mseal02.c
index e11d7dbf4..d941f6c40 100644
--- a/testcases/kernel/syscalls/mseal/mseal02.c
+++ b/testcases/kernel/syscalls/mseal/mseal02.c
@@ -21,6 +21,8 @@
 #include "tst_test.h"
 #include "lapi/syscalls.h"
 
+#define MAX_ERRNOS 5
+
 static void *start_addr, *unaligned_start_addr, *unallocated_start_addr, *unallocated_end_addr;
 static size_t page_size, twopages_size, fourpages_size, overflow_size;
 
@@ -28,22 +30,22 @@ static struct tcase {
 	void **addr;
 	size_t *len;
 	unsigned long flags;
-	int exp_err;
+	int exp_errs[MAX_ERRNOS];
 } tcases[] = {
-	{&start_addr, &page_size, ULONG_MAX, EINVAL},
-	{&unaligned_start_addr, &page_size, 0, EINVAL},
-	{&start_addr, &overflow_size, 0, EINVAL},
-	{&unallocated_start_addr, &twopages_size, 0, ENOMEM},
-	{&unallocated_end_addr, &twopages_size, 0, ENOMEM},
-	{&start_addr, &fourpages_size, 0, ENOMEM},
+	{&start_addr, &page_size, ULONG_MAX, {EINVAL}},
+	{&unaligned_start_addr, &page_size, 0, {EINVAL}},
+	{&start_addr, &overflow_size, 0, {EINVAL, ENOMEM}},
+	{&unallocated_start_addr, &twopages_size, 0, {ENOMEM}},
+	{&unallocated_end_addr, &twopages_size, 0, {ENOMEM}},
+	{&start_addr, &fourpages_size, 0, {ENOMEM}},
 };
 
 static void run(unsigned int n)
 {
 	struct tcase *tc = &tcases[n];
 
-	TST_EXP_FAIL(tst_syscall(__NR_mseal, *tc->addr, *tc->len, tc->flags), tc->exp_err,
-		"mseal(%p, %lu, %lu)", *tc->addr, *tc->len, tc->flags);
+	TST_EXP_FAIL2_ARR(tst_syscall(__NR_mseal, *tc->addr, *tc->len, tc->flags),
+		tc->exp_errs, MAX_ERRNOS, "mseal(%p, %lu, %lu)", *tc->addr, *tc->len, tc->flags);
 }
 
 static void setup(void)
-- 
2.52.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [LTP] [PATCH v1] mseal02: Handle multiple errnos for 32-bit compat mode
  2026-01-28  0:28 [LTP] [PATCH v1] mseal02: Handle multiple errnos for 32-bit compat mode Wei Gao via ltp
@ 2026-02-18 13:34 ` Andrea Cervesato via ltp
  2026-02-19 11:37   ` Cyril Hrubis
  2026-02-26  2:25 ` [LTP] [PATCH v2] " Wei Gao via ltp
  1 sibling, 1 reply; 12+ messages in thread
From: Andrea Cervesato via ltp @ 2026-02-18 13:34 UTC (permalink / raw)
  To: Wei Gao, ltp

Hi!

On Wed Jan 28, 2026 at 1:28 AM CET, Wei Gao via ltp wrote:
> In 32-bit compat mode, the overflow_size (calculated using a 32-bit ULONG_MAX)
> does not cause a 64-bit integer wrap-around when added to the start address.
> Consequently, the kernel see valid range that points to unmapped space, returning
> ENOMEM instead of the expected EINVAL.
>
> Signed-off-by: Wei Gao <wegao@suse.com>
> ---
>  testcases/kernel/syscalls/mseal/mseal02.c | 20 +++++++++++---------
>  1 file changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/mseal/mseal02.c b/testcases/kernel/syscalls/mseal/mseal02.c
> index e11d7dbf4..d941f6c40 100644
> --- a/testcases/kernel/syscalls/mseal/mseal02.c
> +++ b/testcases/kernel/syscalls/mseal/mseal02.c
> @@ -21,6 +21,8 @@
>  #include "tst_test.h"
>  #include "lapi/syscalls.h"
>  
> +#define MAX_ERRNOS 5
> +
>  static void *start_addr, *unaligned_start_addr, *unallocated_start_addr, *unallocated_end_addr;
>  static size_t page_size, twopages_size, fourpages_size, overflow_size;
>  
> @@ -28,22 +30,22 @@ static struct tcase {
>  	void **addr;
>  	size_t *len;
>  	unsigned long flags;
> -	int exp_err;
> +	int exp_errs[MAX_ERRNOS];
>  } tcases[] = {
> -	{&start_addr, &page_size, ULONG_MAX, EINVAL},
> -	{&unaligned_start_addr, &page_size, 0, EINVAL},
> -	{&start_addr, &overflow_size, 0, EINVAL},
> -	{&unallocated_start_addr, &twopages_size, 0, ENOMEM},
> -	{&unallocated_end_addr, &twopages_size, 0, ENOMEM},
> -	{&start_addr, &fourpages_size, 0, ENOMEM},
> +	{&start_addr, &page_size, ULONG_MAX, {EINVAL}},
> +	{&unaligned_start_addr, &page_size, 0, {EINVAL}},
> +	{&start_addr, &overflow_size, 0, {EINVAL, ENOMEM}},
> +	{&unallocated_start_addr, &twopages_size, 0, {ENOMEM}},
> +	{&unallocated_end_addr, &twopages_size, 0, {ENOMEM}},
> +	{&start_addr, &fourpages_size, 0, {ENOMEM}},
>  };
>  
>  static void run(unsigned int n)
>  {
>  	struct tcase *tc = &tcases[n];
>  
> -	TST_EXP_FAIL(tst_syscall(__NR_mseal, *tc->addr, *tc->len, tc->flags), tc->exp_err,
> -		"mseal(%p, %lu, %lu)", *tc->addr, *tc->len, tc->flags);
> +	TST_EXP_FAIL2_ARR(tst_syscall(__NR_mseal, *tc->addr, *tc->len, tc->flags),
> +		tc->exp_errs, MAX_ERRNOS, "mseal(%p, %lu, %lu)", *tc->addr, *tc->len, tc->flags);
>  }
>  
>  static void setup(void)

Instead of checking multiple errno, you should pass the right type
according to the architecture.

-- 
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [LTP] [PATCH v1] mseal02: Handle multiple errnos for 32-bit compat mode
  2026-02-18 13:34 ` Andrea Cervesato via ltp
@ 2026-02-19 11:37   ` Cyril Hrubis
  0 siblings, 0 replies; 12+ messages in thread
From: Cyril Hrubis @ 2026-02-19 11:37 UTC (permalink / raw)
  To: Andrea Cervesato; +Cc: ltp

Hi!
> > In 32-bit compat mode, the overflow_size (calculated using a 32-bit ULONG_MAX)
> > does not cause a 64-bit integer wrap-around when added to the start address.
> > Consequently, the kernel see valid range that points to unmapped space, returning
> > ENOMEM instead of the expected EINVAL.
> >
> > Signed-off-by: Wei Gao <wegao@suse.com>
> > ---
> >  testcases/kernel/syscalls/mseal/mseal02.c | 20 +++++++++++---------
> >  1 file changed, 11 insertions(+), 9 deletions(-)
> >
> > diff --git a/testcases/kernel/syscalls/mseal/mseal02.c b/testcases/kernel/syscalls/mseal/mseal02.c
> > index e11d7dbf4..d941f6c40 100644
> > --- a/testcases/kernel/syscalls/mseal/mseal02.c
> > +++ b/testcases/kernel/syscalls/mseal/mseal02.c
> > @@ -21,6 +21,8 @@
> >  #include "tst_test.h"
> >  #include "lapi/syscalls.h"
> >  
> > +#define MAX_ERRNOS 5
> > +
> >  static void *start_addr, *unaligned_start_addr, *unallocated_start_addr, *unallocated_end_addr;
> >  static size_t page_size, twopages_size, fourpages_size, overflow_size;
> >  
> > @@ -28,22 +30,22 @@ static struct tcase {
> >  	void **addr;
> >  	size_t *len;
> >  	unsigned long flags;
> > -	int exp_err;
> > +	int exp_errs[MAX_ERRNOS];
> >  } tcases[] = {
> > -	{&start_addr, &page_size, ULONG_MAX, EINVAL},
> > -	{&unaligned_start_addr, &page_size, 0, EINVAL},
> > -	{&start_addr, &overflow_size, 0, EINVAL},
> > -	{&unallocated_start_addr, &twopages_size, 0, ENOMEM},
> > -	{&unallocated_end_addr, &twopages_size, 0, ENOMEM},
> > -	{&start_addr, &fourpages_size, 0, ENOMEM},
> > +	{&start_addr, &page_size, ULONG_MAX, {EINVAL}},
> > +	{&unaligned_start_addr, &page_size, 0, {EINVAL}},
> > +	{&start_addr, &overflow_size, 0, {EINVAL, ENOMEM}},
> > +	{&unallocated_start_addr, &twopages_size, 0, {ENOMEM}},
> > +	{&unallocated_end_addr, &twopages_size, 0, {ENOMEM}},
> > +	{&start_addr, &fourpages_size, 0, {ENOMEM}},
> >  };
> >  
> >  static void run(unsigned int n)
> >  {
> >  	struct tcase *tc = &tcases[n];
> >  
> > -	TST_EXP_FAIL(tst_syscall(__NR_mseal, *tc->addr, *tc->len, tc->flags), tc->exp_err,
> > -		"mseal(%p, %lu, %lu)", *tc->addr, *tc->len, tc->flags);
> > +	TST_EXP_FAIL2_ARR(tst_syscall(__NR_mseal, *tc->addr, *tc->len, tc->flags),
> > +		tc->exp_errs, MAX_ERRNOS, "mseal(%p, %lu, %lu)", *tc->addr, *tc->len, tc->flags);
> >  }
> >  
> >  static void setup(void)
> 
> Instead of checking multiple errno, you should pass the right type
> according to the architecture.

That would be slightly more complex here since the problem happens only
in compat mode, which can be only detected at runtime with
tst_is_compat_mode(). We would have to call that in the test setup and
adjust expectations accordinlgy.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [LTP] [PATCH v2] mseal02: Handle multiple errnos for 32-bit compat mode
  2026-01-28  0:28 [LTP] [PATCH v1] mseal02: Handle multiple errnos for 32-bit compat mode Wei Gao via ltp
  2026-02-18 13:34 ` Andrea Cervesato via ltp
@ 2026-02-26  2:25 ` Wei Gao via ltp
  2026-03-20 14:35   ` Andrea Cervesato via ltp
                     ` (2 more replies)
  1 sibling, 3 replies; 12+ messages in thread
From: Wei Gao via ltp @ 2026-02-26  2:25 UTC (permalink / raw)
  To: ltp

In 32-bit compat mode, the overflow_size (calculated using a 32-bit ULONG_MAX)
does not cause a 64-bit integer wrap-around when added to the start address.
Consequently, the kernel see valid range that points to unmapped space, returning
ENOMEM instead of the expected EINVAL.

Signed-off-by: Wei Gao <wegao@suse.com>
---
 testcases/kernel/syscalls/mseal/mseal02.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/testcases/kernel/syscalls/mseal/mseal02.c b/testcases/kernel/syscalls/mseal/mseal02.c
index e11d7dbf4..7e0172bc3 100644
--- a/testcases/kernel/syscalls/mseal/mseal02.c
+++ b/testcases/kernel/syscalls/mseal/mseal02.c
@@ -58,6 +58,9 @@ static void setup(void)
 	SAFE_MUNMAP(start_addr + twopages_size, page_size);
 	unallocated_start_addr = start_addr + twopages_size;
 	unallocated_end_addr = start_addr + page_size;
+
+	if (tst_is_compat_mode())
+		tcases[2].exp_err = ENOMEM;
 }
 
 static void cleanup(void)
-- 
2.52.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [LTP] [PATCH v2] mseal02: Handle multiple errnos for 32-bit compat mode
  2026-02-26  2:25 ` [LTP] [PATCH v2] " Wei Gao via ltp
@ 2026-03-20 14:35   ` Andrea Cervesato via ltp
  2026-03-20 15:09   ` Petr Vorel
  2026-03-23  6:08   ` [LTP] [PATCH v3] " Wei Gao via ltp
  2 siblings, 0 replies; 12+ messages in thread
From: Andrea Cervesato via ltp @ 2026-03-20 14:35 UTC (permalink / raw)
  To: Wei Gao; +Cc: ltp

Hi Wei,

LGTM

Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [LTP] [PATCH v2] mseal02: Handle multiple errnos for 32-bit compat mode
  2026-02-26  2:25 ` [LTP] [PATCH v2] " Wei Gao via ltp
  2026-03-20 14:35   ` Andrea Cervesato via ltp
@ 2026-03-20 15:09   ` Petr Vorel
  2026-03-20 17:27     ` Petr Vorel
  2026-03-23  6:08   ` [LTP] [PATCH v3] " Wei Gao via ltp
  2 siblings, 1 reply; 12+ messages in thread
From: Petr Vorel @ 2026-03-20 15:09 UTC (permalink / raw)
  To: Wei Gao; +Cc: ltp

Hi all,

> In 32-bit compat mode, the overflow_size (calculated using a 32-bit ULONG_MAX)
> does not cause a 64-bit integer wrap-around when added to the start address.
> Consequently, the kernel see valid range that points to unmapped space, returning
> ENOMEM instead of the expected EINVAL.

Also LGTM.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [LTP] [PATCH v2] mseal02: Handle multiple errnos for 32-bit compat mode
  2026-03-20 15:09   ` Petr Vorel
@ 2026-03-20 17:27     ` Petr Vorel
  0 siblings, 0 replies; 12+ messages in thread
From: Petr Vorel @ 2026-03-20 17:27 UTC (permalink / raw)
  To: Wei Gao, ltp, Andrea Cervesato

Hi Wei, all,

> Hi all,

> > In 32-bit compat mode, the overflow_size (calculated using a 32-bit ULONG_MAX)
> > does not cause a 64-bit integer wrap-around when added to the start address.
> > Consequently, the kernel see valid range that points to unmapped space, returning
> > ENOMEM instead of the expected EINVAL.

> Also LGTM.

> Reviewed-by: Petr Vorel <pvorel@suse.cz>

> +	if (tst_is_compat_mode())
> +		tcases[2].exp_err = ENOMEM;

I was about to merge, but thinking about it twice, it'd make sense instead
hardcoding index 2 (we talked about it in the past, that hardcoding indexes can
cause problems the future) to add attribute .check_kver, similar way Jan Polensky
did in dcf0c145d9 ("setxattr02: Adapt test for kernel 7.1.0+ socket xattr support").

Could you please modify it in v3?

Kind regards,
Petr

[1] https://github.com/linux-test-project/ltp/commit/dcf0c145d90531b919e633bb3f481f59a867aa06

> Kind regards,
> Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [LTP] [PATCH v3] mseal02: Handle multiple errnos for 32-bit compat mode
  2026-02-26  2:25 ` [LTP] [PATCH v2] " Wei Gao via ltp
  2026-03-20 14:35   ` Andrea Cervesato via ltp
  2026-03-20 15:09   ` Petr Vorel
@ 2026-03-23  6:08   ` Wei Gao via ltp
  2026-03-23 13:14     ` Cyril Hrubis
                       ` (3 more replies)
  2 siblings, 4 replies; 12+ messages in thread
From: Wei Gao via ltp @ 2026-03-23  6:08 UTC (permalink / raw)
  To: ltp

In 32-bit compat mode, the overflow_size (calculated using a 32-bit ULONG_MAX)
does not cause a 64-bit integer wrap-around when added to the start address.
Consequently, the kernel see valid range that points to unmapped space, returning
ENOMEM instead of the expected EINVAL.

Signed-off-by: Wei Gao <wegao@suse.com>
---
v2->v3: Add compat_err replace hardcoding index similar with dcf0c145d9
("setxattr02: Adapt test for kernel 7.1.0+ socket xattr support").

 testcases/kernel/syscalls/mseal/mseal02.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/testcases/kernel/syscalls/mseal/mseal02.c b/testcases/kernel/syscalls/mseal/mseal02.c
index e11d7dbf4..5874e108a 100644
--- a/testcases/kernel/syscalls/mseal/mseal02.c
+++ b/testcases/kernel/syscalls/mseal/mseal02.c
@@ -29,20 +29,22 @@ static struct tcase {
 	size_t *len;
 	unsigned long flags;
 	int exp_err;
+	int compat_err;
 } tcases[] = {
-	{&start_addr, &page_size, ULONG_MAX, EINVAL},
-	{&unaligned_start_addr, &page_size, 0, EINVAL},
-	{&start_addr, &overflow_size, 0, EINVAL},
-	{&unallocated_start_addr, &twopages_size, 0, ENOMEM},
-	{&unallocated_end_addr, &twopages_size, 0, ENOMEM},
-	{&start_addr, &fourpages_size, 0, ENOMEM},
+	{.addr = &start_addr, .len = &page_size, .flags = ULONG_MAX, .exp_err = EINVAL},
+	{.addr = &unaligned_start_addr, .len = &page_size, .flags = 0, .exp_err = EINVAL},
+	{.addr = &start_addr, .len = &overflow_size, .flags = 0, .exp_err = EINVAL, .compat_err = ENOMEM},
+	{.addr = &unallocated_start_addr, .len = &twopages_size, .flags = 0, .exp_err = ENOMEM},
+	{.addr = &unallocated_end_addr, .len = &twopages_size, .flags = 0, .exp_err = ENOMEM},
+	{.addr = &start_addr, .len = &fourpages_size, .flags = 0, .exp_err = ENOMEM},
 };
 
 static void run(unsigned int n)
 {
 	struct tcase *tc = &tcases[n];
+	int exp_err = tc->compat_err && tst_is_compat_mode() ? tc->compat_err : tc->exp_err;
 
-	TST_EXP_FAIL(tst_syscall(__NR_mseal, *tc->addr, *tc->len, tc->flags), tc->exp_err,
+	TST_EXP_FAIL(tst_syscall(__NR_mseal, *tc->addr, *tc->len, tc->flags), exp_err,
 		"mseal(%p, %lu, %lu)", *tc->addr, *tc->len, tc->flags);
 }
 
-- 
2.52.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [LTP] [PATCH v3] mseal02: Handle multiple errnos for 32-bit compat mode
  2026-03-23  6:08   ` [LTP] [PATCH v3] " Wei Gao via ltp
@ 2026-03-23 13:14     ` Cyril Hrubis
  2026-03-26 10:07     ` Andrea Cervesato via ltp
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 12+ messages in thread
From: Cyril Hrubis @ 2026-03-23 13:14 UTC (permalink / raw)
  To: Wei Gao; +Cc: ltp

Hi!
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [LTP] [PATCH v3] mseal02: Handle multiple errnos for 32-bit compat mode
  2026-03-23  6:08   ` [LTP] [PATCH v3] " Wei Gao via ltp
  2026-03-23 13:14     ` Cyril Hrubis
@ 2026-03-26 10:07     ` Andrea Cervesato via ltp
  2026-03-26 10:08     ` Andrea Cervesato via ltp
  2026-03-26 10:43     ` Petr Vorel
  3 siblings, 0 replies; 12+ messages in thread
From: Andrea Cervesato via ltp @ 2026-03-26 10:07 UTC (permalink / raw)
  To: Wei Gao; +Cc: ltp

LGTM

Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [LTP] [PATCH v3] mseal02: Handle multiple errnos for 32-bit compat mode
  2026-03-23  6:08   ` [LTP] [PATCH v3] " Wei Gao via ltp
  2026-03-23 13:14     ` Cyril Hrubis
  2026-03-26 10:07     ` Andrea Cervesato via ltp
@ 2026-03-26 10:08     ` Andrea Cervesato via ltp
  2026-03-26 10:43     ` Petr Vorel
  3 siblings, 0 replies; 12+ messages in thread
From: Andrea Cervesato via ltp @ 2026-03-26 10:08 UTC (permalink / raw)
  To: Wei Gao; +Cc: ltp

Merged, thanks!

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [LTP] [PATCH v3] mseal02: Handle multiple errnos for 32-bit compat mode
  2026-03-23  6:08   ` [LTP] [PATCH v3] " Wei Gao via ltp
                       ` (2 preceding siblings ...)
  2026-03-26 10:08     ` Andrea Cervesato via ltp
@ 2026-03-26 10:43     ` Petr Vorel
  3 siblings, 0 replies; 12+ messages in thread
From: Petr Vorel @ 2026-03-26 10:43 UTC (permalink / raw)
  To: Wei Gao; +Cc: ltp

Hi all,

> +++ b/testcases/kernel/syscalls/mseal/mseal02.c
> @@ -29,20 +29,22 @@ static struct tcase {
>  	size_t *len;
>  	unsigned long flags;
>  	int exp_err;
> +	int compat_err;
>  } tcases[] = {
> -	{&start_addr, &page_size, ULONG_MAX, EINVAL},
> -	{&unaligned_start_addr, &page_size, 0, EINVAL},
> -	{&start_addr, &overflow_size, 0, EINVAL},
> -	{&unallocated_start_addr, &twopages_size, 0, ENOMEM},
> -	{&unallocated_end_addr, &twopages_size, 0, ENOMEM},
> -	{&start_addr, &fourpages_size, 0, ENOMEM},
> +	{.addr = &start_addr, .len = &page_size, .flags = ULONG_MAX, .exp_err = EINVAL},
> +	{.addr = &unaligned_start_addr, .len = &page_size, .flags = 0, .exp_err = EINVAL},
> +	{.addr = &start_addr, .len = &overflow_size, .flags = 0, .exp_err = EINVAL, .compat_err = ENOMEM},
> +	{.addr = &unallocated_start_addr, .len = &twopages_size, .flags = 0, .exp_err = ENOMEM},
> +	{.addr = &unallocated_end_addr, .len = &twopages_size, .flags = 0, .exp_err = ENOMEM},
> +	{.addr = &start_addr, .len = &fourpages_size, .flags = 0, .exp_err = ENOMEM},

FYI I remove useless .flags = 0, in following commit.
55e16df13a ("mseal02: Remove useless zero initialization")
(The default zero initialization can shorten code in some cases.)

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-03-26 10:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-28  0:28 [LTP] [PATCH v1] mseal02: Handle multiple errnos for 32-bit compat mode Wei Gao via ltp
2026-02-18 13:34 ` Andrea Cervesato via ltp
2026-02-19 11:37   ` Cyril Hrubis
2026-02-26  2:25 ` [LTP] [PATCH v2] " Wei Gao via ltp
2026-03-20 14:35   ` Andrea Cervesato via ltp
2026-03-20 15:09   ` Petr Vorel
2026-03-20 17:27     ` Petr Vorel
2026-03-23  6:08   ` [LTP] [PATCH v3] " Wei Gao via ltp
2026-03-23 13:14     ` Cyril Hrubis
2026-03-26 10:07     ` Andrea Cervesato via ltp
2026-03-26 10:08     ` Andrea Cervesato via ltp
2026-03-26 10:43     ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox