From: Thorsten Blum <thorsten.blum@linux.dev>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND 1/2] x86/boot: validate earlyprintk= baud rate
Date: Fri, 15 May 2026 12:47:50 +0200 [thread overview]
Message-ID: <agb51om47Vu_kVnv@linux.dev> (raw)
In-Reply-To: <a2ab80f3-2887-499c-951b-1b587ea58b2b@intel.com>
Hi Dave,
On Wed, May 13, 2026 at 10:05:30AM -0700, Dave Hansen wrote:
> > Values greater than BASE_BAUD would produce divisor 0, and
> > baud 1 would produce divisor BASE_BAUD, which exceeds 16 bits.
>
> My inclination would be to leave this code as simple as possible. If
> users screw up a baud rate, they'll get no output and have to go fix it.
>
> Why does this need to be robust against bad user input?
OK, I guess any baud rate that doesn't crash or hang the system is
acceptable. Let's drop patch 1/2 then and I'll resend patch 2/2 as a
standalone patch.
I've also sent another patch yesterday that prevents the same division
by zero and thus early boot hang in early_serial_init() when using
console=uart8250:
https://lore.kernel.org/lkml/20260514143014.516303-3-thorsten.blum@linux.dev/
Thanks,
Thorsten
prev parent reply other threads:[~2026-05-15 10:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 16:48 [PATCH RESEND 1/2] x86/boot: validate earlyprintk= baud rate Thorsten Blum
2026-05-13 16:48 ` [PATCH RESEND 2/2] x86/boot: use BASE_BAUD and DEFAULT_SERIAL_PORT Thorsten Blum
2026-05-13 17:05 ` [PATCH RESEND 1/2] x86/boot: validate earlyprintk= baud rate Dave Hansen
2026-05-15 10:47 ` Thorsten Blum [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=agb51om47Vu_kVnv@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.