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: <20211215153310.27367243@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Wed, 15 Dec 2021 15:33:10 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Alex Elder <elder@...aro.org>
Cc:     Network Development <netdev@...r.kernel.org>,
        "bjorn.andersson@...aro.org" <bjorn.andersson@...aro.org>
Subject: Re: Port mirroring (RFC)

On Tue, 14 Dec 2021 08:47:12 -0600 Alex Elder wrote:
> I am implementing what amounts to port mirroring functionality
> for the IPA driver.
> 
> The IPA hardware isn't exactly a network switch (it's sort of
> more than that), but it has the ability to supply replicas of
> packets transferred within it to a special (read only) interface.
> 
> My plan is to implement this using a new "ipa_mirror" network
> device, so it could be used with a raw socket to capture the
> arriving packets.  There currently exists one other netdev,
> which represents access through a modem to a WWAN network.
> 
> I would like some advice on how to proceed with this.  I want
> the result to match "best practice" upstream, and would like
> this to be as well integrated possible with existing network
> tools.
> 
> A few details about the stream of packets that arrive on
> this hardware interface:
> - Packet data is truncated if it's larger than a certain size
> - Each packet is preceded by a fixed-size header describing it
> - Packets (and their headers) are aggregated into a buffer; i.e.
>    a single receive might carry a dozen (truncated) packets
> 
> Here are a few specific questions, but I would love to get
> *any* feedback about what I'm doing.
> - Is representing this as a separate netdev a reasonable
>    thing to do?
> - Is there anything wrong with making a netdev read-only?
>    (Any packets supplied for transmit would be dropped)
> - Are there things I should do so it's clear this interface
>    does not carry IP traffic (or even UDP, etc.)?
> - Should the driver de-aggregate the received packets, i.e.
>    separating each into a separate SKB for reading?
> 
> I might have *many* more questions, but I'd just like to make
> sure I'm on the right track, and would like both specific and
> general suggestions about how to do this the right way.

Maybe the first question to ask is - why do you need this?
Or perhaps - how is it used? There's a significant difference 
between an interface for users and a debug interface.

Do you aim to give users control over the forwarding which happens
on the application processor at some point? If so Andrew and Florian
give great suggestions but starting from debugging of the forwarding
feels a little backward.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ