Re: SSH_USER_AUTH

2022-09-18 Thread Darren Tucker
On Mon, 19 Sept 2022 at 04:36, Joerg Sonnenberger  wrote:
> does anyone still know the motivation for SSH_USER_AUTH pointing to a
> file with the data instead of containing it directly?

Authentication data is sensitive and a process's environment variables
can be inspected by any other process on the system, whereas files
have ownership and permission bits that control access.

-- 
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA (new)
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.



Re: hidmt: clickpad detection

2022-09-18 Thread Lucas Raab
On Tue, Sep 13, 2022 at 11:06:33PM +0200, Ulf Brosziewski wrote:
> The diff below improves the way hidmt identifies clickpads, and
> addresses the problems described in
> https://marc.info/?l=openbsd-tech&m=165296530618617&w=2
> and
> https://marc.info/?l=openbsd-tech&m=165980534415586&w=2
> 
> If devices don't report a HUD_BUTTON_TYPE property, the driver checks
> whether they claim to have an external left button, and if they do,
> hidmt doesn't treat them as clickpads.
> 
> I think this part of the logic should be turned around:  hidmt should
> treat everything as clickpad except if there is no "clickpad button"
> (HUP_BUTTON 1) *and* both an external left and an external right button
> (HUP BUTTON 2 and 3) are being reported.  Touchpads without the internal
> button are still usable with the clickpad configuration, it does less
> harm to err on this side.
> 
> Tests and OKs would be welcome.

Not qualified to give an OK, but I've been running this for the
past few days on a second gen Framework and double/triple click
works as expected.

Lucas



Re: grdc: show timezone when TZ is set

2022-09-18 Thread Steffen Nurpmeso
David Goerger wrote in
 :
 |Sunday, 20220918 13:38+, Florian Obser wrote:
 |>I'm happy with that, let's do this then
 |>- fix the offset calculation
 |>- output tm->tm_zone in addition to TZ to be able to spot typos.
 |
 |I like the overall diff (thanks!), but one minor formatting nit is that
 |I believe it's more common under ISO 8601[1] to print UTC timezone
 |offset as "+/-%H%M", e.g. "-0400", not as "-4h00". At least, that's
 |what I'm familiar with in SMTP headers.
 |
 |Updated diff below, where only change from your latest diff is in the
 |second printw(3) statement. Tested against both TZ='America/New_York'
 |(-0400) and TZ='Asia/Kolkata' (+0530).
 |
 |Again, thanks for polishing this old "game"!

Only to mention that nothing prevents timezones from using second
offsets also.  This is a political thing, and the TZ DB even is
about to start supporting millisecond resolution (i think).
Anyhow, since you mentioned the SMTP standard, that was surely
an all american miss to go for +-HHMM instead of +-HHMMSS.
The CLOCK_TAI clock is off by only seconds.  (And someone wants to
use its own TZ file, surely atomic-whatever-genitals thus!)

--steffen
|
|Der Kragenbaer,The moon bear,
|der holt sich munter   he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)



ldomd: MAKEDEV: crank vdsp to 24

2022-09-18 Thread Klemens Nanni
With eight domains and two or more disks per domain it is easy to exceed
the current number of 16 virtual disks.

I pass at least one miniroot and one root/data disk to every guest,
one domain has additional disk for softraid testing... >16 already.

Feedback? OK? (for after release)


Index: etc/etc.sparc64/MAKEDEV.md
===
RCS file: /cvs/src/etc/etc.sparc64/MAKEDEV.md,v
retrieving revision 1.99
diff -u -p -r1.99 MAKEDEV.md
--- etc/etc.sparc64/MAKEDEV.md  7 Jan 2022 01:13:15 -   1.99
+++ etc/etc.sparc64/MAKEDEV.md  18 Sep 2022 21:50:07 -
@@ -182,4 +182,4 @@ twrget(all, vcc, ttyV, 0, 1, 2, 3, 4, 5,
 twrget(all, vldc_hvctl, hvctl)dnl
 twrget(all, vldc_spds, spds)dnl
 twrget(all, vldc_ldom, ldom, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 
15)dnl
-target(all, vdsp, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)dnl
+target(all, vdsp, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 
17, 18, 19, 20, 21, 22, 23)dnl



ldomctl: download: add -s to select afterwards

2022-09-18 Thread Klemens Nanni
The T4-2 firmware does NOT select newly downloaded configurations, so
I have to run

# ldomctl download config-try-3-with-this-feature
[... wait... sometimes it hangs and needs ^C + rerun...]
# ldomctl select config-try-3-with-this-feature

The following is much more convenient:

# ldomctl download -s config-try-3-with-this-feature

With firmware that does select automatically, this would just select
twice, which does no harm.

Feedback? OK? (for after release)


diff --git a/usr.sbin/ldomctl/ldomctl.8 b/usr.sbin/ldomctl/ldomctl.8
index ec63fb157e5..3c20ad9009a 100644
--- a/usr.sbin/ldomctl/ldomctl.8
+++ b/usr.sbin/ldomctl/ldomctl.8
@@ -56,7 +56,7 @@ Specify an escape character as per
 .El
 .It Cm delete Ar configuration
 Delete the specified configuration from non-volatile storage.
-.It Cm download Ar directory
+.It Cm download Oo Fl s Oc Ar directory
 Save a logical domain configuration to non-volatile storage on the
 service processor.
 The name of the configuration is taken from the name of the
@@ -69,6 +69,10 @@ Depending on the firmware, the new configuration must be 
activated explicitly
 using the
 .Cm select
 command.
+.Bl -tag -width 3n
+.It Fl s
+Explicitly select the new configuration.
+.El
 .It Cm dump
 Dump the current configuration from non-volatile storage into the current
 working directory.
diff --git a/usr.sbin/ldomctl/ldomctl.c b/usr.sbin/ldomctl/ldomctl.c
index 906ab414488..05601e133ed 100644
--- a/usr.sbin/ldomctl/ldomctl.c
+++ b/usr.sbin/ldomctl/ldomctl.c
@@ -126,7 +126,7 @@ __dead void
 usage(void)
 {
fprintf(stderr, "usage:\t%1$s delete|select configuration\n"
-   "\t%1$s download directory\n"
+   "\t%1$s download [-s] directory\n"
"\t%1$s dump|list|list-io\n"
"\t%1$s init-system [-n] file\n"
"\t%1$s create-vdisk -s size file\n"
@@ -389,8 +389,21 @@ void
 download(int argc, char **argv)
 {
struct ds_conn *dc;
+   int ch, do_select = 0;
 
-   if (argc != 2)
+   while ((ch = getopt(argc, argv, "s")) != -1) {
+   switch (ch) {
+   case 's':
+   do_select = 1;
+   break;
+   default:
+   usage();
+   }
+   }
+   argc -= optind;
+   argv += optind;
+
+   if (argc != 1)
usage();
 
hv_config();
@@ -400,7 +413,9 @@ download(int argc, char **argv)
while (TAILQ_EMPTY(&mdstore_sets))
ds_conn_handle(dc);
 
-   mdstore_download(dc, argv[1]);
+   mdstore_download(dc, argv[0]);
+   if (do_select)
+   mdstore_select(dc, argv[0]);
 }
 
 void



SSH_USER_AUTH

2022-09-18 Thread Joerg Sonnenberger
Hello,
does anyone still know the motivation for SSH_USER_AUTH pointing to a
file with the data instead of containing it directly? It makes the use a
bit more annoying and the only argument I can come up with is not
putting up to about 4KB into the environment.

Joerg



Re: ifconfig, wireguard output less verbose, unless -A or

2022-09-18 Thread Mikolaj Kucharski
Kind reminder.

Below diff at https://marc.info/?l=openbsd-tech&m=166256415030704&w=2


On Wed, Sep 07, 2022 at 03:25:58PM +, Mikolaj Kucharski wrote:
> Hi.
> 
> I didn't get a lof of feedback on this on the code level, however
> got some intput on manual page changes. At the end of the email is
> ifconfig.8 change from jmc@ and ifconfig.c from me.
> 
> 
> On Sat, Sep 03, 2022 at 04:51:03PM +0100, Jason McIntyre wrote:
> > On Sat, Sep 03, 2022 at 08:55:51AM +, Mikolaj Kucharski wrote:
> > > Hi,
> > > 
> > > I tried to address what jmc@ mentioned below. I don't really know
> > > mdoc(7) and English is not my native language, so I imagine there is
> > > place for improvement in the wg(4) diff.
> > > 
> > 
> > hi.
> > 
> > after looking again, i think maybe ifconfig.8 is the better place, but
> > just not where it was originally proposed. by way of a peace offering,
> > how about the diff below?
> > 
> > jmc
> > 
> [...]
> 
> 
> Index: ifconfig.c
> ===
> RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v
> retrieving revision 1.456
> diff -u -p -u -r1.456 ifconfig.c
> --- ifconfig.c8 Jul 2022 07:04:54 -   1.456
> +++ ifconfig.c7 Sep 2022 15:18:50 -
> @@ -363,7 +363,7 @@ void  unsetwgpeer(const char *, int);
>  void unsetwgpeerpsk(const char *, int);
>  void unsetwgpeerall(const char *, int);
>  
> -void wg_status();
> +void wg_status(int);
>  #else
>  void setignore(const char *, int);
>  #endif
> @@ -679,7 +679,7 @@ void  printgroupattribs(char *);
>  void printif(char *, int);
>  void printb_status(unsigned short, unsigned char *);
>  const char *get_linkstate(int, int);
> -void status(int, struct sockaddr_dl *, int);
> +void status(int, struct sockaddr_dl *, int, int);
>  __dead void  usage(void);
>  const char *get_string(const char *, const char *, u_int8_t *, int *);
>  int  len_string(const u_int8_t *, int);
> @@ -1195,7 +1195,7 @@ printif(char *name, int ifaliases)
>   continue;
>   ifdata = ifa->ifa_data;
>   status(1, (struct sockaddr_dl *)ifa->ifa_addr,
> - ifdata->ifi_link_state);
> + ifdata->ifi_link_state, ifaliases);
>   count++;
>   noinet = 1;
>   continue;
> @@ -3316,7 +3316,7 @@ get_linkstate(int mt, int link_state)
>   * specified, show it and it only; otherwise, show them all.
>   */
>  void
> -status(int link, struct sockaddr_dl *sdl, int ls)
> +status(int link, struct sockaddr_dl *sdl, int ls, int ifaliases)
>  {
>   const struct afswtch *p = afp;
>   struct ifmediareq ifmr;
> @@ -3391,7 +3391,7 @@ status(int link, struct sockaddr_dl *sdl
>   mpls_status();
>   pflow_status();
>   umb_status();
> - wg_status();
> + wg_status(ifaliases);
>  #endif
>   trunk_status();
>   getifgroups();
> @@ -5907,7 +5907,7 @@ process_wg_commands(void)
>  }
>  
>  void
> -wg_status(void)
> +wg_status(int ifaliases)
>  {
>   size_t   i, j, last_size;
>   struct timespec  now;
> @@ -5942,45 +5942,47 @@ wg_status(void)
>   printf("\twgpubkey %s\n", key);
>   }
>  
> - wg_peer = &wg_interface->i_peers[0];
> - for (i = 0; i < wg_interface->i_peers_count; i++) {
> - b64_ntop(wg_peer->p_public, WG_KEY_LEN,
> - key, sizeof(key));
> - printf("\twgpeer %s\n", key);
> -
> - if (wg_peer->p_flags & WG_PEER_HAS_PSK)
> - printf("\t\twgpsk (present)\n");
> -
> - if (wg_peer->p_flags & WG_PEER_HAS_PKA && wg_peer->p_pka)
> - printf("\t\twgpka %u (sec)\n", wg_peer->p_pka);
> -
> - if (wg_peer->p_flags & WG_PEER_HAS_ENDPOINT) {
> - if (getnameinfo(&wg_peer->p_sa, wg_peer->p_sa.sa_len,
> - hbuf, sizeof(hbuf), sbuf, sizeof(sbuf),
> - NI_NUMERICHOST | NI_NUMERICSERV) == 0)
> - printf("\t\twgendpoint %s %s\n", hbuf, sbuf);
> - else
> - printf("\t\twgendpoint unable to print\n");
> - }
> + if (ifaliases) {
> + wg_peer = &wg_interface->i_peers[0];
> + for (i = 0; i < wg_interface->i_peers_count; i++) {
> + b64_ntop(wg_peer->p_public, WG_KEY_LEN,
> + key, sizeof(key));
> + printf("\twgpeer %s\n", key);
> +
> + if (wg_peer->p_flags & WG_PEER_HAS_PSK)
> + printf("\t\twgpsk (present)\n");
> +
> + if (wg_peer->p_flags & WG_PEER_HAS_PKA && 
> wg_peer->p_pka)
> + printf("\t\twgpka %u (sec)\n", wg_peer->p_pka);
> +
> + if (wg_peer->p_flags & WG_PEER_HAS_ENDPOINT) {
> + if (get

Re: grdc: show timezone when TZ is set

2022-09-18 Thread David Goerger

Sunday, 20220918 13:38+, Florian Obser wrote:

I'm happy with that, let's do this then
- fix the offset calculation
- output tm->tm_zone in addition to TZ to be able to spot typos.


I like the overall diff (thanks!), but one minor formatting nit is that
I believe it's more common under ISO 8601[1] to print UTC timezone
offset as "+/-%H%M", e.g. "-0400", not as "-4h00". At least, that's
what I'm familiar with in SMTP headers.

Updated diff below, where only change from your latest diff is in the
second printw(3) statement. Tested against both TZ='America/New_York'
(-0400) and TZ='Asia/Kolkata' (+0530).

Again, thanks for polishing this old "game"!

[1] https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC


$ got diff
diff /cvs/src
commit - 5d6f1c4a07abcf6c1413059c603776d5dc6805aa
path + /cvs/src
blob - 66e5eee79e6449916e83660a8c7c62667d04c5ab
file + games/grdc/grdc.c
--- games/grdc/grdc.c
+++ games/grdc/grdc.c
@@ -185,9 +185,12 @@ main(int argc, char *argv[])
vline(ACS_VLINE, YDEPTH);

if (tz != NULL) {
+   int h, m;
+   h = tm->tm_gmtoff / 3600;
+   m = abs((int)tm->tm_gmtoff % 3600 / 60);
move(ybase - 1, xbase);
-   printw("[ %s %+d ]", tz,
-   tm->tm_gmtoff / 60 / 60 );
+   printw("[ %s (%s) %+2.2d%02d]", tz,
+   tm->tm_zone, h, m);
}

attrset(COLOR_PAIR(2));





Re: grdc: show timezone when TZ is set

2022-09-18 Thread Theo de Raadt
Paul Janzen  wrote:

> My issues with the time system are (a) it has to "just work", so it flees
> to UTC the instant something goes wrong, but never makes available any
> status as to whether the asked-for time zone is the one returned, except
> for (b) my program aborts if I'm pledged and I go do something silly with
> the TZ.

There is absolutely nothing wrong with this behaviour.

It is commonly known as 'garbage in, garbage in".



Re: grdc: show timezone when TZ is set

2022-09-18 Thread Paul Janzen
> I disagree with the full-featured support of tzset() for all TZ paths.
> 
> and, of course your private Monticello file is corrupt TZ file, which 
> exercises
> a secret bug in the libc/time parser of the file, and you rely upon it to take
> over control of this program, and other programs.
> 
> 
> I despise this "feature".  It basically says that tzset() requires full
> filesystem access during the whole program lifetime.

I agree.  Anyone who's not actually developing time zone files should be
plenty happy using what exists, or at worst lobbying a sysadmin to add a TZ
file to /usr/share/zoneinfo.  I think this feature exists only for
historical developer convenience.  Otherwise it's just exposure surface.

My issues with the time system are (a) it has to "just work", so it flees
to UTC the instant something goes wrong, but never makes available any
status as to whether the asked-for time zone is the one returned, except
for (b) my program aborts if I'm pledged and I go do something silly with
the TZ.

If the answer to (b) is "don't do silly things", I can live with that,
although in that case I'd think the best answer would be to "just work" and
default to UTC like everything else, rather than aborting -- just like our
setugid() programs do (grdc is now, interestingly, a program that aborts on
localtime() if TZ is outside zoneinfo... unless you make grdc setgid first,
then it works).  Sadly I can't promise I'll stop doing silly things.  But I
have no issue breaking with tradition, revising the documentation, and
insisting that valid TZs are only relative paths inside zoneinfo.

For (a), the issue is that I don't think grdc should display $TZ if TZ is
an invalid timezone or at least not the timezone being used.  Sadly, grdc
has no easy way of telling.  If only there were some API to tell.

Further with grdc, I'd really like it if the string being displayed were
not necessarily all of $TZ, but limited to up to the last  characters
(the end of the time zone string being more interesting than the start),
for n on the order of 40.



Paul Janzen.



Re: iostat's four drives by default

2022-09-18 Thread Jan Stary
Better diff: remove the comment as well.


Index: iostat.8
===
RCS file: /cvs/src/usr.sbin/iostat/iostat.8,v
retrieving revision 1.28
diff -u -p -r1.28 iostat.8
--- iostat.817 Sep 2022 11:39:09 -  1.28
+++ iostat.818 Sep 2022 16:15:26 -
@@ -134,9 +134,9 @@ characters written to terminals
 .It disks
 Disk operations.
 The header of the field is the disk name and unit number.
-If more than four disk drives are configured in the system,
+By default,
 .Nm
-displays only the first four drives.
+displays all drives.
 To force
 .Nm
 to display specific drives, their names may be supplied on the command
Index: iostat.c
===
RCS file: /cvs/src/usr.sbin/iostat/iostat.c,v
retrieving revision 1.44
diff -u -p -r1.44 iostat.c
--- iostat.c12 Jul 2021 15:09:21 -  1.44
+++ iostat.c18 Sep 2022 16:15:26 -
@@ -442,9 +442,8 @@ selectdrives(char *argv[])
if (reps)
interval = 1;
 
-   /* Pick up to 4 drives if none specified. */
if (ndrives == 0)
-   for (i = 0; i < dk_ndrive && ndrives < 4; i++) {
+   for (i = 0; i < dk_ndrive ; i++) {
if (cur.dk_select[i])
continue;
cur.dk_select[i] = 1;



On Sep 18 18:10:51, h...@stare.cz wrote:
> By default, iostat displays the first for drives.
> It would be less surprising if it displayed all drives.
> 
> It seems that the reason to display four is that
> it fits into the 80 columns (that is, with -d; otherwise,
> the cpu and tty display make the line overflow anyway).
> 
>   Jan
> 
> 
> 
> Index: iostat.8
> ===
> RCS file: /cvs/src/usr.sbin/iostat/iostat.8,v
> retrieving revision 1.28
> diff -u -p -r1.28 iostat.8
> --- iostat.8  17 Sep 2022 11:39:09 -  1.28
> +++ iostat.8  18 Sep 2022 16:05:52 -
> @@ -134,9 +134,9 @@ characters written to terminals
>  .It disks
>  Disk operations.
>  The header of the field is the disk name and unit number.
> -If more than four disk drives are configured in the system,
> +By default,
>  .Nm
> -displays only the first four drives.
> +displays all drives.
>  To force
>  .Nm
>  to display specific drives, their names may be supplied on the command
> Index: iostat.c
> ===
> RCS file: /cvs/src/usr.sbin/iostat/iostat.c,v
> retrieving revision 1.44
> diff -u -p -r1.44 iostat.c
> --- iostat.c  12 Jul 2021 15:09:21 -  1.44
> +++ iostat.c  18 Sep 2022 16:05:52 -
> @@ -444,7 +444,7 @@ selectdrives(char *argv[])
>  
>   /* Pick up to 4 drives if none specified. */
>   if (ndrives == 0)
> - for (i = 0; i < dk_ndrive && ndrives < 4; i++) {
> + for (i = 0; i < dk_ndrive ; i++) {
>   if (cur.dk_select[i])
>   continue;
>   cur.dk_select[i] = 1;



iostat's four drives by default

2022-09-18 Thread Jan Stary
By default, iostat displays the first for drives.
It would be less surprising if it displayed all drives.

It seems that the reason to display four is that
it fits into the 80 columns (that is, with -d; otherwise,
the cpu and tty display make the line overflow anyway).

Jan



Index: iostat.8
===
RCS file: /cvs/src/usr.sbin/iostat/iostat.8,v
retrieving revision 1.28
diff -u -p -r1.28 iostat.8
--- iostat.817 Sep 2022 11:39:09 -  1.28
+++ iostat.818 Sep 2022 16:05:52 -
@@ -134,9 +134,9 @@ characters written to terminals
 .It disks
 Disk operations.
 The header of the field is the disk name and unit number.
-If more than four disk drives are configured in the system,
+By default,
 .Nm
-displays only the first four drives.
+displays all drives.
 To force
 .Nm
 to display specific drives, their names may be supplied on the command
Index: iostat.c
===
RCS file: /cvs/src/usr.sbin/iostat/iostat.c,v
retrieving revision 1.44
diff -u -p -r1.44 iostat.c
--- iostat.c12 Jul 2021 15:09:21 -  1.44
+++ iostat.c18 Sep 2022 16:05:52 -
@@ -444,7 +444,7 @@ selectdrives(char *argv[])
 
/* Pick up to 4 drives if none specified. */
if (ndrives == 0)
-   for (i = 0; i < dk_ndrive && ndrives < 4; i++) {
+   for (i = 0; i < dk_ndrive ; i++) {
if (cur.dk_select[i])
continue;
cur.dk_select[i] = 1;



Re: wsmouse(4): Apple-like multi-touch buttons

2022-09-18 Thread Tobias Heider
On Sun, Sep 18, 2022 at 02:21:06PM +0200, Tobias Heider wrote:
> Hi,
> 
> the diff below adds a new mouse type WSMOUSE_TYPE_APPLE which emulates Apples
> touchpad behaviour.  Instead of mapping soft-buttons to an area on the pad,
> the different mouse buttons are mapped to single-finger, two-finger and
> three-finger clicks as is the default in macos.
> 
> The diff enables the new mode on apldcms(4) and aplms(4) which are the drivers
> used by Apple silicon laptops.
> 
> Tested on an m2 air by me and an m1 by robert@.
> 
> ok?

Here's an updated version that does not add a new WSMOUSE_TYPE and as such does
not require any changes in X.  Instead I just pass the button configuration via
params in wsmouse_configure().

To make this work I had to fix a bug in wstpad where the CONFIGURE flag is not
set after initial configuration, which causes all values to be overwritten with
the defaults on each reconfigure triggered from wsmouse_set_params().

diff --git sys/arch/arm64/dev/apldc.c sys/arch/arm64/dev/apldc.c
index 09a03c734da..7962a3c645a 100644
--- sys/arch/arm64/dev/apldc.c
+++ sys/arch/arm64/dev/apldc.c
@@ -1317,6 +1317,11 @@ const struct wsmouse_accessops apldcms_accessops = {
.ioctl = apldcms_ioctl,
 };
 
+static struct wsmouse_param apldcms_params[] = {
+   { WSMOUSECFG_SOFTBUTTONS, 0 },
+   { WSMOUSECFG_MTBUTTONS, 1 },
+};
+
 int apldcms_match(struct device *, void *, void *);
 voidapldcms_attach(struct device *, struct device *, void *);
 
@@ -1372,7 +1377,7 @@ apldcms_configure(struct apldcms_softc *sc)
hw->mt_slots = UBCMTP_MAX_FINGERS;
hw->flags = WSMOUSEHW_MT_TRACKING;
 
-   return wsmouse_configure(sc->sc_wsmousedev, NULL, 0);
+   return wsmouse_configure(sc->sc_wsmousedev, apldcms_params, 2);
 }
 
 void
diff --git sys/arch/arm64/dev/aplhidev.c sys/arch/arm64/dev/aplhidev.c
index 2b00f7e217d..ecfb5b8f4eb 100644
--- sys/arch/arm64/dev/aplhidev.c
+++ sys/arch/arm64/dev/aplhidev.c
@@ -608,6 +608,11 @@ const struct wsmouse_accessops aplms_accessops = {
.ioctl = aplms_ioctl,
 };
 
+static struct wsmouse_param aplms_params[] = {
+   { WSMOUSECFG_SOFTBUTTONS, 0 },
+   { WSMOUSECFG_MTBUTTONS, 1 },
+};
+
 int aplms_match(struct device *, void *, void *);
 voidaplms_attach(struct device *, struct device *, void *);
 
@@ -663,7 +668,7 @@ aplms_configure(struct aplms_softc *sc)
hw->mt_slots = UBCMTP_MAX_FINGERS;
hw->flags = WSMOUSEHW_MT_TRACKING;
 
-   return wsmouse_configure(sc->sc_wsmousedev, NULL, 0);
+   return wsmouse_configure(sc->sc_wsmousedev, aplms_params, 2);
 }
 
 void
diff --git sys/dev/wscons/wsconsio.h sys/dev/wscons/wsconsio.h
index de483493360..497e9a32db7 100644
--- sys/dev/wscons/wsconsio.h
+++ sys/dev/wscons/wsconsio.h
@@ -313,6 +313,7 @@ enum wsmousecfg {
WSMOUSECFG_SOFTBUTTONS = 64,/* 2 soft-buttons at the bottom edge */
WSMOUSECFG_SOFTMBTN,/* add a middle-button area */
WSMOUSECFG_TOPBUTTONS,  /* 3 soft-buttons at the top edge */
+   WSMOUSECFG_MTBUTTONS,   /* multi-finger buttons */
WSMOUSECFG_TWOFINGERSCROLL, /* enable two-finger scrolling */
WSMOUSECFG_EDGESCROLL,  /* enable edge scrolling */
WSMOUSECFG_HORIZSCROLL, /* enable horizontal edge scrolling */
diff --git sys/dev/wscons/wstpad.c sys/dev/wscons/wstpad.c
index be074b89fb8..4384370545e 100644
--- sys/dev/wscons/wstpad.c
+++ sys/dev/wscons/wstpad.c
@@ -72,6 +72,7 @@
 enum tpad_handlers {
SOFTBUTTON_HDLR,
TOPBUTTON_HDLR,
+   MTBUTTON_HDLR,
TAP_HDLR,
F2SCROLL_HDLR,
EDGESCROLL_HDLR,
@@ -149,6 +150,7 @@ struct tpad_touch {
 #define WSTPAD_HORIZSCROLL (1 << 5)
 #define WSTPAD_SWAPSIDES   (1 << 6)
 #define WSTPAD_DISABLE (1 << 7)
+#define WSTPAD_MTBUTTONS   (1 << 8)
 
 #define WSTPAD_MT  (1 << 31)
 
@@ -646,7 +648,23 @@ wstpad_softbuttons(struct wsmouseinput *input, u_int 
*cmds, int hdlr)
}
 
if (tp->softbutton == 0 && PRIMARYBTN_CLICKED(tp)) {
-   tp->softbutton = wstpad_get_sbtn(input, top);
+   if (hdlr == MTBUTTON_HDLR) {
+   switch (tp->contacts) {
+   case 2:
+   tp->softbutton = RIGHTBTN;
+   break;
+   case 3:
+   tp->softbutton = MIDDLEBTN;
+   break;
+   case 1:
+   tp->softbutton = LEFTBTN;
+   break;
+   default:
+   tp->softbutton = 0;
+   break;
+   }
+   } else
+   tp->softbutton = wstpad_get_sbtn(input, top);
if (tp->softbutton)
*cmds |= 1 << SOFTBUTTON_DOWN;
}
@@ -1237,12 +1255,14 @@ wstpa

www: macppc, sparc64: remove hifn(4), safe(4), ubsec(4) links

2022-09-18 Thread Klemens Nanni
Those drivers were removed with the 7.1 release already.
OK?


Index: macppc.html
===
RCS file: /cvs/www/macppc.html,v
retrieving revision 1.278
diff -u -p -r1.278 macppc.html
--- macppc.html 1 Aug 2022 15:58:31 -   1.278
+++ macppc.html 18 Sep 2022 14:32:07 -
@@ -360,13 +360,6 @@ adapters supported by the https://man.openbsd.org/macppc/ubsec.4";>ubsec)
-Hifn 7751/7811/7951/7955/7956-based boards (https://man.openbsd.org/macppc/hifn.4";>hifn)
-SafeNet SafeXcel 1141/1741 (https://man.openbsd.org/macppc/safe.4";>safe)
-
-
 Audio Devices
 
 Apple Aoa audio (https://man.openbsd.org/macppc/aoa.4";>aoa)
Index: sparc64.html
===
RCS file: /cvs/www/sparc64.html,v
retrieving revision 1.410
diff -u -p -r1.410 sparc64.html
--- sparc64.html1 Aug 2022 15:58:31 -   1.410
+++ sparc64.html18 Sep 2022 14:32:07 -
@@ -463,11 +463,6 @@ XVR-1200)
 Aurora SBus sio2/pio1 (https://man.openbsd.org/sparc64/asio.4";>asio/https://man.openbsd.org/sparc64/apio.4";>apio)
PCI serial/parallel communication cards (https://man.openbsd.org/sparc64/puc.4";>puc)
   
- Cryptography Accelerators
-  
-   Hifn 7751/7811/7951/7955/7956-based boards (https://man.openbsd.org/sparc64/hifn.4";>hifn)
-   Bluesteelnet 5501/5601, Broadcom uBsec 
5801/5802/5805/5820/5821/5822/5823 (https://man.openbsd.org/sparc64/ubsec.4";>ubsec)
-  
  PC Cards (PCMCIA)
   
PCMCIA Controllers:



Re: grdc: show timezone when TZ is set

2022-09-18 Thread Florian Obser
I'm happy with that, let's do this then
- fix the offset calculation
- output tm->tm_zone in addition to TZ to be able to spot typos.

OK?

diff --git grdc.c grdc.c
index 66e5eee79e6..05b1ff1ea87 100644
--- grdc.c
+++ grdc.c
@@ -185,9 +185,12 @@ main(int argc, char *argv[])
vline(ACS_VLINE, YDEPTH);
 
if (tz != NULL) {
+   int h, m;
+   h = tm->tm_gmtoff / 3600;
+   m = abs((int)tm->tm_gmtoff % 3600 / 60);
move(ybase - 1, xbase);
-   printw("[ %s %+d ]", tz,
-   tm->tm_gmtoff / 60 / 60 );
+   printw("[ %s (%s) %+dh%02d ]", tz,
+   tm->tm_zone, h, m);
}
 
attrset(COLOR_PAIR(2));



-- 
I'm not entirely sure you are real.



Re: grdc: show timezone when TZ is set

2022-09-18 Thread Theo de Raadt
Paul Janzen  wrote:

> Yeah, I know with pledge() you can't do testing like
> TZ=:/home/pjanzen/dev/usr/share/zoneinfo/testing/2022/America/Kentucky/Monticello
> any more, even though that's a perfectly cromulent and functional TZ on my
> system otherwise. So for the time being, probably any TZ that exists and
> doesn't abort grdc is 38 bytes or shorter.  Which works.


I disagree with the full-featured support of tzset() for all TZ paths.

and, of course your private Monticello file is corrupt TZ file, which exercises
a secret bug in the libc/time parser of the file, and you rely upon it to take
over control of this program, and other programs.


I despise this "feature".  It basically says that tzset() requires full
filesystem access during the whole program lifetime.

Actually it is worse than that.  Most programs do not call tzset().  I would
argue this program should not either.

Because there are 20+ libc API in src/lib/libc/time that will implicitly
do tzset(), whenever they need to.

And there are 10+ other libc API on that will call those libc/time API

And then there probably are thousands of API in other libraries which will
call those, late in a program's lifetime.


Backtracking, I think the idea that programs cannot be filesystem-contained
because of support for a stupid environment variable is dumb, and I think
it should fall back to the localtime or GMT for that program.

Otherwise if we wanted to be perfect, we should add tzset() as the first
function call in main() in ALL programs, which would be far more
repugnant than slowly taking the arbitrary path ability away from TZ, program
by program (in the same way we did for setuid/setgid binaries 20+ years ago).

tzload(const char *name, struct state *sp, int doextend)
...
if (name != NULL && issetugid() != 0) {
if ((name[0] == ':' && (strchr(name, '/') || strstr(name, 
".."))) ||
name[0] == '/' || strchr(name, '.'))
name = NULL;
}


I think you will notice noone notices or cares.


I can mock it further by suggesting we add a O_TZ flag to open() which
tzload() can use to bypass the restrictions, because pointing at a private
personal TZ file is a Unix Right /sarc



wsmouse(4): Apple-like multi-touch buttons

2022-09-18 Thread Tobias Heider
Hi,

the diff below adds a new mouse type WSMOUSE_TYPE_APPLE which emulates Apples
touchpad behaviour.  Instead of mapping soft-buttons to an area on the pad,
the different mouse buttons are mapped to single-finger, two-finger and
three-finger clicks as is the default in macos.

The diff enables the new mode on apldcms(4) and aplms(4) which are the drivers
used by Apple silicon laptops.

Tested on an m2 air by me and an m1 by robert@.

ok?

diff --git sys/arch/arm64/dev/apldc.c sys/arch/arm64/dev/apldc.c
index 09a03c734da..f261c19b13b 100644
--- sys/arch/arm64/dev/apldc.c
+++ sys/arch/arm64/dev/apldc.c
@@ -1363,7 +1363,7 @@ apldcms_configure(struct apldcms_softc *sc)
struct wsmousehw *hw = wsmouse_get_hw(sc->sc_wsmousedev);
 
/* The values below are for the MacBookPro17,1 */
-   hw->type = WSMOUSE_TYPE_TOUCHPAD;
+   hw->type = WSMOUSE_TYPE_APPLE;
hw->hw_type = WSMOUSEHW_CLICKPAD;
hw->x_min = -6046;
hw->x_max = 6536;
diff --git sys/arch/arm64/dev/aplhidev.c sys/arch/arm64/dev/aplhidev.c
index 2b00f7e217d..290520e85cb 100644
--- sys/arch/arm64/dev/aplhidev.c
+++ sys/arch/arm64/dev/aplhidev.c
@@ -654,7 +654,7 @@ aplms_configure(struct aplms_softc *sc)
struct wsmousehw *hw = wsmouse_get_hw(sc->sc_wsmousedev);
 
/* The values below are for the MacBookPro17,1 */
-   hw->type = WSMOUSE_TYPE_TOUCHPAD;
+   hw->type = WSMOUSE_TYPE_APPLE;
hw->hw_type = WSMOUSEHW_CLICKPAD;
hw->x_min = -6046;
hw->x_max = 6536;
diff --git sys/dev/wscons/wsconsio.h sys/dev/wscons/wsconsio.h
index de483493360..67b46da8d1f 100644
--- sys/dev/wscons/wsconsio.h
+++ sys/dev/wscons/wsconsio.h
@@ -245,6 +245,7 @@ struct wskbd_encoding_data {
 #defineWSMOUSE_TYPE_ELANTECH   18  /* Elantech touchpad */
 #defineWSMOUSE_TYPE_SYNAP_SBTN 19  /* Synaptics soft 
buttons */
 #defineWSMOUSE_TYPE_TOUCHPAD   20  /* Generic touchpad */
+#defineWSMOUSE_TYPE_APPLE  21  /* Apple touchpad */
 
 /* Set resolution.  Not applicable to all mouse types. */
 #defineWSMOUSEIO_SRES  _IOW('W', 33, u_int)
@@ -313,6 +314,7 @@ enum wsmousecfg {
WSMOUSECFG_SOFTBUTTONS = 64,/* 2 soft-buttons at the bottom edge */
WSMOUSECFG_SOFTMBTN,/* add a middle-button area */
WSMOUSECFG_TOPBUTTONS,  /* 3 soft-buttons at the top edge */
+   WSMOUSECFG_MTBUTTONS,   /* multi-finger buttons */
WSMOUSECFG_TWOFINGERSCROLL, /* enable two-finger scrolling */
WSMOUSECFG_EDGESCROLL,  /* enable edge scrolling */
WSMOUSECFG_HORIZSCROLL, /* enable horizontal edge scrolling */
diff --git sys/dev/wscons/wstpad.c sys/dev/wscons/wstpad.c
index be074b89fb8..9a74fa65908 100644
--- sys/dev/wscons/wstpad.c
+++ sys/dev/wscons/wstpad.c
@@ -72,6 +72,7 @@
 enum tpad_handlers {
SOFTBUTTON_HDLR,
TOPBUTTON_HDLR,
+   MTBUTTON_HDLR,
TAP_HDLR,
F2SCROLL_HDLR,
EDGESCROLL_HDLR,
@@ -149,6 +150,7 @@ struct tpad_touch {
 #define WSTPAD_HORIZSCROLL (1 << 5)
 #define WSTPAD_SWAPSIDES   (1 << 6)
 #define WSTPAD_DISABLE (1 << 7)
+#define WSTPAD_MTBUTTONS   (1 << 8)
 
 #define WSTPAD_MT  (1 << 31)
 
@@ -646,7 +648,23 @@ wstpad_softbuttons(struct wsmouseinput *input, u_int 
*cmds, int hdlr)
}
 
if (tp->softbutton == 0 && PRIMARYBTN_CLICKED(tp)) {
-   tp->softbutton = wstpad_get_sbtn(input, top);
+   if (hdlr == MTBUTTON_HDLR) {
+   switch (tp->contacts) {
+   case 2:
+   tp->softbutton = RIGHTBTN;
+   break;
+   case 3:
+   tp->softbutton = MIDDLEBTN;
+   break;
+   case 1:
+   tp->softbutton = LEFTBTN;
+   break;
+   default:
+   tp->softbutton = 0;
+   break;
+   }
+   } else
+   tp->softbutton = wstpad_get_sbtn(input, top);
if (tp->softbutton)
*cmds |= 1 << SOFTBUTTON_DOWN;
}
@@ -1237,12 +1255,14 @@ wstpad_process_input(struct wsmouseinput *input, struct 
evq_access *evq)
cmds = 0;
handlers = tp->handlers;
if (DISABLE(tp))
-   handlers &= ((1 << TOPBUTTON_HDLR) | (1 << SOFTBUTTON_HDLR));
+   handlers &= ((1 << TOPBUTTON_HDLR) | (1 << SOFTBUTTON_HDLR) |
+   (1 << MTBUTTON_HDLR));
 
FOREACHBIT(handlers, hdlr) {
switch (hdlr) {
case SOFTBUTTON_HDLR:
case TOPBUTTON_HDLR:
+   case MTBUTTON_HDLR:
wstpad_softbuttons(input, &cmds, hdlr);

Re: grdc: show timezone when TZ is set

2022-09-18 Thread Florian Obser
On 2022-09-18 01:55 -04, Paul Janzen  wrote:
> The recent change to grdc(6), to display additional information if TZ is
> set, has a few issues.
>
> 1.  Time zone offset incorrectly reported in Newfoundland.
>
> Some time zones have offsets of 30 or 45 minutes.  The displayed time
> offset is currently truncated to the closest hour.  (Australia/Eucla
> is a fun time zone too.)

Very good point. Let's shine this turd a bit more!

>
> 2.  The new, additional information disappears if the window is sized too
> small (wintoosmall).  There's basically room for it though...  except

I don't care too much about the wintoosmall case, so I left your version
in. I guess we could do better with the TZ validation (see below).

>
> 3.  The TZ information is a string of unknown length, and so it doesn't
> necessarily display correctly.
>
> Yeah, I know with pledge() you can't do testing like
> TZ=:/home/pjanzen/dev/usr/share/zoneinfo/testing/2022/America/Kentucky/Monticello
> any more, even though that's a perfectly cromulent and functional TZ on my
> system otherwise. So for the time being, probably any TZ that exists and
> doesn't abort grdc is 38 bytes or shorter.  Which works.

grdc got aborted even before this last change. That's not optimal. So we
have to hoist the (implicit) call to tzset before pledge(2). I went
further and did:
pledge("stdio rpath tty")
tzset()
pledge("stdio tty")

>
> But, if your timezone exists, it already has its name in short form
> included in tm->tm_zone.  That's what I think should be
> printed, even if "EDT" is way less cool than "America/Pangnirtung".  I
> mean, if the point is just to be able to label clocks with nice places,
> instead of the time zone it's showing, maybe it could be a different
> option.

For me, that would completely miss the point. I have no idea what EDT
means.

>
> Counterpoint:  some of the timezones have short names that are just the UTC
> offset, which is really boring and duplicated given that we print out the
> offset already.  Hey, maybe we could just print the offset...
>
> 4.  There's no indication if you type an invalid TZ--you get UTC and a
> misleading label onscreen.
>
> Timezone handling defaults to UTC if anything breaks along the chain, as
> the tzset(3) man page makes clear.  That means if you misspell Antarctica
> while setting your TZ=Antartica/McMurdo, you'll end up half a day off from
> all your pals at McMurdo as your screen happily tells you that you're
> seeing McMurdo +0 time.
>
> There's no simple way to tell if your $TZ is valid or not (if you get back
> UTC, maybe that's really what it should be!).  At least if we display
> tm->tm_zone rather than $TZ, we're not misleading.
>

Right, so I had a stab at validating TZ:
If TZ is a relative path and exists as a file in /usr/share/zoneinfo
display it and also print tm->tm_zone:

  ┌[ Antarctica/McMurdo (NZST) +12h00 ]──┐

  ┌[ Australia/Eucla (+0845) +8h45 ]─┐

There is a TOCTU issue (doesn't matter I think) and an issue where what
we find in /usr/share/zoneinfo is not syntactically correct, i.e.:
$ TZ=zone.tab grdc
  ┌[ zone.tab (GMT) +0h00 ]──┐

I don't think that matters either. Both are cases of: don't do that.

>
>
> I was going to be upset that the man page for grdc(6) is way pickier on TZ
> than tzset(3), but it's quite accurate given the pledge() call.  Speaking
> of which, I don't expect any one else plays with timezone files, and surely
> one doesn't want one's general utilities to be pwned by possible bugs in
> the time-handling code exploited with custom files created outside
> /usr/share/zoneinfo.  But it's still a touch irritating-should-be-fixable
> that, because the pledge() has to be after initscr(), grdc has the
> possibility of leaving the terminal in the wrong state when it aborts on
> test TZ files.
>

This works now, too:

$ TZ=~/Newfoundland grdc
  ┌[ NDT -2h30 ]─┐

>
>
> Paul Janzen.
>
> Index: grdc.c
> ===
> RCS file: /cvs/src/games/grdc/grdc.c,v
> retrieving revision 1.35
> +void
> +print_tz(int y, int x, int sml)
> +{
> + int i, j;
> +
> + move(y, x);
> + i = tm->tm_gmtoff / 60 / 60;
> + j = tm->tm_gmtoff / 60 - i * 60;

Isn't this just a weird spelling for mod (%)?

> + if (i < 0)
> + j = -j;
> + if (!sml)
> + printw("[ %s %+dh%02d ]", tm->tm_zone, i, j);
> + else
> + printw("[%+dh%02d]", i, j);
>  }
>  
>  void
>

diff --git grdc.c grdc.c
index 66e5eee79e6..5d2ea19a532 100644
--- grdc.c
+++ grdc.c
@@ -12,6 +12,7 @@
  */
 
 #include 
+#include 
 
 #include 
 #include 
@@ -26,9 +27,6 @@
 #define XLENGTH 58
 #define YDEPTH  7
 
-struct timespec now;
-struct tm *tm;
-
 short disp[11] = {
075557, 01, 071747, 071717, 055711,
074717, 074757, 07, 0

ldomctl/ldom.conf: iodevice: accept NACs as well

2022-09-18 Thread Klemens Nanni
Assignable PCIe devices have a root complex path and a more descriptive
I/O slot path;  example output from a T4-2:

# ldomctl list-io
PATH NAME
/@400/@2/@0/@8   /SYS/MB/PCIE0
/@500/@2/@0/@a   /SYS/MB/PCIE1
...
/@400/@2/@0/@e   /SYS/MB/SASHBA
/@400/@1/@0/@4   /SYS/MB/NET0
/@500/@1/@0/@5   /SYS/MB/NET2

The latter is much more descriptive, matches actual labels on the back
of the hardware as well as information from ILOM.

ldom.conf currently accepts only the first value, which is not really
informative unless you know how each element maps to physical hardware.

The second value is a no-brainer, stable across different machines and
more useful to work with when building systems whith many domains having
PCIe devices assigned; `ldomctl list-io' is no longer needed to produce
a working configuration.

So make ldom.conf `iodevice' take both values;  ldomctl looks them up
in the list of components which stores both, so just match against both
and keep yielding the root complex path internally.

The diff is bigger because I renamed struct iodev's path member to dev
to clarify how it may be either a path or a name/NAC.

Changing my ldom.conf like this after the diff still results in
`ldomctl init-system' producing identical machine descriptions:

-iodevice   "/@400/@2/@0/@8"# /SYS/MB/PCIE0
+iodevice   "/SYS/MB/PCIE0"


Feedback? OK? (for after release)

commit 3016bbec8c36884c64b5dff8b3bc520d50d36c5d
Author: Klemens Nanni 
Date:   Sun Sep 18 01:07:49 2022 +0200

Allow passing iodevice pseudonyms

diff --git a/usr.sbin/ldomctl/config.c b/usr.sbin/ldomctl/config.c
index 048e6e58e72..82f4f6ce5cb 100644
--- a/usr.sbin/ldomctl/config.c
+++ b/usr.sbin/ldomctl/config.c
@@ -2645,7 +2645,7 @@ guest_add_variable(struct guest *guest, const char *name, 
const char *str)
 }
 
 void
-guest_add_iodev(struct guest *guest, const char *path)
+guest_add_iodev(struct guest *guest, const char *dev)
 {
struct component *component;
struct subdevice *subdevice;
@@ -2654,17 +2654,18 @@ guest_add_iodev(struct guest *guest, const char *path)
errx(1, "direct I/O not supported by hypervisor");
 
TAILQ_FOREACH(component, &components, link) {
-   if (strcmp(component->path, path) == 0)
+   if (strcmp(component->nac, dev) == 0 ||
+   strcmp(component->path, dev) == 0)
break;
}
 
if (component == NULL)
-   errx(1, "incorrect device path %s", path);
+   errx(1, "incorrect device path %s", dev);
if (component->assigned)
-   errx(1, "device path %s already assigned", path);
+   errx(1, "device path %s already assigned", dev);
 
subdevice = xzalloc(sizeof(*subdevice));
-   subdevice->path = path;
+   subdevice->path = component->path;
TAILQ_INSERT_TAIL(&guest->subdevice_list, subdevice, link);
component->assigned = 1;
 }
@@ -2873,7 +2874,7 @@ build_config(const char *filename, int noaction)
SIMPLEQ_FOREACH(var, &domain->var_list, entry)
guest_add_variable(guest, var->name, var->str);
SIMPLEQ_FOREACH(iodev, &domain->iodev_list, entry)
-   guest_add_iodev(guest, iodev->path);
+   guest_add_iodev(guest, iodev->dev);
 
guest_finalize(guest);
}
diff --git a/usr.sbin/ldomctl/ldom.conf.5 b/usr.sbin/ldomctl/ldom.conf.5
index a6555199e65..efad2b38b46 100644
--- a/usr.sbin/ldomctl/ldom.conf.5
+++ b/usr.sbin/ldomctl/ldom.conf.5
@@ -50,8 +50,13 @@ Declare the amount of memory assigned to a domain, in bytes.
 can be specified with a human-readable scale, using the format described in
 .Xr scan_scaled 3 ,
 e.g. 512M.
-.It Ic iodevice Ar path
+.It Ic iodevice Ar device
 Assign the specified PCIe device to the guest domain.
+.Ar device
+may be either a device path
+.Pq Pa /@400/@2/@0/@8
+or a pseudonym
+.Pq Pa /SYS/MB/PCIE0 .
 This keyword can be used multiple times.
 .It Ic variable Ar name Ns = Ns Ar value
 Set the specified NVRAM variable for the domain.
diff --git a/usr.sbin/ldomctl/ldomctl.h b/usr.sbin/ldomctl/ldomctl.h
index b5210ee3c0e..ee40b59df30 100644
--- a/usr.sbin/ldomctl/ldomctl.h
+++ b/usr.sbin/ldomctl/ldomctl.h
@@ -176,7 +176,7 @@ struct var {
 
 struct iodev {
SIMPLEQ_ENTRY(iodev)entry;
-   const char  *path;
+   const char  *dev;
 };
 
 struct domain {
diff --git a/usr.sbin/ldomctl/parse.y b/usr.sbin/ldomctl/parse.y
index f987ab60042..2323bfebe30 100644
--- a/usr.sbin/ldomctl/parse.y
+++ b/usr.sbin/ldomctl/parse.y
@@ -220,13 +220,13 @@ domainopts: VCPU vcpu {
struct iodev *iodev;
SIMPLEQ_FOREACH(odomain, &conf->domain_list, entry)
SIMPLEQ_FOREACH(iodev, &odomain->iodev_list, 
entry)
-