All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v1 1/1] keyctl05: improve the dns_res_payload for boundary testing
       [not found] <cover.1704949719.git.pengfei.xu@intel.com>
@ 2024-01-11  5:09 ` Pengfei Xu
  2024-01-11  8:51   ` Petr Vorel
  2024-01-11 10:09   ` Petr Vorel
  0 siblings, 2 replies; 7+ messages in thread
From: Pengfei Xu @ 2024-01-11  5:09 UTC (permalink / raw)
  To: ltp; +Cc: Heng Su, rpalethorpe

Because the following patch will fix the add_key syscall incoming data boundary
size issue, 6 bytes incoming data should pass:
https://lore.kernel.org/all/1784441.1704907412@warthog.procyon.org.uk/
 -> https://lore.kernel.org/all/1850031.1704921100@warthog.procyon.org.uk/
In order to test above boundary incoming data size, change the dns_res_payload
size.

Signed-off-by: Pengfei Xu <pengfei.xu@intel.com>
---
 testcases/kernel/syscalls/keyctl/keyctl05.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/testcases/kernel/syscalls/keyctl/keyctl05.c b/testcases/kernel/syscalls/keyctl/keyctl05.c
index 90cf1ef06..50e78853c 100644
--- a/testcases/kernel/syscalls/keyctl/keyctl05.c
+++ b/testcases/kernel/syscalls/keyctl/keyctl05.c
@@ -199,11 +199,11 @@ static void do_test(unsigned int i)
 	 * We need to pass check in dns_resolver_preparse(),
 	 * give it dummy server list request.
 	 * From v6.7-rc8 commit 1997b3cb4217b09e49659b634c94da47f0340409:
-	 * the incoming data for add_key syscall should be larger than 6 bytes,
-	 * because struct dns_server_list_v1_header without body is 6 bytes.
+	 * the incoming data for add_key syscall should be not less than 6
+	 * bytes, because struct dns_server_list_v1_header is 6 bytes.
+	 * The minimum payload will be tested here for boundary testing.
 	 */
-	static char dns_res_payload[] = { 0x00, 0x00, 0x01, 0xff, 0x00, \
-					  0x00, 0x00 };
+	static char dns_res_payload[] = { 0x00, 0x00, 0x01, 0xff, 0x00, 0x00 };
 
 	switch (i) {
 	case 0:
-- 
2.39.3


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

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

* Re: [LTP] [PATCH v1 1/1] keyctl05: improve the dns_res_payload for boundary testing
  2024-01-11  5:09 ` [LTP] [PATCH v1 1/1] keyctl05: improve the dns_res_payload for boundary testing Pengfei Xu
@ 2024-01-11  8:51   ` Petr Vorel
  2024-01-11  9:12     ` Pengfei Xu
  2024-01-11 10:09   ` Petr Vorel
  1 sibling, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2024-01-11  8:51 UTC (permalink / raw)
  To: Pengfei Xu; +Cc: Heng Su, ltp

> Because the following patch will fix the add_key syscall incoming data boundary
> size issue, 6 bytes incoming data should pass:
> https://lore.kernel.org/all/1784441.1704907412@warthog.procyon.org.uk/
>  -> https://lore.kernel.org/all/1850031.1704921100@warthog.procyon.org.uk/
> In order to test above boundary incoming data size, change the dns_res_payload
> size.

> Signed-off-by: Pengfei Xu <pengfei.xu@intel.com>
> ---
>  testcases/kernel/syscalls/keyctl/keyctl05.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

> diff --git a/testcases/kernel/syscalls/keyctl/keyctl05.c b/testcases/kernel/syscalls/keyctl/keyctl05.c
> index 90cf1ef06..50e78853c 100644
> --- a/testcases/kernel/syscalls/keyctl/keyctl05.c
> +++ b/testcases/kernel/syscalls/keyctl/keyctl05.c
> @@ -199,11 +199,11 @@ static void do_test(unsigned int i)
>  	 * We need to pass check in dns_resolver_preparse(),
>  	 * give it dummy server list request.
>  	 * From v6.7-rc8 commit 1997b3cb4217b09e49659b634c94da47f0340409:
> -	 * the incoming data for add_key syscall should be larger than 6 bytes,
> -	 * because struct dns_server_list_v1_header without body is 6 bytes.
> +	 * the incoming data for add_key syscall should be not less than 6
> +	 * bytes, because struct dns_server_list_v1_header is 6 bytes.
> +	 * The minimum payload will be tested here for boundary testing.
>  	 */
> -	static char dns_res_payload[] = { 0x00, 0x00, 0x01, 0xff, 0x00, \

nit (already pushed): \ is not needed for arrays.

Kind regards,
Petr

> -					  0x00, 0x00 };
> +	static char dns_res_payload[] = { 0x00, 0x00, 0x01, 0xff, 0x00, 0x00 };

>  	switch (i) {
>  	case 0:

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

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

* Re: [LTP] [PATCH v1 1/1] keyctl05: improve the dns_res_payload for boundary testing
  2024-01-11  8:51   ` Petr Vorel
@ 2024-01-11  9:12     ` Pengfei Xu
  0 siblings, 0 replies; 7+ messages in thread
From: Pengfei Xu @ 2024-01-11  9:12 UTC (permalink / raw)
  To: Petr Vorel; +Cc: Heng Su, ltp

On 2024-01-11 at 09:51:52 +0100, Petr Vorel wrote:
> > Because the following patch will fix the add_key syscall incoming data boundary
> > size issue, 6 bytes incoming data should pass:
> > https://lore.kernel.org/all/1784441.1704907412@warthog.procyon.org.uk/
> >  -> https://lore.kernel.org/all/1850031.1704921100@warthog.procyon.org.uk/
> > In order to test above boundary incoming data size, change the dns_res_payload
> > size.
> 
> > Signed-off-by: Pengfei Xu <pengfei.xu@intel.com>
> > ---
> >  testcases/kernel/syscalls/keyctl/keyctl05.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> > diff --git a/testcases/kernel/syscalls/keyctl/keyctl05.c b/testcases/kernel/syscalls/keyctl/keyctl05.c
> > index 90cf1ef06..50e78853c 100644
> > --- a/testcases/kernel/syscalls/keyctl/keyctl05.c
> > +++ b/testcases/kernel/syscalls/keyctl/keyctl05.c
> > @@ -199,11 +199,11 @@ static void do_test(unsigned int i)
> >  	 * We need to pass check in dns_resolver_preparse(),
> >  	 * give it dummy server list request.
> >  	 * From v6.7-rc8 commit 1997b3cb4217b09e49659b634c94da47f0340409:
> > -	 * the incoming data for add_key syscall should be larger than 6 bytes,
> > -	 * because struct dns_server_list_v1_header without body is 6 bytes.
> > +	 * the incoming data for add_key syscall should be not less than 6
> > +	 * bytes, because struct dns_server_list_v1_header is 6 bytes.
> > +	 * The minimum payload will be tested here for boundary testing.
> >  	 */
> > -	static char dns_res_payload[] = { 0x00, 0x00, 0x01, 0xff, 0x00, \
> 
> nit (already pushed): \ is not needed for arrays.

Indeed, thanks for your remind!

Thanks!

> 
> Kind regards,
> Petr
> 
> > -					  0x00, 0x00 };
> > +	static char dns_res_payload[] = { 0x00, 0x00, 0x01, 0xff, 0x00, 0x00 };
> 
> >  	switch (i) {
> >  	case 0:

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

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

* Re: [LTP] [PATCH v1 1/1] keyctl05: improve the dns_res_payload for boundary testing
  2024-01-11  5:09 ` [LTP] [PATCH v1 1/1] keyctl05: improve the dns_res_payload for boundary testing Pengfei Xu
  2024-01-11  8:51   ` Petr Vorel
@ 2024-01-11 10:09   ` Petr Vorel
  2024-01-11 12:24     ` Pengfei Xu
  1 sibling, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2024-01-11 10:09 UTC (permalink / raw)
  To: Pengfei Xu; +Cc: Heng Su, ltp

Hi Xu,

> Because the following patch will fix the add_key syscall incoming data boundary
> size issue, 6 bytes incoming data should pass:
> https://lore.kernel.org/all/1784441.1704907412@warthog.procyon.org.uk/
>  -> https://lore.kernel.org/all/1850031.1704921100@warthog.procyon.org.uk/
> In order to test above boundary incoming data size, change the dns_res_payload
> size.

I'm sorry, I was faster and just fixed \ myself.
Rebasing is trivial, but there was missing commit (already merged and other
things). Thus I have sent v2 under your name (which I actually forget to mark
as v2 :().

https://lore.kernel.org/ltp/20240111100636.1897637-1-pvorel@suse.cz/
https://patchwork.ozlabs.org/project/ltp/patch/20240111100636.1897637-1-pvorel@suse.cz/

Can you please have a look on it?

Kind regards,
Petr

> Signed-off-by: Pengfei Xu <pengfei.xu@intel.com>
> ---
>  testcases/kernel/syscalls/keyctl/keyctl05.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

> diff --git a/testcases/kernel/syscalls/keyctl/keyctl05.c b/testcases/kernel/syscalls/keyctl/keyctl05.c
> index 90cf1ef06..50e78853c 100644
> --- a/testcases/kernel/syscalls/keyctl/keyctl05.c
> +++ b/testcases/kernel/syscalls/keyctl/keyctl05.c
> @@ -199,11 +199,11 @@ static void do_test(unsigned int i)
>  	 * We need to pass check in dns_resolver_preparse(),
>  	 * give it dummy server list request.
>  	 * From v6.7-rc8 commit 1997b3cb4217b09e49659b634c94da47f0340409:
> -	 * the incoming data for add_key syscall should be larger than 6 bytes,
> -	 * because struct dns_server_list_v1_header without body is 6 bytes.
> +	 * the incoming data for add_key syscall should be not less than 6
> +	 * bytes, because struct dns_server_list_v1_header is 6 bytes.
> +	 * The minimum payload will be tested here for boundary testing.
>  	 */
> -	static char dns_res_payload[] = { 0x00, 0x00, 0x01, 0xff, 0x00, \
> -					  0x00, 0x00 };
> +	static char dns_res_payload[] = { 0x00, 0x00, 0x01, 0xff, 0x00, 0x00 };

>  	switch (i) {
>  	case 0:

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

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

* Re: [LTP] [PATCH v1 1/1] keyctl05: improve the dns_res_payload for boundary testing
  2024-01-11 10:09   ` Petr Vorel
@ 2024-01-11 12:24     ` Pengfei Xu
  2024-01-22 18:22       ` Petr Vorel
  0 siblings, 1 reply; 7+ messages in thread
From: Pengfei Xu @ 2024-01-11 12:24 UTC (permalink / raw)
  To: Petr Vorel; +Cc: Heng Su, ltp

Hi Petr,

On 2024-01-11 at 11:09:49 +0100, Petr Vorel wrote:
> Hi Xu,
> 
> > Because the following patch will fix the add_key syscall incoming data boundary
> > size issue, 6 bytes incoming data should pass:
> > https://lore.kernel.org/all/1784441.1704907412@warthog.procyon.org.uk/
> >  -> https://lore.kernel.org/all/1850031.1704921100@warthog.procyon.org.uk/
> > In order to test above boundary incoming data size, change the dns_res_payload
> > size.
> 
> I'm sorry, I was faster and just fixed \ myself.
> Rebasing is trivial, but there was missing commit (already merged and other
> things). Thus I have sent v2 under your name (which I actually forget to mark
> as v2 :().
> 
> https://lore.kernel.org/ltp/20240111100636.1897637-1-pvorel@suse.cz/
> https://patchwork.ozlabs.org/project/ltp/patch/20240111100636.1897637-1-pvorel@suse.cz/
> 
> Can you please have a look on it?

Yes, it's better to add the linux-git acc657692aed and it looks good.
Thanks for your improvment!

Best Regards,
Thanks!

> 
> Kind regards,
> Petr
> 
> > Signed-off-by: Pengfei Xu <pengfei.xu@intel.com>
> > ---
> >  testcases/kernel/syscalls/keyctl/keyctl05.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> > diff --git a/testcases/kernel/syscalls/keyctl/keyctl05.c b/testcases/kernel/syscalls/keyctl/keyctl05.c
> > index 90cf1ef06..50e78853c 100644
> > --- a/testcases/kernel/syscalls/keyctl/keyctl05.c
> > +++ b/testcases/kernel/syscalls/keyctl/keyctl05.c
> > @@ -199,11 +199,11 @@ static void do_test(unsigned int i)
> >  	 * We need to pass check in dns_resolver_preparse(),
> >  	 * give it dummy server list request.
> >  	 * From v6.7-rc8 commit 1997b3cb4217b09e49659b634c94da47f0340409:
> > -	 * the incoming data for add_key syscall should be larger than 6 bytes,
> > -	 * because struct dns_server_list_v1_header without body is 6 bytes.
> > +	 * the incoming data for add_key syscall should be not less than 6
> > +	 * bytes, because struct dns_server_list_v1_header is 6 bytes.
> > +	 * The minimum payload will be tested here for boundary testing.
> >  	 */
> > -	static char dns_res_payload[] = { 0x00, 0x00, 0x01, 0xff, 0x00, \
> > -					  0x00, 0x00 };
> > +	static char dns_res_payload[] = { 0x00, 0x00, 0x01, 0xff, 0x00, 0x00 };
> 
> >  	switch (i) {
> >  	case 0:

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

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

* Re: [LTP] [PATCH v1 1/1] keyctl05: improve the dns_res_payload for boundary testing
  2024-01-11 12:24     ` Pengfei Xu
@ 2024-01-22 18:22       ` Petr Vorel
  2024-01-23  1:23         ` Pengfei Xu
  0 siblings, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2024-01-22 18:22 UTC (permalink / raw)
  To: Pengfei Xu; +Cc: Heng Su, ltp

Hi Xu, all,

fix will be backported to stable series: 6.7, 6.6, 6.1, 5.15 and 5.10,
it's not applicable to 4.19 and 5.4 stable).

Therefore merged. Thanks!

Kind regards,
Petr

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

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

* Re: [LTP] [PATCH v1 1/1] keyctl05: improve the dns_res_payload for boundary testing
  2024-01-22 18:22       ` Petr Vorel
@ 2024-01-23  1:23         ` Pengfei Xu
  0 siblings, 0 replies; 7+ messages in thread
From: Pengfei Xu @ 2024-01-23  1:23 UTC (permalink / raw)
  To: Petr Vorel; +Cc: Heng Su, ltp

Hi Petr,

On 2024-01-22 at 19:22:28 +0100, Petr Vorel wrote:
> Hi Xu, all,
> 
> fix will be backported to stable series: 6.7, 6.6, 6.1, 5.15 and 5.10,
> it's not applicable to 4.19 and 5.4 stable).
> 
> Therefore merged. Thanks!

Great, thank you for your info and remind in community:
https://lore.kernel.org/all/CA+icZUUc_0M_6JU3dZzVqrUUrWJceY1uD8dO2yFMCwtHtkaa_Q@mail.gmail.com/

Best Regards,
Thanks!

> 
> Kind regards,
> Petr

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

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

end of thread, other threads:[~2024-01-23  1:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1704949719.git.pengfei.xu@intel.com>
2024-01-11  5:09 ` [LTP] [PATCH v1 1/1] keyctl05: improve the dns_res_payload for boundary testing Pengfei Xu
2024-01-11  8:51   ` Petr Vorel
2024-01-11  9:12     ` Pengfei Xu
2024-01-11 10:09   ` Petr Vorel
2024-01-11 12:24     ` Pengfei Xu
2024-01-22 18:22       ` Petr Vorel
2024-01-23  1:23         ` Pengfei Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.