From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B1A0C001DF for ; Wed, 2 Aug 2023 20:59:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229764AbjHBU7a (ORCPT ); Wed, 2 Aug 2023 16:59:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbjHBU72 (ORCPT ); Wed, 2 Aug 2023 16:59:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 928D5E57; Wed, 2 Aug 2023 13:59:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2779461B07; Wed, 2 Aug 2023 20:59:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BE3AC433C8; Wed, 2 Aug 2023 20:59:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691009965; bh=nmkOzzBtFOlR8DFxoWtwW9LZ+hvtWnT7U9XNNbK44zs=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=mq5WI9NJKx4ot/fCX8urwyDmjDYxKzJ/KxXHIauxGNMqx+Wn5E6rCeWejmb1+uvPu 2sXo1C7LxMcElPtGGXkI7IhP7dbMYxBd4Rbm1BOI8f+xbAPOS2669DZdz2NpgrelaL OBW8EcwJlyz+Hg+099ccKwzdtQ2m8SwyZaawbdbGwdVXdHnjHWVdK+QIfKDki89yFJ ePhMHIaQxen3fGEoxnjavTGdFAq2J/mI25pI3/uZbtY+1nj8le5+zUSmt3j6cdgVAI IwmBY7ztrTn+6dmuZfFLVGIXJMsZcYlP9LNg9W68X9KEJF7GQ/SbQi54Pkj4C7h7AD KgMPCWGiYpMwQ== Date: Wed, 02 Aug 2023 13:59:23 -0700 From: Kees Cook To: Palmer Dabbelt , keescook@chromium.org CC: justinstitt@google.com, Paul Walmsley , aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, ndesaulniers@google.com, linux-hardening@vger.kernel.org Subject: Re: [PATCH v2] RISC-V: cpu: refactor deprecated strncpy User-Agent: K-9 Mail for Android In-Reply-To: References: Message-ID: <6A03714C-8C92-4E05-8FAD-D2C5A4745E7D@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On August 2, 2023 1:47:14 PM PDT, Palmer Dabbelt wro= te: >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=2Eorg 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]=2E >>>> >>>> Favor not copying strings onto stack and instead use strings directly= =2E >>>> This avoids hard-coding sizes and buffer lengths all together=2E >>>> >>>> Link: https://github=2Ecom/KSPP/linux/issues/90 >>>> Cc: linux-hardening@vger=2Ekernel=2Eorg >>>> Suggested-by: Kees Cook >>>> Signed-off-by: Justin Stitt >>> >>> I like it! ;) >>> >>> Reviewed-by: Kees Cook >> >> Thanks, I just queue it up for fixes (might take a bit to build test, >> I'm a bit backed up)=2E >> >> Reviewed-by: Palmer Dabbelt >> Acked-by: Palmer Dabbelt >>=20 >> If you wanted to take it for some hardening thing, though -- otherwise >> it'll likely end up on my fixes later today=2E > >Sorry this is for-next as it's not a fix, I was just looking at other=20 >fixes=2E It's queued up aimed at for-next=2E Awesome; thank you! :) --=20 Kees Cook