On Fri, Mar 06, 2026 at 10:05:37AM -0700, Keith Busch wrote:
> On Fri, Mar 06, 2026 at 04:57:13PM +0000, Daniel P. Berrangé wrote:
> > The pre-existing serial field should also be length checked to
> > detect & report invalid user input instead of silently truncating.
> 
> Generally fine with that, but worried about user regressions from
> unknowingly relying on the truncation behavior. Could these overflow
> conditions just emit a truncation warn_report instead of failing to
> start?

There is always that possibility that someone is unknowingly having
their data truncated, however, we have generally taken the view that
it is fair game to introduce error checking for invalid input in
these kind of cases. As prior art, we introduced error checking to
the SCSI serial to remove truncation:

  commit 75997e182b695f2e3f0a2d649734952af5caf3ee
  Author: Kevin Wolf <[email protected]>
  Date:   Tue Jun 4 18:17:55 2024 +0200

    scsi-disk: Don't silently truncate serial number

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|


Reply via email to