lkml.org 
[lkml]   [2023]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] RISC-V: cpu: refactor deprecated strncpy
On August 2, 2023 1:47:14 PM PDT, Palmer Dabbelt <palmer@dabbelt.com> wrote:
>On Wed, 02 Aug 2023 13:41:52 PDT (-0700), Palmer Dabbelt wrote:
>> On Wed, 02 Aug 2023 13:36:03 PDT (-0700), keescook@chromium.org wrote:
>>> On Wed, Aug 02, 2023 at 12:21:58AM +0000, Justin Stitt wrote:
>>>> `strncpy` is deprecated for use on NUL-terminated destination strings [1].
>>>>
>>>> Favor not copying strings onto stack and instead use strings directly.
>>>> This avoids hard-coding sizes and buffer lengths all together.
>>>>
>>>> Link: https://github.com/KSPP/linux/issues/90
>>>> Cc: linux-hardening@vger.kernel.org
>>>> Suggested-by: Kees Cook <keescook@chromium.org>
>>>> Signed-off-by: Justin Stitt <justinstitt@google.com>
>>>
>>> I like it! ;)
>>>
>>> Reviewed-by: Kees Cook <keescook@chromium.org>
>>
>> Thanks, I just queue it up for fixes (might take a bit to build test,
>> I'm a bit backed up).
>>
>> Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
>> Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
>>
>> If you wanted to take it for some hardening thing, though -- otherwise
>> it'll likely end up on my fixes later today.
>
>Sorry this is for-next as it's not a fix, I was just looking at other
>fixes. It's queued up aimed at for-next.

Awesome; thank you! :)


--
Kees Cook

\
 
 \ /
  Last update: 2023-08-02 23:00    [W:0.091 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site