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: <CAK-6q+iY02szz_EdxESDZDEaCfSjF0e3BTskZr1YWhXpei+qHg@mail.gmail.com>
Date: Sat, 7 Jun 2025 15:50:53 -0400
From: Alexander Aring <aahringo@...hat.com>
To: Ramon Fontes <ramonreisfontes@...il.com>
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com, 
	linux-wpan@...r.kernel.org, alex.aring@...il.com, miquel.raynal@...tlin.com, 
	netdev@...r.kernel.org
Subject: Re: [PATCH] Integration with the user space

Hi,

On Sat, Jun 7, 2025 at 1:47 PM Ramon Fontes <ramonreisfontes@...il.com> wrote:
>
> Hi Alex, thanks for the feedback!
>
> You're right, using AF_PACKET raw sockets on a monitor-mode wpan_dev
> is indeed sufficient for user-space access to the raw PHY, and we’ve
> also tested that setup successfully for basic communication.
>
> However, if the use case focuses on evaluating realistic wireless
> scenarios, where connectivity and interference vary across links. For
> that, we rely on wmediumd, which integrates at the PHY level
> (mac802154_hwsim) and controls per-link delivery based on configurable
> SNR values and propagation models (e.g., log-distance, shadowing).
> This allows us to emulate asymmetric topologies and partial
> connectivity, something raw sockets alone cannot provide (or can?),
> since all virtual radios are fully connected by default.
>

It sounds to me like you want to do some specific 802.15.4 things and
the raw socket interface is too generic to do your tests.

> In this context, wmediumd becomes essential for simulating:
>
> - Packet loss due to weak signal or distance;

There is a generic way by using netem qdisc and using AF_PACKET
without PACKET_QDISC_BYPASS, should do something like that.
If you really want to do something else there or only act on 802.15.4
fields and you hit the limitations of netem then this is something
netem needs to be extended.

> - Asymmetric links (e.g., node A hears B, but not vice versa);

You can do that already with mac802154_hwsim, it is a directed network
graph. A->B and B<-A need to be there so that A<->B can talk to each
other, you can drop one of the edges and it is asymmetric.

> - Controlled interference between nodes;

netem again? Or any kind of tc egress action with a ebpf script.

> - Link-specific behaviors needed for higher-layer protocol evaluation.
>

That can mean anything. I need more information.

> Additionally, by inducing realistic transmission failures, wmediumd
> allows us to test MAC-layer features like retransmission (ARET) and
> ACK handling (AACK) in a meaningful way, which would not be triggered
> in a fully-connected environment.
>

There is no ACK handling in mac802154 as it needs to be handled by the
hardware, but I agree that there can be something similar like netem
in 802.15.4 that only fake reports about missing acks, or failed
retransmission to the upper layer. (whoever the user currently is and
there is only one I know that is MLME association).

> Let me know if you'd like me to elaborate further or clarify anything
> about this.
>

I am not sure about this as there exists generic network hooks which I
believe can be used to reach your use cases in e.g. tc. In combination
with a ebpf program you can do a lot of specific 802.15.4 frame
handling and do whatever you want. If you hit some limitations in
those generic hooks then the right way is to extend those areas.

Maybe the "fake" ack reporting is something that hwsim needs to
support as this is usually implemented by the driver to ask the
hardware for.

With that being said, however there are so few users of 802.15.4 in
Linux and adding your specific stuff, I might add it if this helps you
currently... but I think there are better ways to accomplish your use
cases by using existing generic infrastructure and don't add handling
for that into hwsim.

- Alex


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ