Index | Thread | Search

From:
"Theo de Raadt" <deraadt@openbsd.org>
Subject:
Re: another yubikey diff
To:
Mark Kettenis <mark.kettenis@xs4all.nl>
Cc:
miod@online.fr, tech@openbsd.org
Date:
Fri, 22 Aug 2025 08:42:27 -0600

Download raw body.

Thread
Mark Kettenis <mark.kettenis@xs4all.nl> wrote:

> > From: "Theo de Raadt" <deraadt@openbsd.org>
> > Date: Fri, 22 Aug 2025 08:31:19 -0600
> > 
> > Why not invert this with a "donotconnect" variable, then your diff
> > shrinks significantly.
> 
> Not really; the struct wkbddev_attach_args is typically allocated on
> the stack, without an explicit memset, so the new member must be set.

So change all those stack allocations to = { 0 }

And change one driver to set .noconnect = 1;


Making the default noconnect is going to explode someone's head later
on when they write a new kbd driver.