lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230907221016.2978802-2-ninad@linux.ibm.com>
Date:   Thu,  7 Sep 2023 17:10:15 -0500
From:   Ninad Palsule <ninad@...ux.ibm.com>
To:     jk@...abs.org, joel@....id.au, alistair@...ple.id.au,
        eajames@...ux.ibm.com, linux-fsi@...ts.ozlabs.org,
        linux-kernel@...r.kernel.org
Cc:     Ninad Palsule <ninad@...ux.ibm.com>
Subject: [PATCH v1 1/2] fsi: sbefifo: Remove write's max command length

This commit removes max command length check in the user write path.
This is required to support images larger than 1MB. This should not
create any issues as read path does not have this check either.

As per the original design cronus server was suppose to break up the
image into 1MB pieces but it requires restructuring of the driver.
Today driver sends EOT message on each write request so we will have to
send it only after all pieces are sent which requires large change hence
we decided to remove this check.

Testing:
  Loaded 3 MB image through cronus server.

Signed-off-by: Ninad Palsule <ninad@...ux.ibm.com>
---
 drivers/fsi/fsi-sbefifo.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/fsi/fsi-sbefifo.c b/drivers/fsi/fsi-sbefifo.c
index 9912b7a6a4b9..b771dff27f7f 100644
--- a/drivers/fsi/fsi-sbefifo.c
+++ b/drivers/fsi/fsi-sbefifo.c
@@ -113,7 +113,6 @@ enum sbe_state
 #define SBEFIFO_TIMEOUT_IN_RSP		1000
 
 /* Other constants */
-#define SBEFIFO_MAX_USER_CMD_LEN	(0x100000 + PAGE_SIZE)
 #define SBEFIFO_RESET_MAGIC		0x52534554 /* "RSET" */
 
 struct sbefifo {
@@ -870,8 +869,6 @@ static ssize_t sbefifo_user_write(struct file *file, const char __user *buf,
 	if (!user)
 		return -EINVAL;
 	sbefifo = user->sbefifo;
-	if (len > SBEFIFO_MAX_USER_CMD_LEN)
-		return -EINVAL;
 	if (len & 3)
 		return -EINVAL;
 
-- 
2.39.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ