Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3106668rdh; Thu, 28 Sep 2023 02:52:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFSS7ExVIudpYFRQvkNYAE7IqFu3al9lnYo1Ozu6HwR8bxGOqzg1dRmPuCUiBJ7AS2DuCNO X-Received: by 2002:a17:90a:760e:b0:274:98ae:d72f with SMTP id s14-20020a17090a760e00b0027498aed72fmr591971pjk.38.1695894727421; Thu, 28 Sep 2023 02:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695894727; cv=none; d=google.com; s=arc-20160816; b=ghBTxE7wS50OtldhZ1Cvt4Xhshme/GJYy58CdOXEoGfQWCFCl6+w3ykGP0pqOKhVst hJwnL7wqgPYJn93A8QkiXIg1jqoHwx94X/Hk4MwzJbXKxX2Q7yOhZniKF3O2IAmH+gtB fleiux9F9NMkzRB9u6xZPZ0X7xQ1+w8oN3pqv+4qNf6PvLNeBJHSvHX+AzlW69DS6XC6 OSglxnECm51ft+XSkCVD0qNbMZUrtKYUnszfwjfSMnl0bxzOnVpkxabYL6U1oy3zK+ux u6o4Z++zKznXcZ0a4ODVfiMrOjW6ZHOLsjQ6yPS8D7xuJNDRu4ghBrv7RXDkSB86Tr/M CONA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=z1H2jD/T72wNFGuODad3ytbvumv6Q48VnTWsSVBuRsw=; fh=zCTj3XDzN1DFJeI1W7EcJ8obiz4qzhm4/H/9qgfDz64=; b=d5CZ8mR/EWI9KXP28m1KEelO6At62VXUr1azUkLTID1zx9AGMN6ZJWOP7X3VKXVn0t Ot32YjOW/Vmkifn1Qe/P+ie6lXKABGHxjjQJk8o+WeYYW08yG+u17/XhnK/AEiVfsCw8 24D8AsgRsgLQe0uswhoG5i43j27yvo3OXnQJTOkQFz0uWveSRYho4bOOjmWhsrouVIra V2a34BTU3ZqDzrdU15LnkjOW2pNqiJQErDQprScE9xkzKjlHWq00j28D3yfVvQFEVlKE Z7Q5655gDG2TZRPcKZq2c5DsDRPM31bwB6HabwIqGU3zZpGfdgLWLujeh4n8FQVD7U+H MF7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=iYyyotxd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id m6-20020a170902db0600b001bdafae4b7dsi11708132plx.43.2023.09.28.02.52.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 02:52:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=iYyyotxd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id ADF5C82FAF0E; Thu, 28 Sep 2023 02:37:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231669AbjI1JhA (ORCPT + 99 others); Thu, 28 Sep 2023 05:37:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231451AbjI1Jg7 (ORCPT ); Thu, 28 Sep 2023 05:36:59 -0400 Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68E28126 for ; Thu, 28 Sep 2023 02:36:58 -0700 (PDT) Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-5a21ea6baccso10503757b3.1 for ; Thu, 28 Sep 2023 02:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695893817; x=1696498617; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=z1H2jD/T72wNFGuODad3ytbvumv6Q48VnTWsSVBuRsw=; b=iYyyotxdZcY7GeAWfkwQHCbAcmXYX2yFhqFvDtSsC0GOoA7FGgQLNBI4x6RKTaAS91 xdW3A8SvXjntIOeJaPN//Z+Nfz4ZsJl6efOmstUsXw+fS9mFJAvDvY4h5ZsQgrkzrmbn 2Je5GTppxGjnnJk1zO70+172yBnb5Lh5snbGjzydV+zcjAXQZ7pWSjA+n9iVXwlEEsUx NTGg2QL3TOffPl9+Uv1dGQllHNaBQ4atf6nS1JtWr9SPBQxJ6Cjscg5pSfK+UraBKEVg f2N0HBkkdgZ071sX4JVJ+x8zUnve8DJwlZaHi3ssN8ci/SpWsx0J2B+hotICZlgMflX4 MSWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695893817; x=1696498617; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z1H2jD/T72wNFGuODad3ytbvumv6Q48VnTWsSVBuRsw=; b=n1WM8X0WG90E021wdJhhrlfiaicx7Gh0PY8RJQuz8qJH5UgugWQjrf1HRx9VEqF9Zu UZv1IdR/V++xkVtzN2qylZ3E7L7qPvuVNcEXTD2XpunCphtL4Hj0gjj3fETcdo27wY7T 0WCQMnSaZBLKMPzwkkxJcGS3eLT7BwZr+MQYrk0NNWEK7xRqqCXbDXRhBj5cB8Bu8I6g lz4IW7RO9DU8UL2boQqESOQJvlm3R2g1bQEBJkWLurVYAcquScrX33XSH70Yi+FMBjl0 Jdp5jyUUpG+oIhxHX0LTFnF72JSU7hCkfzA5tFS3nU4jFTmwF6xHKT886Q5qzml3wQLi lYGg== X-Gm-Message-State: AOJu0YzwhrApUX8pbcXPF+z6egCXGBXM3Bx7ZFgcaocJXnfWmkCjHlZt zmxyEYC9AzHsKjSF7OFaZ5OueL1TWPuzdMmerQ4= X-Received: by 2002:a81:6c17:0:b0:59b:eb5b:fbbb with SMTP id h23-20020a816c17000000b0059beb5bfbbbmr671357ywc.12.1695893817456; Thu, 28 Sep 2023 02:36:57 -0700 (PDT) MIME-Version: 1.0 References: <202309280610.sLGSPkOG-lkp@intel.com> In-Reply-To: <202309280610.sLGSPkOG-lkp@intel.com> From: Miguel Ojeda Date: Thu, 28 Sep 2023 11:36:46 +0200 Message-ID: Subject: Re: drivers/md/dm-cache-metadata.c:1705:9: warning: 'strncpy' specified bound 16 equals destination size To: kernel test robot , Alasdair Kergon , Mike Snitzer Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Kees Cook , Nick Desaulniers , Luc Van Oostenryck Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 28 Sep 2023 02:37:02 -0700 (PDT) On Thu, Sep 28, 2023 at 12:24=E2=80=AFAM kernel test robot = wrote: > > In function 'write_hints', > inlined from 'dm_cache_write_hints' at drivers/md/dm-cache-metadat= a.c:1729:6: > >> drivers/md/dm-cache-metadata.c:1705:9: warning: 'strncpy' specified bo= und 16 equals destination size [-Wstringop-truncation] > 1705 | strncpy(cmd->policy_name, policy_name, sizeof(cmd->pol= icy_name)); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~ This looks fine given the check above it. In any case, since it appears the code wants to terminate the string, this should use `strscpy*()`, right? Cheers, Miguel