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: <20250925190012.58e1b3b1@kernel.org>
Date: Thu, 25 Sep 2025 19:00:12 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Fernando Fernandez Mancera <fmancera@...e.de>
Cc: Ján Václav <jvaclav@...hat.com>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
 <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
 netdev@...r.kernel.org
Subject: Re: [PATCH v2 net-next] net/hsr: add protocol version to fill_info
 output

On Thu, 25 Sep 2025 10:37:38 +0200 Fernando Fernandez Mancera wrote:
> > I'm not very familiar with HSR or PRP. But The PRP_V1 which has value
> > of 3 looks like a kernel-internal hack. Or does the protocol actually
> > specify value 3 to mean PRP?
> > 
> > I don't think there's anything particularly wrong with the code.
> > The version is for HSR because PRP only has one version, there's no
> > ambiguity.
> > 
> > But again, I'm just glancing at the code I could be wrong..
> >   
> 
> No you are right, this is a hack made to integrate PRP with HSR driver. 
> PRP does not have a version other than PRP_V1 therefore it does not make 
> much sense to configure it. Having said that, I think it's weird to 
> report HSR_VERSION 3 but fail when configuring it.
> 
> IMHO HSR_VERSION should be hidden for PRP or it should be possible to 
> configure it to "3" (which now that you say it, it looks weird).

I think we're in agreement then? i was suggesting:

--- a/net/hsr/hsr_netlink.c
+++ b/net/hsr/hsr_netlink.c
@@ -166,6 +166,8 @@ static int hsr_fill_info(struct sk_buff *skb, const struct net_device *dev)
 		goto nla_put_failure;
 	if (hsr->prot_version == PRP_V1)
 		proto = HSR_PROTOCOL_PRP;
+	else if (nla_put_u8(skb, IFLA_HSR_VERSION, hsr->prot_version))
+		goto nla_put_failure;
 	if (nla_put_u8(skb, IFLA_HSR_PROTOCOL, proto))
 		goto nla_put_failure;

This will not report the HSR version if prot is PRP

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ