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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9dbb815a-0137-4565-ad91-8ed92d53bced@gmail.com>
Date: Tue, 5 Nov 2024 23:14:29 +0100
From: Alexandre Ferrieux <alexandre.ferrieux@...il.com>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
 Pedro Tammela <pctammela@...atatu.com>, edumazet@...gle.com
Cc: jhs@...atatu.com, xiyou.wangcong@...il.com, jiri@...nulli.us,
 netdev@...r.kernel.org
Subject: Re: [PATCH net] Fix u32's systematic failure to free IDR entries for
 hnodes.

> On 04/11/2024 22:33, Vadim Fedorenko wrote:
>>> On 04/11/2024 18:00, Pedro Tammela wrote:
>>>> 'static inline' is discouraged in .c files
>>> 
>>> Why ?
>>> 
>>> It could have been a local macro, but an inline has (a bit) better type
>>> checking. And I didn't want to add it to a .h that is included by many other
>>> unrelated components, as it makes no sense to them. So, what is the recommendation ?
>> 
>> Either move it to some local header file, or use 'static u32 
>> handle2id(u32 h)'
>> and let compiler decide whether to include it or not.
> 
> I believe you mean "let the compiler decide whether to _inline_ it or not".
> Sure, with a sufficiently modern Gcc this will do. However, what about more
> exotic environments ? Wouldn't it risk a perf regression for style reasons ?
> 
> And speaking of style, what about the dozens of instances of "static inline" in
> net/sched/*.c alone ? Why is it a concern suddenly ?

Can you please explain *why* in the first place you're saying "'static inline'
is discouraged in .c files" ? I see no trace if this in coding-style.rst, and
the kernel contains hundreds of counter-examples.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ