On Tue, Jan 27, 2026 at 07:49:46AM +0000, Tzung-Bi Shih wrote:
> On Thu, Jan 15, 2026 at 08:57:22AM +0100, Thomas Zimmermann wrote:
> > diff --git a/include/linux/coreboot.h b/include/linux/coreboot.h
> > [...]
> > @@ -63,9 +68,13 @@ struct lb_framebuffer {
> >     u8  blue_mask_size;
> >     u8  reserved_mask_pos;
> >     u8  reserved_mask_size;
> > +   u8  orientation;
> >  } __packed;
> >  
> >  #define LB_FRAMEBUFFER_HAS_LFB(__fb) \
> >     ((__fb)->size >= offsetofend(struct lb_framebuffer, reserved_mask_size))
> >  
> > +#define LB_FRAMEBUFFER_HAS_ORIENTATION(__fb) \
> > +   ((__fb)->size >= offsetofend(struct lb_framebuffer, orientation))
> 
> Wouldn't the new field in struct lb_framebuffer break 
> LB_FRAMEBUFFER_HAS_LFB()?
> E.g., fb->size == offsetofend(struct lb_framebuffer, reserved_mask_size)
>    -> LB_FRAMEBUFFER_HAS_LFB(fb) == true
>    -> LB_FRAMEBUFFER_HAS_ORIENTATION(fb) == false?

The example is wrong, please forget it.

Again, I supposed the "LFB" is tailing data of struct lb_framebuffer.

I meant: is it possible that there is no tailing data
      -> fb->size == offsetofend(struct lb_framebuffer, orientation)
      -> LB_FRAMEBUFFER_HAS_LFB() == true falsely.

Reply via email to