Re: [PATCH 1/1] virtio_console: fix missing byte order handling for cols and rows

Michael S. Tsirkin
2025-04-02T15:40:10Z

On Wed, Apr 02, 2025 at 05:26:59PM +0200, Halil Pasic wrote:
> On Sat, 22 Mar 2025 01:29:54 +0100
> Halil Pasic <pasic@linux.ibm.com> wrote:
>
> > As per virtio spec the fields cols and rows are specified as little
> > endian.
> [..]
>
> @Amit: Any feedback?
>
> >
> > Fixes: 8345adbf96fc1 ("virtio: console: Accept console size along with resize control message")
> > Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
> > Cc: stable@vger.kernel.org # v2.6.35+
> > ---
> >
> > @Michael: I think it would be nice to add a clarification on the byte
> > order to be used for cols and rows when the legacy interface is used to
> > the spec, regardless of what we decide the right byte order is. If
> > it is native endian that shall be stated much like it is stated for
> > virtio_console_control. If it is little endian, I would like to add
> > a sentence that states that unlike for the fields of virtio_console_control
> > the byte order of the fields of struct virtio_console_resize is little
> > endian also when the legacy interface is used.
>
> @MST: any opinion on that?
>
> [..]

native endian for legacy. Yes extending the spec to say this is right.

--
MST