Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp365180rdh; Thu, 26 Oct 2023 04:40:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE2QV5rQzt3rxOTMC3nPrnV8LBCUFIh9R09dqsNK6I+A9ySVh1YN9UPYz8PNj8uIY3cEJfJ X-Received: by 2002:a81:a050:0:b0:5a7:ba54:af02 with SMTP id x77-20020a81a050000000b005a7ba54af02mr19237089ywg.38.1698320404504; Thu, 26 Oct 2023 04:40:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698320404; cv=none; d=google.com; s=arc-20160816; b=DlrvhhgCxmYeNnjkG3bijN8yFhvQmuyI+MK9PJOFd4qkzBgDi2XEfnNFdRQEfWosNr CJcjiwCIbk6wzgeI8qjVkbdsBJSyPTZL71GdSxwaG7sFCDpiyde5W7FbMIWUntuEsIOU X+r10L8Bt7mkvKGOQPiVnRpgne0R1vRjJn/n0iLZIT1K4bEYjTca3gm4tgtw0kg1fyG8 Sxl3rTybtBaqbLgA2RqFqGt5W4ic40QzOAtFFb0HCVEf2otgm5t+6NHXp649pKl98WIR XMlbMAsOlvbSNceUVFApSV0FInOIYk5N3GayK6w6P6hiIrNMCqU6UOyYL62Y+hT/2lFv aP7Q== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature:dkim-signature; bh=cC2m9sp442/6JKPD0tDZG5DV412+p8kB6v4uIIzcPAg=; fh=4oFIBvjkGBrFQjfOZaP0K0NSi6L1wsR9QAlkMeIrLkA=; b=sdKORUY7fRqdYlNWMgQtxFXgB/TmJiROrp9SCha7Nl4TZqOsyG1Iupzx+lt0pPCuSY 1dw/68RBxDqAJ1HyMJoNWVYsHXPzBIyE6edq9dAI5ONf8xBWf+kHXnxGRDDnQfA2A6Nw 2hbnBWphbu/ynDqo06TdwxheBOlWBMAUAlNmiARtRkevQ4tmbcPxKolfhSaGWw3Z2alS peEjJaUu4gawAtEhgXI/pzXTjGRzjZYqxy1/wHcoCcBsmS1mRLYqaUY+PRUTKtLO4E1E hEPqbQ4Jd+Imm5+eoSTo3dhCCvsGBNoLic3n37cP+MG3eXez0SkrIE9PBt4cHdG2v7uG hdDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=fwONLk6q; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=qxtjAYvv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id m18-20020a81d252000000b005a7bfce4d4dsi16676341ywl.439.2023.10.26.04.40.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 04:40:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=fwONLk6q; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=qxtjAYvv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D0DC3824E536; Thu, 26 Oct 2023 04:40:01 -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 S229803AbjJZLjx (ORCPT + 99 others); Thu, 26 Oct 2023 07:39:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbjJZLjw (ORCPT ); Thu, 26 Oct 2023 07:39:52 -0400 Received: from bedivere.hansenpartnership.com (bedivere.hansenpartnership.com [IPv6:2607:fcd0:100:8a00::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 759721A6; Thu, 26 Oct 2023 04:39:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1698320388; bh=E0eOwIPtihtJQ34i/6glHc8gw6B1tMUkjKoloY9JA8c=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References:From; b=fwONLk6q1c7TvXFm5OzVovef/DUpPEuN3P1dMnh+P3FFYONlYhJM+uoqLGaUxHj+N 5nzlER3CU4FqJ0RwJtwvPTceTwa99uwdF4AnL6qTaQ5gEZyqJiJNqlC++cgVyc49xy oEu9fEMm1Egf9iInc++yeVoW6IATtKGyOJNP23VU= Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id 34CF61281005; Thu, 26 Oct 2023 07:39:48 -0400 (EDT) Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavis, port 10024) with ESMTP id GZyeXo-IasqM; Thu, 26 Oct 2023 07:39:48 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1698320387; bh=E0eOwIPtihtJQ34i/6glHc8gw6B1tMUkjKoloY9JA8c=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References:From; b=qxtjAYvvE0Vi6sg087QDeL3/NbMdbKAZoCilTz/nelv3UIdvStxp5H/8ArFkSL/fK yQckNC0O8U6WOqY6IGXxTO1OjAKRZyUME3Zh0o0cZ+wJNIKFYB5EvvZUG/Q8jubcnq +hfe/MPqhAKEOZDLM4iJ6JnL7oxI7JV1CJeAkgFA= Received: from lingrow.int.hansenpartnership.com (unknown [IPv6:2601:5c4:4302:c21::c14]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id E59CD128037B; Thu, 26 Oct 2023 07:39:46 -0400 (EDT) Message-ID: <710149630eb010b18b69e161d02502bc3b648173.camel@HansenPartnership.com> Subject: Re: the nul-terminated string helper desk chair rearrangement From: James Bottomley To: Christoph Hellwig , Kees Cook Cc: Justin Stitt , Keith Busch , Jens Axboe , Sagi Grimberg , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, ksummit@lists.linux.dev Date: Thu, 26 Oct 2023 07:39:44 -0400 In-Reply-To: <20231026100148.GA26941@lst.de> References: <20231018-strncpy-drivers-nvme-host-fabrics-c-v1-1-b6677df40a35@google.com> <20231019054642.GF14346@lst.de> <202310182248.9E197FFD5@keescook> <20231020044645.GC11984@lst.de> <202310201127.DA7EDAFE4D@keescook> <20231026100148.GA26941@lst.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=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]); Thu, 26 Oct 2023 04:40:01 -0700 (PDT) On Thu, 2023-10-26 at 12:01 +0200, Christoph Hellwig wrote: > > > There's some docs at [1]. Perhaps there could be more? > > > > > > [1]: > > > https://elixir.bootlin.com/linux/v6.6-rc6/source/include/linux/fortify-string.h#L292 > > > > Right, And it's even valid kern-doc, which gets rendered in the > > kernel API docs, along with all the other string functions: > > https://docs.kernel.org/core-api/kernel-api.html#c.strscpy > > Well, I never use the generated kerneldoc because it's much harder > than just grepping the tree, but indeed it exists even if it's hidden > in the most obsfucated way.  But at least I know now! This, honestly, is one of the really annoying problems of kerneldoc. When looking for structures or functions git grep " -" usually finds it. However, I recently asked on linux-scsi if we could point to the doc about system_state and what it meant. However, either we all suck or there's no such documentation because no-one could find it. While it's nice in theory to have everything documented, it's not much use if no one can actually find the information ... James