Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp306621rwb; Wed, 21 Sep 2022 22:58:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7/QBhjiLEYhrQ6FV+gTW9N0EH3RpM9hUeaMnDIKyEK6o3hZK3SjouyavyGiECwechJesPI X-Received: by 2002:a05:6402:548a:b0:454:762b:158b with SMTP id fg10-20020a056402548a00b00454762b158bmr1561422edb.362.1663826289659; Wed, 21 Sep 2022 22:58:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663826289; cv=none; d=google.com; s=arc-20160816; b=akl1WaLI0eq0JT6UoDUOrkBwBOi34oweXKmmrIfdcYHJq+1qdWJ9EEJ3LUSKy9tMB0 69sYsBUJP1mT3BRZLv86enP3Ji+TL5T2A3RaLn3lQ9pJKhBhPzTQoFVJhJbyjMBfbozb EICC/+6/myTtEcFCIb1PpFTnDYJB2+HsouB2sZySjs95620wjl+Tz+T9d1lOCIIb+rso 3+tJDymg478d1SqfrewmbztyGWHOuiyjT2JzNM1anKY4O4Y7oV9oFafJSgRtmORt4NC6 buGBBCtzsaLKL1jE2pgoELO2UH85J4HtKooEzGdaa7XdfHAcrqUsD+anFRNhKBvmV2ZK 5qmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=29krL0qvuFg0KCphJZfO0u7z2tvgm5X6ahpdbCTG5JM=; b=xlHkQ/qjW8lq8CIACHZKKk8eufKSnzSlC4clzrOcA5Qwul1sKgNE6dvn/N+vc8fzK8 EzX0kSId9WlfhzdkzAFyeSg9uVxqt7YYOrbCkuUewDCUPvTfkxTcVhyMYFTP3pzOyXx2 zzLmsj9BcaUWVwAijTNj3LMvr9Tk7uT+3d1lKeC4sTb2h+a8HaX88L/IjQl1w0Uy+x4T 9iW2pIGTQrPs4I+jEI9R+o92teOFe+iVrhvCEF5+Zt+W7FXLtoRmeTD46Tadmr0u0tZk OdFp2eTuV7h9dRAfCQfPJDy9tgJuH9LCDnXPlK00MPWzv/BtFVU9xM/dtgpoXEOZ8TRv 9QOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=n2CDFCVq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id au19-20020a170907093300b0073d6ad8251asi3673828ejc.812.2022.09.21.22.57.43; Wed, 21 Sep 2022 22:58:09 -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=@chromium.org header.s=google header.b=n2CDFCVq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230034AbiIVFab (ORCPT + 99 others); Thu, 22 Sep 2022 01:30:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230001AbiIVFaa (ORCPT ); Thu, 22 Sep 2022 01:30:30 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1A73ABF13 for ; Wed, 21 Sep 2022 22:30:28 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id u132so8197893pfc.6 for ; Wed, 21 Sep 2022 22:30:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=29krL0qvuFg0KCphJZfO0u7z2tvgm5X6ahpdbCTG5JM=; b=n2CDFCVq+NijhKq28N0Aj315cnhJnRhM4bxGYBq+d9sJPi7E9uujmDTxRYvi5M2We2 lIbhnGBVBDwMTmPm4TFmJjWPUY3nRltAQWpXrXCg1v4oGqm+nVHzlU5jdmJHrxz7I1Hl tYp5BSHxCOH42fzVB/A8OR4XlMt8IE7wguFeE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=29krL0qvuFg0KCphJZfO0u7z2tvgm5X6ahpdbCTG5JM=; b=nnfQO7CmRqaA4V/yX6mVAFroHLsbj4cntMLmQi7rp4IzVjNrT1ikBoIoYxnI1oAmjR bdTokIcAnhhY3t8UpX7UiT0CPKMLWdQJs8cl/8xib6oL3rMGTv5eRhmC6mhoj3se9vWX GoEMwsbD/LorEk50Qaj8f2iLYPrPcuRCdDTcYgqxT8gQ+x0KCvqMmCRTpoG+pIXsvtEk 5f2Hq8giWEIFBoYRSXTcvdlW0Jo5ygltninXG0dXA6O26uttf3PPGavnWJTBkSH0Vjmp rrDbxBATy8CQG3FesdibLnf7bwwF33MhZ2L3qGMZQhPUrqzUkUpcZElBBWx4oJzEA4K8 M+eg== X-Gm-Message-State: ACrzQf21db0KwXjbvxQyBUQD/Esbt4sNR4mSnEg+2r2fH16bfdQEGsW+ 0pwy4wsX2BtbQReSiPHI9J2WmA== X-Received: by 2002:a05:6a00:1743:b0:548:8629:ceab with SMTP id j3-20020a056a00174300b005488629ceabmr1764304pfc.23.1663824628324; Wed, 21 Sep 2022 22:30:28 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id l187-20020a633ec4000000b0043057fe66c0sm2834975pga.48.2022.09.21.22.30.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 22:30:27 -0700 (PDT) Date: Wed, 21 Sep 2022 22:30:26 -0700 From: Kees Cook To: Akira Yokosawa Cc: corbet@lwn.net, linux-doc@vger.kernel.org, linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, mchehab@kernel.org Subject: Re: [RFC] docs: Define c_paren_attributes for attributes with arguments Message-ID: <202209212229.1C07A60456@keescook> References: <20220902223507.2537469-1-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 09, 2022 at 02:08:30PM +0900, Akira Yokosawa wrote: > Hi Kees, > > I expected some responses from Jon, but looks like he's been busy > elsewhere. Let me chime in. > > On Fri, 2 Sep 2022 15:35:07 -0700, Kees Cook wrote: > > While Sphinx's "c_id_attributes" is needed for basic attributes, any > > attributes with arguments need to be defined in "c_paren_attributes" > > to avoid errors like: > > > > include/linux/fortify-string.h:116: warning: Function parameter or member '__builtin_strncpy' not described in '__diagnose_as' > > include/linux/fortify-string.h:116: warning: Function parameter or member '1' not described in '__diagnose_as' > > include/linux/fortify-string.h:116: warning: Function parameter or member '2' not described in '__diagnose_as' > > include/linux/fortify-string.h:116: warning: Function parameter or member '3' not described in '__diagnose_as' > > These warnings are from ./scripts/kernel-doc. > So I think you need to teach the script about "__diagnose_as" so that > the kernel-doc comment of strncpy() can be converted to reST doc > which Sphinx can understand. Ah! Thank you, yeah, I couldn't figure out where it was coming from. > Past changes in ./scripts/kernel-doc might give you some hints. Yeah, including changes from me for similar things. How quickly I forgot! :) Thanks, -Kees -- Kees Cook