Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp347478rwb; Mon, 26 Sep 2022 20:26:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM51S/E8w5iHRnxaya8yrldvojnJPE5nrBb0agBzDRIzp64Pkn2D1ul7L9+zqQicguZ4F1aj X-Received: by 2002:a17:90b:3a87:b0:202:d8b7:2c03 with SMTP id om7-20020a17090b3a8700b00202d8b72c03mr2136908pjb.199.1664249187227; Mon, 26 Sep 2022 20:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664249187; cv=none; d=google.com; s=arc-20160816; b=xorsBod4S/8ylpHQAJrhkPsXqIOau0aNtMQfzUEwe3PG+Sti9p/dG6NiNi0inXPG0i 0aIgVbKb1YKsgIbhM9pUkC7rkqA0/5wGIhg9xAGitQ8hReTeuEr2abl4VtC+6sWaqdep jN5QyqgnPlrOGlH2hnDsthdLsogsDHGZ6g6oHir4ivLynNft0v+jfSzxXH5E6DN8VgJp vT37dqngG2QJGN1Fh0APHAjgGrs4D5zzI0pCQuVn6wUhAqRAp3cZkFD5yh+r2KCgkm51 vaqIKTzhdmJ54TNV2oSXTraM0u9mgUsmC9mQxVnexI8nc8WVEI8BCcfDE7e5wE6MoO3Q FFgA== 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=85M7BEeaq9zxW2h3AU3e8O57XOSPgZunos10OsJfDq0=; b=J7nfc66ArAnKIES91jCJ21WhnrUmQI1kvFW7ubfSKUdn0g8q85UVlU/EipXgnhzovE AMe/mRF2WrweJxTpw35Mfuk3FHBooWPRYJ0gzyX2y6eiYx+lBGJ8QbxbPXQADTwSfd22 bVvv+ifXOURGz0dsIEM5I9u8crayupzsfxdX2q4rrOqp6tppfasyovCVo0uubtYYOGtf 8Ct+FnNqhVFmMqnJuehM7Mt2blXB1zXmJ7/ueGrG6Iok+wMnsH8RVFlYv7slnO02IKXU IewlWb10SX1oa+32Tz61TCgz0L/ZZZeH8TiyLW4LWzCStQ2NEE3NWN3sawc0DLVOHhtQ v+xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KfigKs+p; 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 t9-20020a6549c9000000b00439494dfd20si577404pgs.202.2022.09.26.20.26.15; Mon, 26 Sep 2022 20:26:27 -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=KfigKs+p; 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 S230448AbiI0DJ3 (ORCPT + 99 others); Mon, 26 Sep 2022 23:09:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230523AbiI0DIU (ORCPT ); Mon, 26 Sep 2022 23:08:20 -0400 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAC2012206B for ; Mon, 26 Sep 2022 20:02:40 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id 78so8196507pgb.13 for ; Mon, 26 Sep 2022 20:02:39 -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=85M7BEeaq9zxW2h3AU3e8O57XOSPgZunos10OsJfDq0=; b=KfigKs+pa68qGUfx08Fz5iZPF/LbCgHd5uxt/2Dh09KNMPECXa9wkgYQDDy1HXmGCV Y71VHxpZ8kiRBtnqJtoPdQsrWPXgvL0uXPs4xxdOjBkOj6/pYkI9X2XpMAa2Vdb+B0mM lSLI/IFeoBVrfsSvKaNYLN0lfIjsVSL31i7rI= 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=85M7BEeaq9zxW2h3AU3e8O57XOSPgZunos10OsJfDq0=; b=eK/Roq0yHJ/ovI3b/m8ZetfJrB7mtQtM/a32DdKEzryixTy/FFQoY+8AkJviUTq6Wj vvZ+3vHorR6vbEtr129NKitU+9UFys2e0KFUbaLnA7jE7FrBR01vm2DNydxMlV0Cv3ZM MXMVzG8pb0iJJr33wvdAe2331QjfFuxIXNrdRNIexahpQoqnzRbR8hllzx+mIgkWUNAh qbaWuysDNZgePTZZJgbV+g8GcOztF/aj159w9rA3IKBjYfcG73XyOKxvJcrel2pO0jiL zGpEuoTByDzTZKoGbpwyOrX95dp7+BSbJoC0tRkLvirgvSH/qrewgojkSbHXesnEuvRN Z9bw== X-Gm-Message-State: ACrzQf1sBsOvyCb4lvjVNaHFfEko7WbJK9LAZv3ompt//lB8lAFJ9rvc Al0evIuI8rWrYpUYaIgYwfo4rQ== X-Received: by 2002:a63:6b83:0:b0:43c:17e8:c2a5 with SMTP id g125-20020a636b83000000b0043c17e8c2a5mr21546502pgc.457.1664247738268; Mon, 26 Sep 2022 20:02:18 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id f26-20020a639c1a000000b0042254fce5e7sm234514pge.50.2022.09.26.20.02.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 20:02:17 -0700 (PDT) Date: Mon, 26 Sep 2022 20:02:16 -0700 From: Kees Cook To: Akira Yokosawa Cc: Matthew Wilcox , Jonathan Corbet , linux-doc@vger.kernel.org, linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] overflow: Fix kern-doc markup for functions Message-ID: <202209261959.A202D045@keescook> References: <20220926194713.1806917-1-keescook@chromium.org> <202209261408.59F78C0D@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.2 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 Tue, Sep 27, 2022 at 11:53:38AM +0900, Akira Yokosawa wrote: > Hi, > > Somehow Kees added me in Cc:, so let me comment. :-) > > On Mon, 26 Sep 2022 14:09:10 -0700, Kees Cook wrote: > > On Mon, Sep 26, 2022 at 10:06:19PM +0100, Matthew Wilcox wrote: > >> On Mon, Sep 26, 2022 at 12:47:13PM -0700, Kees Cook wrote: > >>> -/** check_add_overflow() - Calculate addition with overflow checking > >>> +/** > >>> + * check_add_overflow - Calculate addition with overflow checking > >>> * > >>> * @a: first addend > >>> * @b: second addend > >> > >> Why did you remove the ()? And why didn't you delete the blank line? > >> According to our documentation, the canonical form is: > >> > >> /** > >> * function_name() - Brief description of function. > >> * @arg1: Describe the first argument. > >> * @arg2: Describe the second argument. > >> * One can provide multiple line descriptions > >> * for arguments. > > Matthew, you call it the "canonical form", my take is more of a "template > that is known to work". Out of curiosity, why is the trailing "()" part of the standard template? Isn't it redundant? Or is trying to help differentiate between things that are non-callable? (i.e. a variable, etc.) > > Hunh, everywhere I'd looked didn't have the "()" (which seems > > redundant). The blank line was entirely aesthetics for me. If it's > > supposed to be without a blank, I can fix it up everwhere. > > So, I think this is more of a territory of preference or consistency > rather than that of correctness. Those extra blank lines can be confusing > as most people expect it in front of description part. > > get_maintainer.pl says Kees is the sole maintainer of overflow.h, so > it's his call, I guess. Well, maintainer or not, I want to make sure stuff is as readable as possible by everyone else too. :) I'm happy to skip the blank lines! -- Kees Cook