All of lore.kernel.org
 help / color / mirror / Atom feed
* [rocko/master/ti2018.03] [PATCH] iproute2: add patches to fix segmentation fault for prp
@ 2018-09-28 16:07 Hongmei Gou
  2018-09-28 17:18 ` Denys Dmytriyenko
  0 siblings, 1 reply; 2+ messages in thread
From: Hongmei Gou @ 2018-09-28 16:07 UTC (permalink / raw)
  To: meta-arago; +Cc: Hongmei Gou, Murali Karicheri

When ip -d link command is executed with prp interface setup,
it encounters a segmentation fault. This causes snmpwalk command
to time out since it uses the above command to list the
interfaces. This patch fixes the issue.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hongmei Gou <a0271529@ti.com>
---
 ...able-display-for-vlan-params-in-ip-d-link.patch | 63 ++++++++++++++++++++++
 .../iproute2/0002-prp-invalid-maxattr.patch        | 29 ++++++++++
 .../iproute2/iproute2_4.11.0.bbappend              |  4 +-
 3 files changed, 95 insertions(+), 1 deletion(-)
 create mode 100644 meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch
 create mode 100644 meta-arago-distro/recipes-connectivity/iproute2/iproute2/0002-prp-invalid-maxattr.patch

diff --git a/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch b/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch
new file mode 100644
index 0000000..cb5a6b9
--- /dev/null
+++ b/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch
@@ -0,0 +1,63 @@
+From b893b6e581785fd4a458d5cf1a8178e858636db2 Mon Sep 17 00:00:00 2001
+From: Murali Karicheri <m-karicheri2@ti.com>
+Date: Thu, 27 Sep 2018 11:56:00 -0400
+Subject: [PATCH 1/2] hsr/prp: disable display for vlan params in ip -d link
+ command
+
+Seeing a crash with ip -d link command for prp. Disable it for now
+as a trial to check if that is causing the segmentation fault
+for prp. These values are not coming from kernel anyways. So it
+doesn't correctly display it currently. So this has no impact on
+the functionality. Can add it later once kernel provide the right
+values in the response.
+
+Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
+---
+ ip/iplink_hsr.c | 9 ---------
+ ip/iplink_prp.c | 9 ---------
+ 2 files changed, 18 deletions(-)
+
+diff --git a/ip/iplink_hsr.c b/ip/iplink_hsr.c
+index 34e91679..e713cb7b 100644
+--- a/ip/iplink_hsr.c
++++ b/ip/iplink_hsr.c
+@@ -180,15 +180,6 @@ static void hsr_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
+ 				    RTA_PAYLOAD(tb[IFLA_HSR_SUPERVISION_ADDR]),
+ 				    ARPHRD_VOID,
+ 				    b1, sizeof(b1)));
+-	if (tb[IFLA_HSR_SV_VID])
+-		fprintf(f, "SV_VID %d ",
+-			rta_getattr_u16(tb[IFLA_HSR_SV_VID]));
+-	if (tb[IFLA_HSR_SV_PCP])
+-		fprintf(f, "SV_PCP %d ",
+-			rta_getattr_u8(tb[IFLA_HSR_SV_PCP]));
+-	if (tb[IFLA_HSR_SV_CFI])
+-		fprintf(f, "SV_CFI %d ",
+-			rta_getattr_u8(tb[IFLA_HSR_SV_CFI]));
+ }
+ 
+ static void hsr_print_help(struct link_util *lu, int argc, char **argv,
+diff --git a/ip/iplink_prp.c b/ip/iplink_prp.c
+index e25ae82d..b09528a5 100644
+--- a/ip/iplink_prp.c
++++ b/ip/iplink_prp.c
+@@ -170,15 +170,6 @@ static void prp_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
+ 				    RTA_PAYLOAD(tb[IFLA_PRP_SUPERVISION_ADDR]),
+ 				    ARPHRD_VOID,
+ 				    b1, sizeof(b1)));
+-	if (tb[IFLA_PRP_SV_VID])
+-		fprintf(f, "SV_VID %d ",
+-			rta_getattr_u16(tb[IFLA_PRP_SV_VID]));
+-	if (tb[IFLA_PRP_SV_PCP])
+-		fprintf(f, "SV_PCP %d ",
+-			rta_getattr_u8(tb[IFLA_PRP_SV_PCP]));
+-	if (tb[IFLA_PRP_SV_CFI])
+-		fprintf(f, "SV_CFI %d ",
+-			rta_getattr_u8(tb[IFLA_PRP_SV_CFI]));
+ }
+ 
+ static void prp_print_help(struct link_util *lu, int argc, char **argv,
+-- 
+2.17.0
+
+
diff --git a/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0002-prp-invalid-maxattr.patch b/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0002-prp-invalid-maxattr.patch
new file mode 100644
index 0000000..cfd0106
--- /dev/null
+++ b/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0002-prp-invalid-maxattr.patch
@@ -0,0 +1,29 @@
+From 755328f9c9d45149cad1a8e6c371d2020b99f18e Mon Sep 17 00:00:00 2001
+From: Murali Karicheri <m-karicheri2@ti.com>
+Date: Thu, 27 Sep 2018 14:54:48 -0400
+Subject: [PATCH 2/2] prp: invalid maxattr
+
+Fix the cut and paste error of using IFLA_VLAN_MAX instead of IFLA_PRP_MAX.
+
+Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
+---
+ ip/iplink_prp.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ip/iplink_prp.c b/ip/iplink_prp.c
+index b09528a5..beef603b 100644
+--- a/ip/iplink_prp.c
++++ b/ip/iplink_prp.c
+@@ -180,7 +180,7 @@ static void prp_print_help(struct link_util *lu, int argc, char **argv,
+ 
+ struct link_util prp_link_util = {
+ 	.id		= "prp",
+-	.maxattr	= IFLA_VLAN_MAX,
++	.maxattr	= IFLA_PRP_MAX,
+ 	.parse_opt	= prp_parse_opt,
+ 	.print_opt	= prp_print_opt,
+ 	.print_help	= prp_print_help,
+-- 
+2.17.0
+
+
diff --git a/meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.11.0.bbappend b/meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.11.0.bbappend
index 2b2d6d2..26949c4 100644
--- a/meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.11.0.bbappend
+++ b/meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.11.0.bbappend
@@ -1,4 +1,4 @@
-PR_append = ".arago2"
+PR_append = ".arago3"
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
@@ -6,4 +6,6 @@ SRC_URI_append = " \
            file://0001-add-support-for-prp-similar-to-hsr.patch \
            file://0001-hsr-prp-add-support-for-vlan-tagged-sv-frames.patch \
            file://0001-hsr-prp-remove-the-debug-print-from-the-code.patch \
+           file://0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch \
+           file://0002-prp-invalid-maxattr.patch \
           "
-- 
1.9.1



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

* Re: [rocko/master/ti2018.03] [PATCH] iproute2: add patches to fix segmentation fault for prp
  2018-09-28 16:07 [rocko/master/ti2018.03] [PATCH] iproute2: add patches to fix segmentation fault for prp Hongmei Gou
@ 2018-09-28 17:18 ` Denys Dmytriyenko
  0 siblings, 0 replies; 2+ messages in thread
From: Denys Dmytriyenko @ 2018-09-28 17:18 UTC (permalink / raw)
  To: Hongmei Gou; +Cc: meta-arago, Murali Karicheri

On Fri, Sep 28, 2018 at 12:07:50PM -0400, Hongmei Gou wrote:
> When ip -d link command is executed with prp interface setup,
> it encounters a segmentation fault. This causes snmpwalk command
> to time out since it uses the above command to list the
> interfaces. This patch fixes the issue.
> 
> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
> Signed-off-by: Hongmei Gou <a0271529@ti.com>
> ---
>  ...able-display-for-vlan-params-in-ip-d-link.patch | 63 ++++++++++++++++++++++
>  .../iproute2/0002-prp-invalid-maxattr.patch        | 29 ++++++++++
>  .../iproute2/iproute2_4.11.0.bbappend              |  4 +-
>  3 files changed, 95 insertions(+), 1 deletion(-)
>  create mode 100644 meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch
>  create mode 100644 meta-arago-distro/recipes-connectivity/iproute2/iproute2/0002-prp-invalid-maxattr.patch
> 
> diff --git a/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch b/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch
> new file mode 100644
> index 0000000..cb5a6b9
> --- /dev/null
> +++ b/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch
> @@ -0,0 +1,63 @@
> +From b893b6e581785fd4a458d5cf1a8178e858636db2 Mon Sep 17 00:00:00 2001
> +From: Murali Karicheri <m-karicheri2@ti.com>
> +Date: Thu, 27 Sep 2018 11:56:00 -0400
> +Subject: [PATCH 1/2] hsr/prp: disable display for vlan params in ip -d link
> + command
> +
> +Seeing a crash with ip -d link command for prp. Disable it for now
> +as a trial to check if that is causing the segmentation fault
> +for prp. These values are not coming from kernel anyways. So it
> +doesn't correctly display it currently. So this has no impact on
> +the functionality. Can add it later once kernel provide the right
> +values in the response.

Upstream-status is missing.


> +Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
> +---
> + ip/iplink_hsr.c | 9 ---------
> + ip/iplink_prp.c | 9 ---------
> + 2 files changed, 18 deletions(-)
> +
> +diff --git a/ip/iplink_hsr.c b/ip/iplink_hsr.c
> +index 34e91679..e713cb7b 100644
> +--- a/ip/iplink_hsr.c
> ++++ b/ip/iplink_hsr.c
> +@@ -180,15 +180,6 @@ static void hsr_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
> + 				    RTA_PAYLOAD(tb[IFLA_HSR_SUPERVISION_ADDR]),
> + 				    ARPHRD_VOID,
> + 				    b1, sizeof(b1)));
> +-	if (tb[IFLA_HSR_SV_VID])
> +-		fprintf(f, "SV_VID %d ",
> +-			rta_getattr_u16(tb[IFLA_HSR_SV_VID]));
> +-	if (tb[IFLA_HSR_SV_PCP])
> +-		fprintf(f, "SV_PCP %d ",
> +-			rta_getattr_u8(tb[IFLA_HSR_SV_PCP]));
> +-	if (tb[IFLA_HSR_SV_CFI])
> +-		fprintf(f, "SV_CFI %d ",
> +-			rta_getattr_u8(tb[IFLA_HSR_SV_CFI]));
> + }
> + 
> + static void hsr_print_help(struct link_util *lu, int argc, char **argv,
> +diff --git a/ip/iplink_prp.c b/ip/iplink_prp.c
> +index e25ae82d..b09528a5 100644
> +--- a/ip/iplink_prp.c
> ++++ b/ip/iplink_prp.c
> +@@ -170,15 +170,6 @@ static void prp_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
> + 				    RTA_PAYLOAD(tb[IFLA_PRP_SUPERVISION_ADDR]),
> + 				    ARPHRD_VOID,
> + 				    b1, sizeof(b1)));
> +-	if (tb[IFLA_PRP_SV_VID])
> +-		fprintf(f, "SV_VID %d ",
> +-			rta_getattr_u16(tb[IFLA_PRP_SV_VID]));
> +-	if (tb[IFLA_PRP_SV_PCP])
> +-		fprintf(f, "SV_PCP %d ",
> +-			rta_getattr_u8(tb[IFLA_PRP_SV_PCP]));
> +-	if (tb[IFLA_PRP_SV_CFI])
> +-		fprintf(f, "SV_CFI %d ",
> +-			rta_getattr_u8(tb[IFLA_PRP_SV_CFI]));
> + }
> + 
> + static void prp_print_help(struct link_util *lu, int argc, char **argv,
> +-- 
> +2.17.0
> +
> +
> diff --git a/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0002-prp-invalid-maxattr.patch b/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0002-prp-invalid-maxattr.patch
> new file mode 100644
> index 0000000..cfd0106
> --- /dev/null
> +++ b/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0002-prp-invalid-maxattr.patch
> @@ -0,0 +1,29 @@
> +From 755328f9c9d45149cad1a8e6c371d2020b99f18e Mon Sep 17 00:00:00 2001
> +From: Murali Karicheri <m-karicheri2@ti.com>
> +Date: Thu, 27 Sep 2018 14:54:48 -0400
> +Subject: [PATCH 2/2] prp: invalid maxattr
> +
> +Fix the cut and paste error of using IFLA_VLAN_MAX instead of IFLA_PRP_MAX.

Upstream-status is missing.


> +Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
> +---
> + ip/iplink_prp.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/ip/iplink_prp.c b/ip/iplink_prp.c
> +index b09528a5..beef603b 100644
> +--- a/ip/iplink_prp.c
> ++++ b/ip/iplink_prp.c
> +@@ -180,7 +180,7 @@ static void prp_print_help(struct link_util *lu, int argc, char **argv,
> + 
> + struct link_util prp_link_util = {
> + 	.id		= "prp",
> +-	.maxattr	= IFLA_VLAN_MAX,
> ++	.maxattr	= IFLA_PRP_MAX,
> + 	.parse_opt	= prp_parse_opt,
> + 	.print_opt	= prp_print_opt,
> + 	.print_help	= prp_print_help,
> +-- 
> +2.17.0
> +
> +
> diff --git a/meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.11.0.bbappend b/meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.11.0.bbappend
> index 2b2d6d2..26949c4 100644
> --- a/meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.11.0.bbappend
> +++ b/meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.11.0.bbappend
> @@ -1,4 +1,4 @@
> -PR_append = ".arago2"
> +PR_append = ".arago3"
>  
>  FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>  
> @@ -6,4 +6,6 @@ SRC_URI_append = " \
>             file://0001-add-support-for-prp-similar-to-hsr.patch \
>             file://0001-hsr-prp-add-support-for-vlan-tagged-sv-frames.patch \
>             file://0001-hsr-prp-remove-the-debug-print-from-the-code.patch \
> +           file://0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch \
> +           file://0002-prp-invalid-maxattr.patch \
>            "
> -- 
> 1.9.1
> 
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


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

end of thread, other threads:[~2018-09-28 17:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-28 16:07 [rocko/master/ti2018.03] [PATCH] iproute2: add patches to fix segmentation fault for prp Hongmei Gou
2018-09-28 17:18 ` Denys Dmytriyenko

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.