---------------------------------------------------------- This is the new Patch for the earlier Patch hence made V1.
[Note: there will be no significant changes.] ----------------------------------------------------------
Changes:
To ensuring that the firmware tag is properly null-terminated. When copying firmware tag strings to prevent buffer overflows and ensure data integrity.
Changes has been made in 3 positions: 1: update firmware tag 2: backend update firmware tag 3: backend update firmware tag with unipro
Signed-off-by: Rujra Bhatt braker.noob.kernel@gmail.com --- drivers/staging/greybus/Documentation/firmware/firmware.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/greybus/Documentation/firmware/firmware.c b/drivers/staging/greybus/Documentation/firmware/firmware.c index 765d69faa..f37904b91 100644 --- a/drivers/staging/greybus/Documentation/firmware/firmware.c +++ b/drivers/staging/greybus/Documentation/firmware/firmware.c @@ -63,7 +63,7 @@ static int update_intf_firmware(int fd) intf_load.major = 0; intf_load.minor = 0;
- strncpy((char *)&intf_load.firmware_tag, firmware_tag, + strscpy((char *)&intf_load.firmware_tag, firmware_tag, GB_FIRMWARE_U_TAG_MAX_SIZE);
ret = ioctl(fd, FW_MGMT_IOC_INTF_LOAD_AND_VALIDATE, &intf_load); @@ -101,7 +101,7 @@ static int update_backend_firmware(int fd) /* Get Backend Firmware Version */ printf("Getting Backend Firmware Version\n");
- strncpy((char *)&backend_fw_info.firmware_tag, firmware_tag, + strscpy((char *)&backend_fw_info.firmware_tag, firmware_tag, GB_FIRMWARE_U_TAG_MAX_SIZE);
retry_fw_version: @@ -129,7 +129,7 @@ static int update_backend_firmware(int fd) /* Try Backend Firmware Update over Unipro */ printf("Updating Backend Firmware\n");
- strncpy((char *)&backend_update.firmware_tag, firmware_tag, + strscpy((char *)&backend_update.firmware_tag, firmware_tag, GB_FIRMWARE_U_TAG_MAX_SIZE);
retry_fw_update:
On Wed, May 21, 2025 at 03:00:35PM +0530, Rujra Bhatt wrote:
This is the new Patch for the earlier Patch hence made V1.
[Note: there will be no significant changes.]
Changes:
To ensuring that the firmware tag is properly null-terminated. When copying firmware tag strings to prevent buffer overflows and ensure data integrity.
Changes has been made in 3 positions: 1: update firmware tag 2: backend update firmware tag 3: backend update firmware tag with unipro
Signed-off-by: Rujra Bhatt braker.noob.kernel@gmail.com
drivers/staging/greybus/Documentation/firmware/firmware.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.
You are receiving this message because of the following common error(s) as indicated below:
- This looks like a new version of a previously submitted patch, but you did not list below the --- line any changes from the previous version. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what needs to be done here to properly describe this.
If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.
thanks,
greg k-h's patch email bot
This is the new Patch for the earlier Patch hence made V1.
[Note: there will be no significant changes.]
Changes:
To ensuring that the firmware tag is properly null-terminated. When copying firmware tag strings to prevent buffer overflows and ensure data integrity.
Changes has been made in 3 positions: 1: update firmware tag 2: backend update firmware tag 3: backend update firmware tag with unipro
Signed-off-by: Rujra Bhatt braker.noob.kernel@gmail.com
drivers/staging/greybus/Documentation/firmware/firmware.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/greybus/Documentation/firmware/firmware.c b/drivers/staging/greybus/Documentation/firmware/firmware.c index 765d69faa..f37904b91 100644 --- a/drivers/staging/greybus/Documentation/firmware/firmware.c +++ b/drivers/staging/greybus/Documentation/firmware/firmware.c @@ -63,7 +63,7 @@ static int update_intf_firmware(int fd) intf_load.major = 0; intf_load.minor = 0;
strncpy((char *)&intf_load.firmware_tag, firmware_tag,
strscpy((char *)&intf_load.firmware_tag, firmware_tag, GB_FIRMWARE_U_TAG_MAX_SIZE); ret = ioctl(fd, FW_MGMT_IOC_INTF_LOAD_AND_VALIDATE, &intf_load);
@@ -101,7 +101,7 @@ static int update_backend_firmware(int fd) /* Get Backend Firmware Version */ printf("Getting Backend Firmware Version\n");
strncpy((char *)&backend_fw_info.firmware_tag, firmware_tag,
strscpy((char *)&backend_fw_info.firmware_tag, firmware_tag, GB_FIRMWARE_U_TAG_MAX_SIZE);
retry_fw_version: @@ -129,7 +129,7 @@ static int update_backend_firmware(int fd) /* Try Backend Firmware Update over Unipro */ printf("Updating Backend Firmware\n");
strncpy((char *)&backend_update.firmware_tag, firmware_tag,
strscpy((char *)&backend_update.firmware_tag, firmware_tag, GB_FIRMWARE_U_TAG_MAX_SIZE);
retry_fw_update:
2.43.0
Fixed the mail style issue for the patch , kindly confirm if this is valid
format.
thank you, regards, rujra bhatt
This is the new Patch for the earlier Patch hence made V1.
[Note: there will be no significant changes.]
Changes:
To ensure that the firmware tag is properly null-terminated. When copying firmware tag strings to prevent buffer overflows and ensure data integrity.
Changes has been made in 3 positions: 1: update firmware tag 2: backend update firmware tag 3: backend update firmware tag with unipro
Signed-off-by: Rujra Bhatt braker.noob.kernel@gmail.com --- drivers/staging/greybus/Documentation/firmware/firmware.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/greybus/Documentation/firmware/firmware.c b/drivers/staging/greybus/Documentation/firmware/firmware.c index 765d69faa..f37904b91 100644 --- a/drivers/staging/greybus/Documentation/firmware/firmware.c +++ b/drivers/staging/greybus/Documentation/firmware/firmware.c @@ -63,7 +63,7 @@ static int update_intf_firmware(int fd) intf_load.major = 0; intf_load.minor = 0;
- strncpy((char *)&intf_load.firmware_tag, firmware_tag, + strscpy((char *)&intf_load.firmware_tag, firmware_tag, GB_FIRMWARE_U_TAG_MAX_SIZE);
ret = ioctl(fd, FW_MGMT_IOC_INTF_LOAD_AND_VALIDATE, &intf_load); @@ -101,7 +101,7 @@ static int update_backend_firmware(int fd) /* Get Backend Firmware Version */ printf("Getting Backend Firmware Version\n");
- strncpy((char *)&backend_fw_info.firmware_tag, firmware_tag, + strscpy((char *)&backend_fw_info.firmware_tag, firmware_tag, GB_FIRMWARE_U_TAG_MAX_SIZE);
retry_fw_version: @@ -129,7 +129,7 @@ static int update_backend_firmware(int fd) /* Try Backend Firmware Update over Unipro */ printf("Updating Backend Firmware\n");
- strncpy((char *)&backend_update.firmware_tag, firmware_tag, + strscpy((char *)&backend_update.firmware_tag, firmware_tag, GB_FIRMWARE_U_TAG_MAX_SIZE);
retry_fw_update: -- 2.43.0
Addressed the "The canonical patch format" .
thank you, regards, Rujra Bhatt