Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp69197rdb; Fri, 29 Sep 2023 17:14:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFNot6sBx5MjvjBL7CBBWeMMQJ/NfYDugD5tvw+NdfLd78TuKBrDJX9rQNk5b2gvT1kLQoU X-Received: by 2002:a17:90b:8c6:b0:26d:2bac:a0bb with SMTP id ds6-20020a17090b08c600b0026d2baca0bbmr5281331pjb.6.1696032848591; Fri, 29 Sep 2023 17:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696032848; cv=none; d=google.com; s=arc-20160816; b=fjbbKmDVOfZNAXSGJGYKIJbhgi5EjyNVvejry7/STLzdPDkoxz6AWvTU58YpS5vrDO bxNswZZN5irOfCMaQ7r7KkcV6ztwemHfvrCwR7l8Srjwrw++bKzuy+tFevJAfPWelPbG pVXm64xgk5wOO81OR5eQDam/5SUuzK0iRw4Ap+2Lxlh1m0xBYatSOcNHxJ5q379oCOeA kAi80fn7an/9qFr4KZZwHTSSmdSHFcqTPQGTB8iBtSoJsoN7z8B9ZroDXGgXifYPNLBR oRCuZcI2MINgxyW8keBBkjE7NPEk3UgW07uX9ialmjnEVR5VwCGTH1dV0bOu/nef4G+w 7BTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FYvvehpsv1wV0TUOJ3vJBMvoWOTY9QRuZLtItNWRlh4=; fh=S3EjFifwvpBm0HimsCZIiPvCtWwyjjkM6e5ldudeVa0=; b=l593yywD6K8S5qfiUX0KuJlKMISlHFuDv/hQHUhaj1tWjCmxznXZgnWRi27wQRR28f w07n+C2heX/No2d3vwEMADzUqB1S00HYdPThLTNj4hVyiHLGQ+CIKWlClswyCI1K7+0g tbqFgetL4wi/9dz8p01t2P8b99iYYULALYu7DpqQhlW4LkgDG296oua2BmqO8cg+FIJw 2bAG2u0eWjqDbbqm+Zn6Z0dQxxJbshudMcsU8qq8lgkL6pPMRON0pfLL11eJQlQkd+hX /LunI8BQdvgoSxEh+ofketqi0v4Q+GogaBJ4rKAdINUPaQPWcCQ5Uq1rLElKQ7WJH9ef NSJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Zyitjam0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id na10-20020a17090b4c0a00b0026b49c1aa50si2793482pjb.111.2023.09.29.17.14.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 17:14:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Zyitjam0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 9B265807C5CF; Fri, 29 Sep 2023 11:45:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233714AbjI2Sp1 (ORCPT + 99 others); Fri, 29 Sep 2023 14:45:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233557AbjI2Sp0 (ORCPT ); Fri, 29 Sep 2023 14:45:26 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 939A8199 for ; Fri, 29 Sep 2023 11:45:24 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-690d8fb3b7eso13025141b3a.1 for ; Fri, 29 Sep 2023 11:45:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1696013124; x=1696617924; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FYvvehpsv1wV0TUOJ3vJBMvoWOTY9QRuZLtItNWRlh4=; b=Zyitjam0qO5uRgJ6uhXe/DeqenrEDsPN+B9GJtq8Xa9uwn85g5QeJxGrjLYb1V2Ui2 i3icp/ioq2tm8FAev2/RcCReEc+O3RDAUFNi5ci+C9RyfwvTavw6zGWOHXZr3zSyURpU 8n2pDX5LvQD4x9MCc7ax7a2Ncldz+drrR2B3E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696013124; x=1696617924; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FYvvehpsv1wV0TUOJ3vJBMvoWOTY9QRuZLtItNWRlh4=; b=W/6I1bczslT0Gd2bZWWzfRLy0mAz7HQDRgrvRcC1TUKF+400sITEzMBt7otJrbIjzf 64v0Fxd6oS2FCbTLgrLwt3icthzHFxpfJo5nsJzEOy2ROFWi3JJVtLf+5SpamzoETD0D 0htJBZB4dWQ363vpCWXG4l9fAr/68pZmIblIv9X70KmNUS9sLJjJ2tbqCLcPyezaIbaK vo57K5PI0ciaW39LA7r4fau9WfCU6PMaU/fnmNLaELesCOSu8jmnMPF0lt6wTtFXOBUv sPPBQyiHDOdI3bPGygrLFgWBeOUgjnkidqltgiDgoyBQdiPxwhAt3XwRo/IPP+ruZlxf JtLA== X-Gm-Message-State: AOJu0YwUCrSOS6TPCJv2VQ0NgNeoOgDZe13SCXlaUnYaWSEv80kHZb+X 9ieqo1S06BbL3m0H+333dBLwZQ== X-Received: by 2002:a05:6a20:1604:b0:15e:e0fd:98e7 with SMTP id l4-20020a056a20160400b0015ee0fd98e7mr5722710pzj.20.1696013124059; Fri, 29 Sep 2023 11:45:24 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id u13-20020aa7848d000000b00690d4464b95sm4795297pfn.16.2023.09.29.11.45.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 11:45:23 -0700 (PDT) From: Kees Cook To: "Rafael J. Wysocki" , Daniel Lezcano , Justin Stitt Cc: Kees Cook , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] cpuidle: dt: refactor deprecated strncpy Date: Fri, 29 Sep 2023 11:45:22 -0700 Message-Id: <169601312172.3009670.14336910026222113184.b4-ty@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230913-strncpy-drivers-cpuidle-dt_idle_states-c-v1-1-d16a0dbe5658@google.com> References: <20230913-strncpy-drivers-cpuidle-dt_idle_states-c-v1-1-d16a0dbe5658@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 29 Sep 2023 11:45:39 -0700 (PDT) On Wed, 13 Sep 2023 00:23:19 +0000, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > A suitable replacement is `strscpy` [2] due to the fact that it guarantees > NUL-termination on the destination buffer. With this, we can also drop > the now unnecessary `CPUIDLE_(NAME|DESC)_LEN - 1` pieces. > > [...] Applied to for-next/hardening, thanks! [1/1] cpuidle: dt: refactor deprecated strncpy https://git.kernel.org/kees/c/fd94c38f8441 Take care, -- Kees Cook