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: <acb923ce-82f0-4a0a-bcfc-aadf00b746b6@huawei.com>
Date: Tue, 27 Jan 2026 10:54:23 +0300
From: Dmitry Skorodumov <skorodumov.dmitry@...wei.com>
To: Eric Dumazet <edumazet@...gle.com>
CC: Kuniyuki Iwashima <kuniyu@...gle.com>, Dmitry Skorodumov
	<dskr99@...il.com>, <netdev@...r.kernel.org>, Jakub Kicinski
	<kuba@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>, Xiao Liang
	<shaw.leon@...il.com>, <linux-kernel@...r.kernel.org>, Andrew Lunn
	<andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, Paolo Abeni
	<pabeni@...hat.com>
Subject: Re: [PATCH v2 net-next 2/3] ipvlan: Common code from v6/v4
 validator_event

On 1/27/2026 10:37 AM, Eric Dumazet wrote:
> On Tue, Jan 27, 2026 at 6:56 AM Dmitry Skorodumov
> <skorodumov.dmitry@...wei.com> wrote:
>> It even might be a good idea to replace wherever possible preprocessor
>> checks with runtime checks. Use
>> if (IS_ENABLED(CONFIG_IPV6)) { ... }
>>
>> instead of #if IS_ENABLED(CONFIG_IPV6) ... #endif
>>
>> --
>>
>> I'm ok with both approaches (though i tend to like runtime checks) - but
>> unsure what is a common practice in bpf-net
> 
> What you call runtime checks is in reality the same : C compiler is
> able to optimize constant boolean expressions

Should I fix patches to be something like

if (nblock == &ipvlan_addr4_vtor_notifier_block) {
} else if (IS_ENABLED(CONFIG_IPV6)) {
   ...
}

but still with __maybe_unused for ipvlan_addr6_vtor_notifier_block ?

I see that this __maybe_unused is used quite often in linux-kernel in 
similar way

Dmitry


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ