[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230731203141.30044-8-jorge.lopez2@hp.com>
Date: Mon, 31 Jul 2023 15:31:40 -0500
From: Jorge Lopez <jorgealtxwork@...il.com>
To: hdegoede@...hat.com, platform-driver-x86@...r.kernel.org,
linux-kernel@...r.kernel.org, thomas@...ch.de,
ilpo.jarvinen@...ux.intel.com, dan.carpenter@...aro.org
Subject: [PATCH 7/8] hp-bioscfg: Change how password encoding size is evaluated
Update steps how password encoding size is evaluated
Signed-off-by: Jorge Lopez <jorge.lopez2@...com>
---
Based on the latest platform-drivers-x86.git/for-next
---
drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c
index afb5190afc03..03d0188804ba 100644
--- a/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c
+++ b/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c
@@ -335,9 +335,12 @@ static int hp_populate_password_elements_from_package(union acpi_object *passwor
password_data->max_password_length = int_value;
break;
case PSWD_SIZE:
- password_data->encodings_size = int_value;
- if (int_value > MAX_ENCODINGS_SIZE)
+
+ if (int_value > MAX_ENCODINGS_SIZE) {
pr_warn("Password Encoding size value exceeded the maximum number of elements supported or data may be malformed\n");
+ int_value = MAX_ENCODINGS_SIZE;
+ }
+ password_data->encodings_size = int_value;
/* This step is needed to keep the expected
* element list pointing to the right obj[elem].type
--
2.34.1
Powered by blists - more mailing lists