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] [day] [month] [year] [list]
Date:   Sun, 4 Sep 2022 21:34:32 -0400
From:   Alexander Aring <aahringo@...hat.com>
To:     Miquel Raynal <miquel.raynal@...tlin.com>
Cc:     Alexander Aring <alex.aring@...il.com>,
        Stefan Schmidt <stefan@...enfreihafen.org>,
        linux-wpan - ML <linux-wpan@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Eric Dumazet <edumazet@...gle.com>,
        Network Development <netdev@...r.kernel.org>,
        David Girault <david.girault@...vo.com>,
        Romuald Despres <romuald.despres@...vo.com>,
        Frederic Blain <frederic.blain@...vo.com>,
        Nicolas Schodet <nico@...fr.eu.org>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH wpan-next v2 02/11] net: mac802154: Drop IEEE802154_HW_RX_DROP_BAD_CKSUM

Hi,

On Fri, Aug 26, 2022 at 10:41 AM Miquel Raynal
<miquel.raynal@...tlin.com> wrote:
>
> This IEEE802154_HW_RX_DROP_BAD_CKSUM flag was only used by hwsim to
> reflect the fact that it would not validate the checksum (FCS). In other
> words, the filtering level of hwsim is always "NONE" while the core
> expects it to be higher.
>
> Now that we have access to real filtering levels, we can actually use
> them and always enforce the "NONE" level in hwsim. Handling this case
> correctly in the receive path permits to drop the above mentioned flag.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@...tlin.com>
> ---
>  drivers/net/ieee802154/mac802154_hwsim.c | 10 +++++++++-
>  include/net/mac802154.h                  |  4 ----
>  net/mac802154/rx.c                       |  6 ++----
>  3 files changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/ieee802154/mac802154_hwsim.c b/drivers/net/ieee802154/mac802154_hwsim.c
> index 38c217bd7c82..d7e4048e8743 100644
> --- a/drivers/net/ieee802154/mac802154_hwsim.c
> +++ b/drivers/net/ieee802154/mac802154_hwsim.c
> @@ -148,6 +148,8 @@ static int hwsim_hw_start(struct ieee802154_hw *hw)
>         struct hwsim_phy *phy = hw->priv;
>
>         phy->suspended = false;
> +       hw->phy->filtering = IEEE802154_FILTERING_NONE;
> +
>         return 0;
>  }
>
> @@ -161,6 +163,9 @@ static void hwsim_hw_stop(struct ieee802154_hw *hw)
>  static int
>  hwsim_set_promiscuous_mode(struct ieee802154_hw *hw, const bool on)
>  {
> +       /* hwsim does not filter anything, so enforce the NONE level */
> +       hw->phy->filtering = IEEE802154_FILTERING_NONE;
> +
>         return 0;
>  }
>
> @@ -791,7 +796,10 @@ static int hwsim_add_one(struct genl_info *info, struct device *dev,
>         phy->idx = idx;
>         INIT_LIST_HEAD(&phy->edges);
>
> -       hw->flags = IEEE802154_HW_PROMISCUOUS | IEEE802154_HW_RX_DROP_BAD_CKSUM;
> +       /* This is a lie, hwsim does not even filter bad FCS, but we need to
> +        * advertize a PROMISCUOUS to be able to create COORD interfaces.
> +        */

I think this is now different because PROMISCUOUS/any disable address
filtering will disable AACK and this is not what we want, or? This
comment was made with the assumption to deal with acks which we can't?

I did not look further into this patch series yet.

- Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ