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]
Date:   Sun, 04 Dec 2022 14:26:43 +0100
From:   netdev@...io-technology.com
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org,
        Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v8 net-next 2/2] net: dsa: mv88e6xxx: mac-auth/MAB
 implementation

On 2022-11-15 23:23, Vladimir Oltean wrote:
> 
> Is it beneficial in any way to pass the violation type to
> mv88e6xxx_handle_violation(), considering that we only call it from the
> "miss" code path, and if we were to call it with something else 
> ("member"),
> it would return a strange error code (1)?
> 
> I don't necessarily see any way in which we'll need to handle the
> "member" (migration, right?) violation any different in the future,
> except ignore it, either.
> 

MV88E6XXX_G1_ATU_OP_AGE_OUT_VIOLATION will also be handled, and it could 
be
that MV88E6XXX_G1_ATU_OP_FULL_VIOLATION would want handling, though I 
don't
know of plans for that.

The MV88E6XXX_G1_ATU_OP_MEMBER_VIOLATION interrupt can be suppressed if 
we
want.

I think a switch on the type is the most readable code form.


p.s. I have changed it, so that global1_atu.c reads:

         if (val & MV88E6XXX_G1_ATU_OP_MISS_VIOLATION) {
                 dev_err_ratelimited(chip->dev,
                                     "ATU miss violation for %pM portvec 
%x spid %d\n",
                                     entry.mac, entry.portvec, spid);
                 chip->ports[spid].atu_miss_violation++;

                 if (!fid) {
                         err = -EINVAL;
                         goto out;
                 }

                 if (chip->ports[spid].mab)
                         err = mv88e6xxx_handle_violation(chip, spid, 
&entry,
                                                          fid, 
MV88E6XXX_G1_ATU_OP_MISS_VIOLATION);
                 if (err)
                         goto out;
         }

with the use of out_unlock in the chip mutex locked case.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ