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: <aC4aNCpZMoYJ7R02@strlen.de>
Date: Wed, 21 May 2025 20:23:48 +0200
From: Florian Westphal <fw@...len.de>
To: Lance Yang <lance.yang@...ux.dev>
Cc: Pablo Neira Ayuso <pablo@...filter.org>,
	Lance Yang <ioworker0@...il.com>, kadlec@...filter.org,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, horms@...nel.org, coreteam@...filter.org,
	linux-kernel@...r.kernel.org, netfilter-devel@...r.kernel.org,
	Zi Li <zi.li@...ux.dev>
Subject: Re: [RESEND PATCH 1/1] netfilter: load nf_log_syslog on enabling
 nf_conntrack_log_invalid

Lance Yang <lance.yang@...ux.dev> wrote:
> > There is no need for 'syslog' to be active for 'log_invalid' to be
> > useful as long as the system in question has e.g. ulogd running
> > and listening to nflog messages.
> > 
> > If anything, the modprobe should be done only when no logger
> > is registered.
> 
> Yes, could we load the module only when no logger exists? Something
> like:
> 
> + if (nf_logger_find_get(NFPROTO_IPV4, NF_LOG_TYPE_LOG) != 0)
> + 	request_module("%s", "nf_log_syslog");

This function bumps the module refcount, so if the logger exists you
would need to call nf_logger_put() too.

I'd add a new, simpler helper, that only returns if any logger
is active.

bool nf_log_is_registered(int pf);

or something like that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ