From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Michael Bommarito <michael.bommarito@gmail.com>
Cc: Jiri Slaby <jirislaby@kernel.org>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty: n_gsm: bound the EA scan in gsm_control_rls()
Date: Sun, 7 Jun 2026 16:57:09 +0200 [thread overview]
Message-ID: <2026060721-herring-renewably-622b@gregkh> (raw)
In-Reply-To: <CAJJ9bXw46vThuvzE-x73unRDm8n2ibq8+KF0+YO3gtipf1PNkQ@mail.gmail.com>
On Sun, Jun 07, 2026 at 07:09:06AM -0400, Michael Bommarito wrote:
> On Sun, Jun 7, 2026 at 2:38 AM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > While it's fun to throw LLMs at this codebase, how was this actually
> > tested? there are loads of documented "problems" with this file, but in
> > the real world, with real devices, it works fine so without testing of
> > the code with those devices, we have to be careful with changing
> > anything here.
>
> Understood. A few different notes for you to consider on this one:
>
> 1. This is almost certainly the continuation / completion of
> 669609cea1d29, where two other sites were similarly addressed. I
> think Daniel could answer if there was a reason why he didn't include
> this spot, but there's no evidence in the commit log or code comments
> otherwise.
It was perhaps missed, or not actually needed? Again, how was this
tested?
> 2. The backport situation on 67c37756898a5 (the CAP_NET_ADMIN gate)
> looks complicated because it wasn't originally stable tagged and
> didn't get actioned by vendors for awhile, so I think reachability for
> unprivileged chaining in attacks is still high.
Distros/vendors know all about this line dicipline and they enable it at
their own risk. There should not be any that has it enabled for normal
users, and I would not enabling it at all except for systems that
actually has this hardware.
> 3. I'm normally running tests on UML or qemu for every patch I submit.
> Sometimes, the AI assistance tag is more about the testing side of the
> patch than anything else.
That's fine, but where is the test?
> For example, for this patch, here's what Claude logged for the
> regression testing:
>
> <CLAUDE>
> repro/loopback.c stands up two real N_GSM0710 line disciplines in
> one UML kernel, wired back to back through a userspace byte relay — so
> the kernel runs both the
> initiator and responder TS 27.010 state machines (not a
> userspace-faked peer like trigger.c). Phases:
>
> - A — DLCI0 + DLCI1 SABM/UA handshake (kernel both ends)
> - B — bidirectional gsmtty data, byte-exact (PING/PONG)
> - C — drop/raise DTR/RTS → real MSC frames → peer modem lines track
> them (before=0x0 low=0x40 high=0x166)
> - D — inject a valid CMD_RLS (clen=2) on DLCI0 → accepted by the
> patched gsm_control_rls, mux keeps carrying data
> - E — clean teardown
> </CLAUDE>
Adding tests like this to the tree would be great.
> 4. Relatedly, I think it would be helpful for someone (Willy again?)
> to improve the guidance for AI assisted testing and establish some
> standards for documentation.
Why not submit it yourself?
> Because most of the kernel doesn't have
> established KUnit setups and dumping all this info is frowned upon in
> commit logs or notes, it seems like there is a tension between
> "showing your work" and sticking to general convention.
Add the test! We'll gladly take them, that would make it even easier to
prove changes work, AND prevent regressions in the future.
thanks,
greg k-h
prev parent reply other threads:[~2026-06-07 15:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-06 17:03 [PATCH] tty: n_gsm: bound the EA scan in gsm_control_rls() Michael Bommarito
2026-06-07 6:37 ` Greg Kroah-Hartman
2026-06-07 11:09 ` Michael Bommarito
2026-06-07 14:57 ` Greg Kroah-Hartman [this message]
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=2026060721-herring-renewably-622b@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=michael.bommarito@gmail.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox