lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <YCB+BRp7WIa8YoO3@kernel.org> Date: Mon, 8 Feb 2021 01:55:49 +0200 From: Jarkko Sakkinen <jarkko@...nel.org> To: David Howells <dhowells@...hat.com>, mchehab+huawei@...nel.org Cc: sprabhu@...hat.com, christian@...uner.io, selinux@...r.kernel.org, keyrings@...r.kernel.org, linux-api@...r.kernel.org, linux-fsdevel@...r.kernel.org, linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org, containers@...ts.linux-foundation.org Subject: Re: [PATCH 1/2] Add namespace tags that can be used for matching without pinning a ns On Fri, Feb 05, 2021 at 08:25:35AM +0000, David Howells wrote: > Jarkko Sakkinen <jarkko@...nel.org> wrote: > > > > + * init_ns_common - Initialise the common part of a namespace > > > > Nit: init_ns_common() > > Interesting. The majority of code doesn't put the brackets in. > > > I've used lately (e.g. arch/x86/kernel/cpu/sgx/ioctl.c) along the lines: > > > > * Return: > > * - 0: Initialization was successful. > > * - -ENOMEM: Out of memory. > > Actually, looking at kernel-doc.rst, this isn't necessarily the recommended > approach as it will much everything into one line, complete with dashes, and > can't handle splitting over lines. You probably meant: > > * Return: > * * 0 - OK to runtime suspend the device > * * -EBUSY - Device should not be runtime suspended A line beginning with dash, lines up just as well, as one beginning with an asterisk. I've also tested this with "make htmldocs". This is Mauro's response to my recent patch: https://lore.kernel.org/lkml/20210125105353.5c695d42@coco.lan/ So, what I can make up from this is that they are equally good alternatives. What I'm not still fully registering is the dash after the return value. I mean double comma is used after parameter. Why this weird dash syntax is used after return value I have no idea, and the kernel-doc.rst does not provide any explanation. > > > * Return: > > * - 0: Initialization was successful. > > * - -ENOMEM: Out of memory. > > > > Looking at the implementation, I guess this is a complete representation of > > what it can return? > > It isn't. It can return at least -ENOSPC as well, but it's awkward detailing > the errors from functions it calls since they can change and then the > description here is wrong. I'm not sure there's a perfect answer to that. > > David What if you just add this as the last entry: * * -errno: Otherwise. /Jarkko
Powered by blists - more mailing lists