Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1496878rwo; Wed, 2 Aug 2023 15:22:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlH2ur370qxxpb0ng+akRb+mfigZqccxmndFfF+Rm7pKckkGQt2o2rE0pBApz/hfDJFoDb1v X-Received: by 2002:a17:907:2bd4:b0:994:673:8af6 with SMTP id gv20-20020a1709072bd400b0099406738af6mr5656033ejc.29.1691014966440; Wed, 02 Aug 2023 15:22:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691014966; cv=none; d=google.com; s=arc-20160816; b=Z1CU+uYOVCx6lcW72scfoC5Z6Pv/ybA/+U1UaBKztE0MdIRF1wN2BLacN6Bpm2We9u FQKKsiSA+icaUQ7MXGPHwbW6SG1x3m38r4LSHDJWrWnHH0xfcSPPBH0dfMycyYPPjPbX b6I+NhtvMaXQjvcGPwQ8LfslVuVRZi17p/PytXwc1dfXYGeZEBmJCdkiZPOW/CmHYtsZ bG9YwRhkmWmx9B5Lsjysv30fjPLi20pXDiGa3Nvq3s5Rdh1y0exivl2SqwH8aAtgoYNM xH4SnQcLC+XN144LmTQRGa9IpGTERPBOk5xtPBKEabIZYK42gJ3Uu0Wr1yik9/90Z90r Luhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:to:from:cc:in-reply-to:subject:date :dkim-signature; bh=xCeI4cJM5i/F1g7PTNSHGiGltpi2DPORCAOXe5MxMI4=; fh=4bdsbghwu+F8+8nuhaxtiZe/7ZMgm8JFZTYpOiBHuqM=; b=NP8rbx2f41q6ERxpNW1yJ+d4bkH5Rsz53LLUH2rAQUT0OTvnAf5GZUdCoPK5xsE5mO QCceWCAqUsoB16ywqskWM0d2eoZWAYgljrQFqBg64uOxoWMC/gvzIzlhlaAxeptsSasn MsTpPXVCKcWxtcV/7frjhxE7ZRRrb5T2o6068zxSXjlHhHYGGLfHUzxREqKE9SLaF7Sj xY6u8zbiN1CaX+sbG2po/9yPhARwebzKPHpYRBjIvwSt2cnR9gPOwzoQDdoANg5i/znB iC2CeP47273P1gE56Obw1LtaXS1+cXdS1HLqXM4M1rWupyAZtPK9lokIVQjPSf/h3KMa NyvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20221208.gappssmtp.com header.s=20221208 header.b=4dpu5FcC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id uz16-20020a170907119000b00992de9a0240si7743169ejb.220.2023.08.02.15.22.22; Wed, 02 Aug 2023 15:22:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@dabbelt-com.20221208.gappssmtp.com header.s=20221208 header.b=4dpu5FcC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229534AbjHBUrR (ORCPT + 99 others); Wed, 2 Aug 2023 16:47:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231215AbjHBUrQ (ORCPT ); Wed, 2 Aug 2023 16:47:16 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F2C81FF2 for ; Wed, 2 Aug 2023 13:47:15 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-686fc0d3c92so183664b3a.0 for ; Wed, 02 Aug 2023 13:47:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20221208.gappssmtp.com; s=20221208; t=1691009235; x=1691614035; h=message-id:to:from:cc:in-reply-to:subject:date:from:to:cc:subject :date:message-id:reply-to; bh=xCeI4cJM5i/F1g7PTNSHGiGltpi2DPORCAOXe5MxMI4=; b=4dpu5FcCNCNRIyqjOzWmgL+NQSi4gYkmtcikJLhem4DJKp7bF2as4gU6+ek8eDxshQ pgFoE3rV9JVD/M8in3QjCrCvkcekpvSzciVT22TjMLAE3O3wrcK/TtbL4Sh9kbqDAWba xpjhQ/VuZLvlfZcxte6bI9tyAtiNQ+1xq8jwNCn55eMrG4AaeKjIRRYfIVr5rF0cg6y4 aajuwqzz/F+O/8NnTRJX+/fXOsaEbW4+tJ+u1nG2YZD79SwC7VBQZT8kOyAKJvH7tMlR orrDNtcbh55emdbGrx5asBu7QIxNqdhGBd4RSFkJl3fQCRIi5JuEfbOIwJWYmebYvnKy b86A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691009235; x=1691614035; h=message-id:to:from:cc:in-reply-to:subject:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=xCeI4cJM5i/F1g7PTNSHGiGltpi2DPORCAOXe5MxMI4=; b=MrgTkHspCuPtCPtOpGJK/r+3t6LAizv018wjJNiHP7CUT+aN2DEtgb1rVkiqUE8tb5 d8I0O+aI4N/SD26Jsvuaqbw7Guc88CRQb4623KhfPoPNXj7WeKReLSkIvP8p5MPscoXx wppbI5BY+kne8xDp7tFRFKBsoxFnIQC9Yicc3G7cNZeObN2VXMQD4DyIkQPsHKGkAB/u cHsnc+GIWX/4H3QXZMHq+4965XhkOHw3QVmiSaPzoY906p3lRBnk2HngAO5xHZcN6ZWO 6NDhBi+KZ0EpOZucaECTH/O6irDFkFa/ur2X8+7Ln6sG6ybd0TSGKlJK92jzefGFkuA+ nzYQ== X-Gm-Message-State: ABy/qLbs04vupggTeLbc4QgQQcgl4Lclguqr/I7J0phhhoazY2ZLmapF YuSxywpOkiVrlHKpi6fLImHHeerm/moZtkq7htQ= X-Received: by 2002:a05:6a00:1687:b0:668:83b7:fd02 with SMTP id k7-20020a056a00168700b0066883b7fd02mr20214796pfc.31.1691009234798; Wed, 02 Aug 2023 13:47:14 -0700 (PDT) Received: from localhost ([135.180.227.0]) by smtp.gmail.com with ESMTPSA id e7-20020aa78247000000b0066f37665a63sm5852206pfn.73.2023.08.02.13.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Aug 2023 13:47:14 -0700 (PDT) Date: Wed, 02 Aug 2023 13:47:14 -0700 (PDT) X-Google-Original-Date: Wed, 02 Aug 2023 13:47:11 PDT (-0700) Subject: Re: [PATCH v2] RISC-V: cpu: refactor deprecated strncpy In-Reply-To: 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 From: Palmer Dabbelt To: keescook@chromium.org Message-ID: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >>> 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). > > Reviewed-by: Palmer Dabbelt > Acked-by: Palmer Dabbelt > > 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.