* [PATCH RESEND] staging : greybus : Documentation : firmware : Replace deprecated strncpy() with strscpy()
@ 2025-05-21 4:56 rujra
2025-05-21 5:30 ` Greg KH
0 siblings, 1 reply; 7+ messages in thread
From: rujra @ 2025-05-21 4:56 UTC (permalink / raw)
To: Johan Hovold, elder, Greg KH; +Cc: greybus-dev, linux-staging, linux-kernel
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND] staging : greybus : Documentation : firmware : Replace deprecated strncpy() with strscpy()
2025-05-21 4:56 [PATCH RESEND] staging : greybus : Documentation : firmware : Replace deprecated strncpy() with strscpy() rujra
@ 2025-05-21 5:30 ` Greg KH
2025-05-21 5:41 ` rujra
0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2025-05-21 5:30 UTC (permalink / raw)
To: rujra; +Cc: Johan Hovold, elder, greybus-dev, linux-staging, linux-kernel
On Wed, May 21, 2025 at 10:26:52AM +0530, rujra wrote:
> 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>
Your From: line does not match this :(
Also, why is this a "RESEND"?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND] staging : greybus : Documentation : firmware : Replace deprecated strncpy() with strscpy()
2025-05-21 5:30 ` Greg KH
@ 2025-05-21 5:41 ` rujra
2025-05-21 7:06 ` Greg KH
0 siblings, 1 reply; 7+ messages in thread
From: rujra @ 2025-05-21 5:41 UTC (permalink / raw)
To: Greg KH; +Cc: Johan Hovold, elder, greybus-dev, linux-staging, linux-kernel
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:12290863930259651721
,
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.
thank you,
rujra bhatt
On Wed, May 21, 2025 at 11:00 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Wed, May 21, 2025 at 10:26:52AM +0530, rujra wrote:
> > 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>
>
> Your From: line does not match this :(
>
> Also, why is this a "RESEND"?
>
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND] staging : greybus : Documentation : firmware : Replace deprecated strncpy() with strscpy()
2025-05-21 5:41 ` rujra
@ 2025-05-21 7:06 ` Greg KH
0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2025-05-21 7:06 UTC (permalink / raw)
To: rujra; +Cc: Johan Hovold, elder, greybus-dev, linux-staging, linux-kernel
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:12290863930259651721
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.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND] staging : greybus : Documentation : firmware : Replace deprecated strncpy() with strscpy()
[not found] ` <2025052142-maturing-earthworm-cb31@gregkh>
@ 2025-05-21 8:38 ` Rujra Bhatt
2025-05-21 8:42 ` Rujra Bhatt
2025-05-21 9:19 ` Greg KH
0 siblings, 2 replies; 7+ messages in thread
From: Rujra Bhatt @ 2025-05-21 8:38 UTC (permalink / raw)
To: Greg KH; +Cc: Johan Hovold, elder, greybus-dev, linux-staging, linux-kernel
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:12290863930259651721
>
> 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@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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND] staging : greybus : Documentation : firmware : Replace deprecated strncpy() with strscpy()
2025-05-21 8:38 ` Rujra Bhatt
@ 2025-05-21 8:42 ` Rujra Bhatt
2025-05-21 9:19 ` Greg KH
1 sibling, 0 replies; 7+ messages in thread
From: Rujra Bhatt @ 2025-05-21 8:42 UTC (permalink / raw)
To: Greg KH; +Cc: Johan Hovold, elder, greybus-dev, linux-staging, linux-kernel
On Wed, May 21, 2025 at 2:08 PM Rujra Bhatt
<braker.noob.kernel@gmail.com> wrote:
>
> 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:12290863930259651721
> >
> > 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.
>
> On Wed, May 21, 2025 at 2:02 PM Greg KH <gregkh@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.
> >
Re-send it to everyone , as per your guidance ,
thank you, and sorry for any inconvenience caused.
thank you,
regards,
Rujra Bhatt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND] staging : greybus : Documentation : firmware : Replace deprecated strncpy() with strscpy()
2025-05-21 8:38 ` Rujra Bhatt
2025-05-21 8:42 ` Rujra Bhatt
@ 2025-05-21 9:19 ` Greg KH
1 sibling, 0 replies; 7+ messages in thread
From: Greg KH @ 2025-05-21 9:19 UTC (permalink / raw)
To: Rujra Bhatt; +Cc: Johan Hovold, elder, greybus-dev, linux-staging, linux-kernel
On Wed, May 21, 2025 at 02:08:52PM +0530, Rujra Bhatt wrote:
> 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:12290863930259651721
> >
> > 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.
I'm sorry, preview what exactly? If you think you have fixed it,
send a new patch with it fixed up as a new version. I can't determine
anything just from an email like this :)
> is this the way correct about the reply email ?
Yes.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-05-21 9:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-21 4:56 [PATCH RESEND] staging : greybus : Documentation : firmware : Replace deprecated strncpy() with strscpy() rujra
2025-05-21 5:30 ` Greg KH
2025-05-21 5:41 ` rujra
2025-05-21 7:06 ` Greg KH
[not found] <aC2ILNV6xgt11KuN@brak3r-Ubuntu>
[not found] ` <2025052142-maturing-earthworm-cb31@gregkh>
2025-05-21 8:38 ` Rujra Bhatt
2025-05-21 8:42 ` Rujra Bhatt
2025-05-21 9:19 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox