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: <m2mspsgnj9.fsf@gmail.com>
Date: Wed, 17 Apr 2024 13:51:38 +0100
From: Donald Hunter <donald.hunter@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org,  "David S. Miller" <davem@...emloft.net>,  Eric
 Dumazet <edumazet@...gle.com>,  Paolo Abeni <pabeni@...hat.com>,  Jiri
 Pirko <jiri@...nulli.us>,  Jacob Keller <jacob.e.keller@...el.com>,  Pablo
 Neira Ayuso <pablo@...filter.org>,  Jozsef Kadlecsik
 <kadlec@...filter.org>,  netfilter-devel@...r.kernel.org,
  coreteam@...filter.org,  donald.hunter@...hat.com
Subject: Re: [PATCH net-next v3 3/4] tools/net/ynl: Handle acks that use
 req_value

Jakub Kicinski <kuba@...nel.org> writes:

> On Tue, 16 Apr 2024 20:32:14 +0100 Donald Hunter wrote:
>> The nfnetlink family uses the directional op model but errors get
>> reported using the request value instead of the reply value.
>
> What's an error in this case ? "Normal" errors come via NLMSG_ERROR

Thanks for pointing out what should have been obvious. Looking at it
again today, I realise I missed the root cause which was a bug in the
extack decoding for directional ops. When I fix that issue, this patch
can be dropped.

>> diff --git a/tools/net/ynl/lib/nlspec.py b/tools/net/ynl/lib/nlspec.py
>> index 6d08ab9e213f..04085bc6365e 100644
>> --- a/tools/net/ynl/lib/nlspec.py
>> +++ b/tools/net/ynl/lib/nlspec.py
>> @@ -567,6 +567,18 @@ class SpecFamily(SpecElement):
>>            return op
>>        return None
>>  
>> +    def get_op_by_value(self, value):
>> +        """
>> +        For a given operation value, look up operation spec. Search
>> +        by response value first then fall back to request value. This
>> +        is required for handling failure cases.
>
> Looks like we're only going to need it in NetlinkProtocol, so that's
> fine. But let's somehow call out that this is a bit of a hack, so that
> people don't feel like this is the more correct way of finding the op
> than direct access to rsp_by_value[].

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ