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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d5727371-e580-a956-7846-b529f17048ca@infradead.org>
Date: Thu, 13 Jul 2023 22:03:15 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: Jakub Kicinski <kuba@...nel.org>, corbet@....net
Cc: linux-doc@...r.kernel.org, arkadiusz.kubalewski@...el.com,
 netdev@...r.kernel.org
Subject: Re: [PATCH docs] scripts: kernel-doc: support private / public
 marking for enums

Hi Jon,

On 6/21/23 20:10, Randy Dunlap wrote:
> 
> 
> On 6/21/23 15:35, Jakub Kicinski wrote:
>> Enums benefit from private markings, too. For netlink attribute
>> name enums always end with a pair of __$n_MAX and $n_MAX members.
>> Documenting them feels a bit tedious.
>>
>> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> 
> Reviewed-by: Randy Dunlap <rdunlap@...radead.org>
> Tested-by: Randy Dunlap <rdunlap@...radead.org>
> 
> Thanks.

I have a need for this patch. Are you planning to merge it?

in current linux-next docs build:

../include/drm/drm_connector.h:527: warning: Enum value 'DRM_MODE_COLORIMETRY_COUNT' not described in enum 'drm_colorspace'

That enum identifier could/should be marked as private:.

Thanks.

> 
>> ---
>> Hi Jon, we've CCed you recently on a related discussion
>> but it appears that the fix is simple enough so posting
>> it before you had a chance to reply.
>> ---
>>  scripts/kernel-doc | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/scripts/kernel-doc b/scripts/kernel-doc
>> index 2486689ffc7b..66b554897899 100755
>> --- a/scripts/kernel-doc
>> +++ b/scripts/kernel-doc
>> @@ -1301,6 +1301,9 @@ sub dump_enum($$) {
>>      my $file = shift;
>>      my $members;
>>  
>> +    # ignore members marked private:
>> +    $x =~ s/\/\*\s*private:.*?\/\*\s*public:.*?\*\///gosi;
>> +    $x =~ s/\/\*\s*private:.*}/}/gosi;
>>  
>>      $x =~ s@/\*.*?\*/@@gos;	# strip comments.
>>      # strip #define macros inside enums
> 

-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ