From: Stefano Brivio <sbrivio@redhat.com>
To: Volker Diels-Grabsch <v@njh.eu>
Cc: passt-dev@passt.top
Subject: Re: [PATCH v4] Send an initial ARP and NDP request to resolve the guest IP address
Date: Fri, 12 Sep 2025 08:23:44 +0200 [thread overview]
Message-ID: <20250912082344.01888466@elisabeth> (raw)
In-Reply-To: <aMMnbHBIRQbApl-7@6153f789-1cf1-4ca3-8cea-6fa7ae195a8b.njh.eu>
On Thu, 11 Sep 2025 21:47:56 +0200
Volker Diels-Grabsch <v@njh.eu> wrote:
> Stefano Brivio wrote:
> > > memcpy(c->guest_mac, eh->h_source, ETH_ALEN);
> > > + info("Guest MAC address: %s", eth_ntop(c->guest_mac, bufmac, sizeof(bufmac)));
> >
> > This is one line you can break easily instead. But I don't think it
> > should be info(), otherwise the guest can happily spam system logs on
> > the host.
> >
> > I'm undecided between suggesting debug() or trace(), because on one
> > hand it's a rather relevant information (maybe say "New guest MAC
> > address"?), on the other hand nothing prevents a guest from using a
> > different MAC address every other frame, and make debugging with --debug
> > impossible if this happens.
>
> For debugging this issue that message was extremely helpful, so I
> strongly recommend to not hide it in trace(). I personally would
> even like to keep it info(), but I'll demote it to debug() as you
> request.
I think you're right, it should ideally be info(), but as long as we
don't have a mechanism to rate limit messages, we need to be mindful of
potential denial of service vectors. System loggers will, in general,
not limit us much.
> > We don't have (yet) a generic rate limiting mechanism for prints.
> > Maybe we could go with trace() for the moment, and the day we have it,
> > switch this to a rate-limited debug() (or even info(), at that point).
>
> In the unlikely case a client really does spam us with an every
> changing MAC address, we can still easily grep those messages out.
...unless we're using a log file (quite common if we debug) and we
exceed the maximum size. There's a mandatory limit on it, again for
security reasons, and once we exceed it we start overwriting entries.
Of course, if we're debugging a specific issue in this sense, we can
just increase the size limit, so debug() should be kind of fine as well.
> I'll soon provide v5 of my patch.
Thanks! I'll review it in a bit.
--
Stefano
next prev parent reply other threads:[~2025-09-12 6:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-10 11:35 [PATCH v4] Send an initial ARP and NDP request to resolve the guest IP Volker Diels-Grabsch
2025-09-10 11:35 ` [PATCH v4] Send an initial ARP and NDP request to resolve the guest IP address Volker Diels-Grabsch
2025-09-10 14:32 ` Stefano Brivio
2025-09-11 19:47 ` Volker Diels-Grabsch
2025-09-12 6:23 ` Stefano Brivio [this message]
2025-09-10 14:10 ` [PATCH v4] Send an initial ARP and NDP request to resolve the guest IP Stefano Brivio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250912082344.01888466@elisabeth \
--to=sbrivio@redhat.com \
--cc=passt-dev@passt.top \
--cc=v@njh.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).