Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp5934849rwb; Wed, 21 Sep 2022 14:54:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4QS0AAdHTm7KauqRgw2BXgTnLyMv4sy2yGTKEx+eDXZ0HjOGWl5T5d2D2HU/qteSrBkJ5h X-Received: by 2002:a05:6402:40c2:b0:44f:963d:1ab4 with SMTP id z2-20020a05640240c200b0044f963d1ab4mr159330edb.319.1663797247345; Wed, 21 Sep 2022 14:54:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663797247; cv=none; d=google.com; s=arc-20160816; b=taPWlYUQvj8rYqgnKZcoC9GId9Y+FAosXJLM7ecxtk8WWMD+P6YQImEbnpFdRT2b02 iJOmqbORsoXB+XOO8hH5ZkV5R8+nzWPWb+pYoUo2HAsBz3Q1u2o06wvd1hddEg2TRSEA HYD6z0z9zhQonalUQlCKc0s9BfBhaIIz1aYxZnq1HkBWWU1/m0zCLnKD/uYwAJl2MvTH bWy1uPREL2SzM7qWrsRKB2+NjTBhqZueVD7r99kD+ATQF9qYX7tAUEkrrCzIe+e5Xmpt FtGx7vbVBx09kAkGDXQFiOMrvMcUwQa5D5lD9JC7eFvBhttHIuaBXwe7ZWXCT/TUfXoY DUtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature:dkim-filter; bh=7isKC+YSrGaask6vUXhGDpDQnw8IL3toZv6gUCLE72s=; b=nbybLlK9IXxxMU/hXWoTtR/U4zIN+B9PKrz5wTVrvYPLC6rQ0it9l/wGM4GnSTvEyU b4EbIKMNzoaQE8yY1GHNnzQAr3DoA1SKCmHgdE4JX8yPnowv3l+PvJv4N8iV+5cpxB1i OAZm5AufccdSLwoTSxzj2jJzOpeO/Z+FbygVxn1vBM5AV5i8i3q/l232jZUbwnPgDe5S xgocfuFYlmeJr60oo2kgV02QVWmTfpF5VjHvQyVeVIHOV3KLD5dhkslAozO52e6Qor2R /KYSplbkxL1WC5cu5Ypv2FJV9HG8LnU2ztJxbSOYwYXk317jbnTv3oUMu9xuAOH4HOlh GkaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=rEOiBVfn; 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 2-20020a508e42000000b0043a6e796231si3139150edx.544.2022.09.21.14.53.24; Wed, 21 Sep 2022 14:54:07 -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=@lwn.net header.s=20201203 header.b=rEOiBVfn; 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 S229911AbiIUVAn (ORCPT + 99 others); Wed, 21 Sep 2022 17:00:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229761AbiIUVAl (ORCPT ); Wed, 21 Sep 2022 17:00:41 -0400 Received: from ms.lwn.net (ms.lwn.net [45.79.88.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 800359F77D; Wed, 21 Sep 2022 14:00:39 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:281:8300:73::5f6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id BE8B3536; Wed, 21 Sep 2022 21:00:38 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net BE8B3536 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1663794039; bh=7isKC+YSrGaask6vUXhGDpDQnw8IL3toZv6gUCLE72s=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=rEOiBVfntAQvQ1GXrONqpjs813fenB0/n52jEVdwxQ1YknIczxpIKHAmyjezOCPxg o1aKp2E2GraujCxZmQ+hGhSFbda0QsqNhQOj0OpcfE3Qbjo7lUgAz34y0IzS14BEK7 JOzPWrqIVvpVOHqYgJS270Gv5p1JcGSp7WT7anNLntwFeqjh23hk5glbEAWcAbXpOT cafgxu3hHWtRwGBV2u/aggSOC6rIoQO9ks5ckVyCCqXdL3qziATkQ+9qvqzAih1iVR DdkkTgrwNZzHDyrnHRnsjtc8qduw3CAYr8++oGI0UC0Ho/9Rp4XqnEFZW6psFNuCEL mDFM0l/VGvb7A== From: Jonathan Corbet To: Kees Cook Cc: Kees Cook , Mauro Carvalho Chehab , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [RFC] docs: Define c_paren_attributes for attributes with arguments In-Reply-To: <20220902223507.2537469-1-keescook@chromium.org> References: <20220902223507.2537469-1-keescook@chromium.org> Date: Wed, 21 Sep 2022 15:00:36 -0600 Message-ID: <87mtastpcb.fsf@meer.lwn.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 Kees Cook writes: > 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' > > Move such attributes to "c_paren_attributes" and add __alloc_size > and __diagnose_as to the list. So which tree are those warnings coming from? I can't reproduce them with linux-next. As Akira noted, the kernel-doc script is the source of those warnings, so changing the Sphinx configuration is unlikely to help. I think we just need to teach kernel-doc to ignore those attributes. Thanks, jon