diff options
| author | Dragos Ciprian Nedelcu <Dragos.Ciprian.Nedelcu@enea.com> | 2021-02-25 09:48:09 +0100 |
|---|---|---|
| committer | Dragos Ciprian Nedelcu <Dragos.Ciprian.Nedelcu@enea.com> | 2021-02-25 10:29:45 +0100 |
| commit | b7582167f4956d00a1f0377d957182d7cd06a6e9 (patch) | |
| tree | 8a5a27768facd7f3f5e154f9a78d4d248608b5e8 | |
| parent | e355659071157edb846b19708b2dadc1e4b29be1 (diff) | |
| download | meta-nfv-access-bsp-x86-feature_CPDX-3405_req3.tar.gz | |
Force MDD disabled in ixgbe driverhotfix_EDGESC-6feature_CPDX-3570feature_CPDX-3521feature_CPDX-3405_req3custom_CPDX-3546EE240_HotFix1
Set default value for Malicious Driver Detection to disabled
in ixgbe driver. Also prevent MDD from being enabled.
Signed-off-by: Dragos Ciprian Nedelcu <Dragos.Ciprian.Nedelcu@enea.com>
Change-Id: I84fc98070b376814549048f307032ed0bd355bc9
3 files changed, 52 insertions, 16 deletions
diff --git a/recipes-kernel/intel-ethernet/files/disable_MDD_by_default.patch b/recipes-kernel/intel-ethernet/files/disable_MDD_by_default.patch deleted file mode 100644 index 3da16c5..0000000 --- a/recipes-kernel/intel-ethernet/files/disable_MDD_by_default.patch +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | Index: src/ixgbe_param.c | ||
| 2 | =================================================================== | ||
| 3 | --- src.orig/ixgbe_param.c | ||
| 4 | +++ src/ixgbe_param.c | ||
| 5 | @@ -1232,8 +1232,8 @@ void ixgbe_check_options(struct ixgbe_ad | ||
| 6 | struct ixgbe_option opt = { | ||
| 7 | .type = enable_option, | ||
| 8 | .name = "Malicious Driver Detection", | ||
| 9 | - .err = "defaulting to Enabled", | ||
| 10 | - .def = OPTION_ENABLED, | ||
| 11 | + .err = "defaulting to Disabled", | ||
| 12 | + .def = OPTION_DISABLED, | ||
| 13 | }; | ||
| 14 | |||
| 15 | switch (adapter->hw.mac.type) { | ||
diff --git a/recipes-kernel/intel-ethernet/files/force_disable_MDD.patch b/recipes-kernel/intel-ethernet/files/force_disable_MDD.patch new file mode 100644 index 0000000..4a13a70 --- /dev/null +++ b/recipes-kernel/intel-ethernet/files/force_disable_MDD.patch | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | From 22e58fa60c1ae1802946d80df9f94f94855f15f1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Dragos Ciprian Nedelcu <Dragos.Ciprian.Nedelcu@enea.com> | ||
| 3 | Date: Thu, 25 Feb 2021 09:48:09 +0100 | ||
| 4 | Subject: [PATCH] Force MDD disabled in ixgbe driver | ||
| 5 | |||
| 6 | Set default value for Malicious Driver Detection to disabled | ||
| 7 | in ixgbe driver. Also prevent MDD from being enabled. | ||
| 8 | |||
| 9 | Signed-off-by: Dragos Ciprian Nedelcu <Dragos.Ciprian.Nedelcu@enea.com> | ||
| 10 | Change-Id: I84fc98070b376814549048f307032ed0bd355bc9 | ||
| 11 | |||
| 12 | Index: src/ixgbe_param.c | ||
| 13 | =================================================================== | ||
| 14 | --- src.orig/ixgbe_param.c | ||
| 15 | +++ src/ixgbe_param.c | ||
| 16 | @@ -289,13 +289,13 @@ IXGBE_PARAM(FCoE, "Disable or enable FCo | ||
| 17 | * | ||
| 18 | * Default Value: 1 | ||
| 19 | */ | ||
| 20 | -IXGBE_PARAM(MDD, "Malicious Driver Detection: (0,1), default 1 = on"); | ||
| 21 | +IXGBE_PARAM(MDD, "Malicious Driver Detection: (0,1), default 0 = off"); | ||
| 22 | |||
| 23 | /* Enable/disable Large Receive Offload | ||
| 24 | * | ||
| 25 | * Valid Values: 0(off), 1(on) | ||
| 26 | * | ||
| 27 | - * Default Value: 1 | ||
| 28 | + * Default Value: 0 | ||
| 29 | */ | ||
| 30 | IXGBE_PARAM(LRO, "Large Receive Offload (0,1), default 0 = off"); | ||
| 31 | |||
| 32 | @@ -1232,8 +1232,8 @@ void ixgbe_check_options(struct ixgbe_ad | ||
| 33 | struct ixgbe_option opt = { | ||
| 34 | .type = enable_option, | ||
| 35 | .name = "Malicious Driver Detection", | ||
| 36 | - .err = "defaulting to Enabled", | ||
| 37 | - .def = OPTION_ENABLED, | ||
| 38 | + .err = "defaulting to Disabled", | ||
| 39 | + .def = OPTION_DISABLED, | ||
| 40 | }; | ||
| 41 | |||
| 42 | switch (adapter->hw.mac.type) { | ||
| 43 | @@ -1258,6 +1258,8 @@ void ixgbe_check_options(struct ixgbe_ad | ||
| 44 | *aflags |= IXGBE_FLAG_MDD_ENABLED; | ||
| 45 | } | ||
| 46 | #endif | ||
| 47 | + /* Force disable MDD */ | ||
| 48 | + *aflags &= ~IXGBE_FLAG_MDD_ENABLED; | ||
| 49 | break; | ||
| 50 | default: | ||
| 51 | *aflags &= ~IXGBE_FLAG_MDD_ENABLED; | ||
diff --git a/recipes-kernel/intel-ethernet/ixgbe_5.10.2.bbappend b/recipes-kernel/intel-ethernet/ixgbe_5.10.2.bbappend index 3193ade..fcd0b02 100644 --- a/recipes-kernel/intel-ethernet/ixgbe_5.10.2.bbappend +++ b/recipes-kernel/intel-ethernet/ixgbe_5.10.2.bbappend | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" |
| 2 | SRC_URI += " \ | 2 | SRC_URI += " \ |
| 3 | file://disable_MDD_by_default.patch \ | 3 | file://force_disable_MDD.patch \ |
| 4 | " | 4 | " |
