On Sun, May 11, 2025 at 09:27:33PM -0400, Damien Riégel wrote:
> Hi,
>
>
> This patchset brings initial support for Silicon Labs CPC protocol,
> standing for Co-Processor Communication. This protocol is used by the
> EFR32 Series [1]. These devices offer a variety for radio protocols,
> such as Bluetooth, Z-Wave, Zigbee [2].
Before we get too deep into the details of the patches, please could
you do a compare/contrast to Greybus.
The core of Greybus is already in the kernel, with some more bits
being in staging. I don't know it too well, but at first glance it
looks very similar. We should not duplicate that.
Also, this patch adds Bluetooth, you talk about Z-Wave and Zigbee. But
the EFR32 is a general purpose SoC, with I2C, SPI, PWM, UART. Greybus
has support for these, although the code is current in staging. But
for staging code, it is actually pretty good.
Why should we add a vendor implementation when we already appear to
have something which does most of what is needed?
Andrew
To ensuring that the firmware_tag is properly null-terminated. When
copying firmware tag strings to prevent buffer overflows and ensure
data integrity.
The maximum size of tag is GB_FIRMWARE_U_TAG_MAX_SIZE = 10 bytes, and it
may or may not be NULL-terminated.
included in "greybus_firmware.h"
changes has been made at 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(a)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
----------------------------------------------------------
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(a)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
On Wed, May 21, 2025 at 09:06:00AM +0200, Greg KH wrote:
> A: http://en.wikipedia.org/wiki/Top_post
> Q: Were do I find info about this thing called top-posting?
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>
> A: No.
> Q: Should I include quotations after my reply?
>
>
> http://daringfireball.net/2007/07/on_top
>
> On Wed, May 21, 2025 at 11:11:26AM +0530, rujra wrote:
> > Hi greg,
> >
> > why is this a RESEND ?:
> >
> > >> I had sent the same patch 4 days ago and didn't get any reply , hence tried to resend the same patch for the same,
> > here is earlier mail :
> > https://mail.google.com/mail/u/1/?ik=f63b03515e&view=om&permmsgid=msg-a:s:1…
>
> That is a link to _your_ account, not a public record of your email :(
>
> > ,
> >
> > line does not match this:
> > >> sorry , i could not get it what it is exactly ?, if possible can you share some insights or example so that from in future i would get it right.
>
> Your "From:" line in your email does not match with the signed-off-by
> line.
This has been addressed successfully, Kindly preview it.
is this the way correct about the reply email ? , kindly let me know as I
have tried to get more and more answers and solved issues, and thank you
so much for your guidance and will be keep in mind about the process and will
not fail next time onwards.
thank you,
regards,
Rujra Bhatt
On Wed, May 21, 2025 at 2:02 PM Greg KH <gregkh(a)linuxfoundation.org> wrote:
>
> On Wed, May 21, 2025 at 01:30:44PM +0530, Rujra Bhatt wrote:
>
> <snip>
>
> For some reason you sent this only to me, which is a bit rude to
> everyone else on the mailing list. I'll be glad to respond if you
> resend it to everyone.
>
> thanks,
>
> greg k-h