Re: [PATCH] IB/hfi1: replace deprecated strncpy

2023-09-29 Thread Kees Cook
On Tue, Sep 26, 2023 at 07:56:34AM -0500, Dean Luick wrote: > On 9/23/2023 10:20 PM, Kees Cook wrote: > > On Fri, Sep 22, 2023 at 09:25:39AM -0500, Dean Luick wrote: > >> On 9/22/2023 5:29 AM, Leon Romanovsky wrote: > >>> > >>> On Thu, 21 Sep 2023 07:17:47 +, Justin Stitt wrote: >

Re: [PATCH] IB/hfi1: replace deprecated strncpy

2023-09-26 Thread Dean Luick
On 9/23/2023 10:20 PM, Kees Cook wrote: > On Fri, Sep 22, 2023 at 09:25:39AM -0500, Dean Luick wrote: >> On 9/22/2023 5:29 AM, Leon Romanovsky wrote: >>> >>> On Thu, 21 Sep 2023 07:17:47 +, Justin Stitt wrote: `strncpy` is deprecated for use on NUL-terminated destination strings [1]

Re: [PATCH] IB/hfi1: replace deprecated strncpy

2023-09-23 Thread Kees Cook
On Fri, Sep 22, 2023 at 09:25:39AM -0500, Dean Luick wrote: > On 9/22/2023 5:29 AM, Leon Romanovsky wrote: > > > > On Thu, 21 Sep 2023 07:17:47 +, Justin Stitt wrote: > >> `strncpy` is deprecated for use on NUL-terminated destination strings > >> [1] and as such we should prefer more robust

Re: [PATCH] IB/hfi1: replace deprecated strncpy

2023-09-22 Thread Dean Luick
On 9/22/2023 5:29 AM, Leon Romanovsky wrote: > > On Thu, 21 Sep 2023 07:17:47 +, Justin Stitt wrote: >> `strncpy` is deprecated for use on NUL-terminated destination strings >> [1] and as such we should prefer more robust and less ambiguous string >> interfaces. >> >> We see that `buf` is

Re: [PATCH] IB/hfi1: replace deprecated strncpy

2023-09-22 Thread Leon Romanovsky
On Thu, 21 Sep 2023 07:17:47 +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > We see that `buf` is expected to be NUL-terminated based on it's use >

[PATCH] IB/hfi1: replace deprecated strncpy

2023-09-21 Thread Justin Stitt
`strncpy` is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We see that `buf` is expected to be NUL-terminated based on it's use within a trace event wherein `is_misc_err_name` and `is_various_name` map