Re: SMR question

2019-12-29 Thread Visa Hankala
On Sun, Dec 29, 2019 at 05:23:43PM -0600, Amit Kulkarni wrote:
> I was preparing a diff and wanted to know if it is safe to disable the
> SMR kthread by commenting it out for testing purposes on amd64. Just a
> simple yes/no would do!

no



ldomctl: Omit tty device from status output

2019-12-29 Thread Klemens Nanni
Now that `ldomctl console ...' is implemented there is actually no need
to print the device any longer, it is an implementation detail that
should be hidden just like it is the case with vmctl.

That also makes it fit nicely on serial consoles again.

$ doas ldomctl status primary
primary  -running  OpenBSD running  
  1%
$ jot -s '' -b . 72

$ doas obj/ldomctl status primary
primary  running  OpenBSD running0%

OK?


Index: ldomctl.8
===
RCS file: /cvs/src/usr.sbin/ldomctl/ldomctl.8,v
retrieving revision 1.20
diff -u -p -r1.20 ldomctl.8
--- ldomctl.8   6 Dec 2019 23:01:03 -   1.20
+++ ldomctl.8   30 Dec 2019 00:13:06 -
@@ -162,9 +162,9 @@ The primary domain should have less CPUs
 are now assigned to the guest domains:
 .Bd -literal -offset indent
 # ldomctl status
-primary - running OpenBSD running1%
-puffy   ttyV0 running OpenBoot Primary Boot Loader   8%
-salmah  ttyV1 running OpenBoot Primary Boot Loader  12%
+primary  running  OpenBSD running1%
+puffyrunning  OpenBoot Primary Boot Loader   8%
+salmah   running  OpenBoot Primary Boot Loader  12%
 .Ed
 .Pp
 Configure the
Index: ldomctl.c
===
RCS file: /cvs/src/usr.sbin/ldomctl/ldomctl.c,v
retrieving revision 1.31
diff -u -p -r1.31 ldomctl.c
--- ldomctl.c   28 Dec 2019 18:36:02 -  1.31
+++ ldomctl.c   30 Dec 2019 00:12:02 -
@@ -509,7 +509,6 @@ guest_status(int argc, char **argv)
double utilisation = 0.0;
const char *state_str;
char buf[32];
-   char console_str[8] = "-";
 
if (argc < 1 || argc > 2)
usage();
@@ -610,14 +609,8 @@ guest_status(int argc, char **argv)
break;
}
 
-   /* primary has no console */
-   if (guest->gid != 0) {
-   snprintf(console_str, sizeof(console_str),
-   "ttyV%llu", guest->gid - 1);
-   }
-
-   printf("%-16s %-8s %-16s %-32s %3.0f%%\n", guest->name,
-   console_str, state_str, state.state == GUEST_STATE_NORMAL ?
+   printf("%-16s %-16s %-32s %3.0f%%\n", guest->name,
+   state_str, state.state == GUEST_STATE_NORMAL ?
softstate.soft_state_str : "-", utilisation);
}
 }



eeprom.8: Document OpenPROM boot-device and boot-file

2019-12-29 Thread Klemens Nanni
Those are briefly mentioned for the specific softraid case in
boot_sparc64(8) but I want better offline documentation.

Technically `boot-device' accepts the empty string as well but all that
OBP does is

{0} ok setenv boot-device ''
boot-device =   ''
{0} ok boot
...
Evaluating: 
No viable default device found in boot-device variable.

{0} ok

I see no benefit in documenting it, especially since eeprom(8)
explicitly mentions how variables are platform dependent, may not
exist and such;  so this mileage already covers that.

Feedback? OK?


Index: eeprom.8
===
RCS file: /cvs/src/usr.sbin/eeprom/eeprom.8,v
retrieving revision 1.21
diff -u -p -r1.21 eeprom.8
--- eeprom.81 Sep 2016 13:39:50 -   1.21
+++ eeprom.829 Dec 2019 23:44:18 -
@@ -269,6 +269,14 @@ It is unlikely that this value should ev
 An 8-bit integer specifying the number of columns on the console.
 .It Ar screen-#rows
 An 8-bit integer specifying the number of rows on the console.
+.It Ar boot-device
+Space separated list of device aliases or device paths to boot from,
+in the given order.
+.It Ar boot-file
+File to boot.
+The empty string lets the second-stage boot program
+.Sy ofwboot
+choose the default.
 .It Ar auto-boot?
 If true, the system will boot automatically at power-up.
 .It Ar watchdog-reboot?



SMR question

2019-12-29 Thread Amit Kulkarni
Hi,
Is the purpose of smr_grace_wait() to round robin the curproc through
all CPUs, to make sure all CPUs have passed the quiescent state? Is
this line of thinking correct or flawed?

I was preparing a diff and wanted to know if it is safe to disable the
SMR kthread by commenting it out for testing purposes on amd64. Just a
simple yes/no would do!

Thanks

/*
 * Block until all CPUs have crossed quiescent state.
 */
void
smr_grace_wait(void)
{
#ifdef MULTIPROCESSOR
CPU_INFO_ITERATOR cii;
struct cpu_info *ci, *ci_start;

ci_start = curcpu();
CPU_INFO_FOREACH(cii, ci) {
if (ci == ci_start)
continue;
sched_peg_curproc(ci);
}
atomic_clearbits_int(&curproc->p_flag, P_CPUPEG);
#endif /* MULTIPROCESSOR */
}



ldom.conf.5: Mention default boot disk

2019-12-29 Thread Klemens Nanni
OBP defaults to booting from disk and network in that order.
With multiple disks attached, only the first disk is tried.

OBP mostly if not always also defaults to automatic boot, meaning
domains start trying boot devices once the firmware is done rather than
dropping into the {0} ok prompt.

This means (newly provisioned) guest domains may end up in network boot
loops without any possibility to force booting off any particular disk.

I ran into this case with a bunch of domains like this one:

domain "guest01" {
vdisk "/var/ldom/guest01.img"
vdisk "/var/ldom/miniroot66.fs"
vnet
...
}

Empty disk, miniroot for bootstrap/recovery and network.  But since the
first disk (empty/invalid) cannot be booted from, OBP tries booting off
net and seemingly does so forever: multiple solutions exist:

- remove network so OBP exhausts boot devices and drops to prompt
   (not tested)
- provide working network boot setup
- make miniroot be the first disk so OBP boots into something usable
- provision the actual guest disk prior to starting the domain
- make OBP stay at boot prompt with `variable auto-boot?=false'

Since our code handles no dynamic runtime changes, all of those
approaches currently requires rewriting new LDOM configurations and
resetting the physical machine to make it effective.

Implementing the features will take much effort, but polishing
documentation to make users more aware of such behaviour is easy, so I
want to start with simply mentioning which disk is tried at boot.

Hopefull users transport this into ordering their `vdisk' lines
accordingly or disabling automatic boot.

Feedback? OK?


Index: ldom.conf.5
===
RCS file: /cvs/src/usr.sbin/ldomctl/ldom.conf.5,v
retrieving revision 1.9
diff -u -p -r1.9 ldom.conf.5
--- ldom.conf.5 3 Dec 2019 21:07:03 -   1.9
+++ ldom.conf.5 29 Dec 2019 22:11:12 -
@@ -64,6 +64,7 @@ can be a block device node or a disk ima
 .Cm create-vdisk
 command.
 This keyword can be used multiple times.
+The first disk will be the default boot device.
 .It Ic vnet Op Brq Ar keyword Ns = Ns Ar value ...
 Assign a
 .Xr vnet 4



Re: sparc64: find root device on hardware RAID

2019-12-29 Thread Klemens Nanni
On Mon, Dec 30, 2019 at 06:54:02AM +1000, Jonathan Matthew wrote:
> I'd prefer this:
> 
> pagelen = min(hdr.page_length * 4, sizeof(vpg));
> 
> just to avoid trashing the stack if the page grows in newer firmware versions.
Sure, I'll commit with min() and a small comment for that, thanks.



Re: sparc64: find root device on hardware RAID

2019-12-29 Thread Jonathan Matthew
On Sun, Dec 29, 2019 at 07:40:01AM +0100, Klemens Nanni wrote:
> On Sun, Dec 29, 2019 at 03:30:15AM +0100, Klemens Nanni wrote:
> > > link->target isn't the right place to put this, for one thing it's only 
> > > 16 bits
> > > and the wwn is 64 bits, and it's used throughout the driver to look up 
> > > devices
> > > in an array, so changing it will break things.  I think link->port_wwn is 
> > > the
> > > right place to store it.
> > Ah, link->target was there because I played with that in earlier diffs,
> > port_wwn is indeed correct here.
> > 
> > > The fields in the page returned by the driver are also little endian, so 
> > > you'd
> > > need letoh64(vpg.wwid) here.
> > Thanks, I see that is done elsewhere in the driver, too.
> >  
> > > You should still return 0 here, as continuing on will send the SAS device
> > > page 0 request to the raid volume, which will probably upset the 
> > > controller
> > > enough to stop talking to you.
> > Oh well... that explains the hangs - I accidentially dropped the return,
> > it should obviously stay and my diff should only add another page fetch.
> All three points are addressed in the updated diff below, diff three to
> find the root device.
> 
> mpii(4) currently leaves the port WWN empty for RAID volumes (physical
> devices are populated).  autoboot(9) uses this to match the root device
> as per the second diff, so we must fill in after fetching the relevant
> page as suggested by mikeb and jmatthew.
> 
> Feedback? OK?

ok jmatthew@ with one tweak below.

> 
> Index: mpii.c
> ===
> RCS file: /cvs/src/sys/dev/pci/mpii.c,v
> retrieving revision 1.122
> diff -u -p -r1.122 mpii.c
> --- mpii.c28 Dec 2019 04:38:22 -  1.122
> +++ mpii.c29 Dec 2019 05:02:38 -
> @@ -910,8 +910,28 @@ mpii_scsi_probe(struct scsi_link *link)
>   if (ISSET(flags, MPII_DF_HIDDEN) || ISSET(flags, MPII_DF_UNUSED))
>   return (1);
>  
> - if (ISSET(flags, MPII_DF_VOLUME))
> + if (ISSET(flags, MPII_DF_VOLUME)) {
> + struct mpii_cfg_hdr hdr;
> + struct mpii_cfg_raid_vol_pg1 vpg;
> + size_t pagelen;
> +
> + address = MPII_CFG_RAID_VOL_ADDR_HANDLE | dev->dev_handle;
> +
> + if (mpii_req_cfg_header(sc, MPII_CONFIG_REQ_PAGE_TYPE_RAID_VOL,
> + 1, address, MPII_PG_POLL, &hdr) != 0)
> + return (EINVAL);
> +
> + memset(&vpg, 0, sizeof(vpg));
> + pagelen = hdr.page_length * 4;

I'd prefer this:

pagelen = min(hdr.page_length * 4, sizeof(vpg));

just to avoid trashing the stack if the page grows in newer firmware versions.

> +
> + if (mpii_req_cfg_page(sc, address, MPII_PG_POLL, &hdr, 1,
> + &vpg, pagelen) != 0)
> + return (EINVAL);
> +
> + link->port_wwn = letoh64(vpg.wwid);
> +
>   return (0);
> + }
>  
>   memset(&ehdr, 0, sizeof(ehdr));
>   ehdr.page_type = MPII_CONFIG_REQ_PAGE_TYPE_EXTENDED;



Re: cdio(1): remove CDDB support

2019-12-29 Thread Steffen Nurpmeso
Marc Espie wrote in <20191229101350.ga17...@nausicaa.home>:
 |On Sat, Dec 28, 2019 at 07:48:45PM -0500, Bryan Steele wrote:
 |> With FreeDB announcing[0] that the service will be shutting down as of
 |> March 31st of 2020, and the only other alternative (MusicBrainz) already
 |> having shutdown their freedb/cddb gateway in favour of their own API
 |> early this year, it likely makes sense to remove support from cdio(1).
 |> 
 |> CDDB is used to retrieve music CD metadata over the Internet, e.g:
 |> Artist and Track names.
 |> 
 |> I left in support for the "cdid" command as it may be useful for
 |> archival(?) purposes, if not that can go too.
 |> 
 |> Cc: espie@ as he wrote this code, & maybe he still has music on CDs.
 |
 |How about we wait until the service actually shuts down ?
 |
 |Who knows, maybe someone else will pick up ?
 |
 |It's fairly sad, as this means you would have (again) to annotate mp3s
 |you make from your own CDs by hand.

Yeah!

 --End of <20191229101350.ga17...@nausicaa.home>

--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)



Re: net80211: post-bgscan RSSI threshold check

2019-12-29 Thread Stefan Sperling
On Sun, Dec 29, 2019 at 08:54:35AM -0600, Patrick Dohman wrote:
> 
> 
> > On Dec 29, 2019, at 6:50 AM, Stefan Sperling  wrote:
> > 
> > I don't understand your question.
> > What is a "handover" and what does soft vs. hard mean?
> 
> I apologize for the confusion.
> A 80211 handover refers to a AP "switch"
> 
> * After a background scan, we have now switched APs.
> * Pretend we were just de-authed, which makes
> * ieee80211_new_state() try to re-auth and thus send
> * an AUTH frame to our newly selected AP.
> 
> A soft handover infers a continuation of “link” often in correlation 
> with a multiple transmission and receiving antenna

I don't think the devices we support could do this.

If both APs are in the same layer 2 network the transition is usually
seamless already.



Re: net80211: post-bgscan RSSI threshold check

2019-12-29 Thread Patrick Dohman



> On Dec 29, 2019, at 6:50 AM, Stefan Sperling  wrote:
> 
> I don't understand your question.
> What is a "handover" and what does soft vs. hard mean?

I apologize for the confusion.
A 80211 handover refers to a AP "switch"

* After a background scan, we have now switched APs.
* Pretend we were just de-authed, which makes
* ieee80211_new_state() try to re-auth and thus send
* an AUTH frame to our newly selected AP.

A soft handover infers a continuation of “link” often in correlation 
with a multiple transmission and receiving antenna


small net80211 roaming fix

2019-12-29 Thread Stefan Sperling
When switching APs we queue a deauth frame to the old AP, which
should be the last frame queued to hardware before we switch.

To send the deauth frame ieee80211_send_mgmt() gets called.
ieee80211_send_mgmt() calls if_start(), a driver-specific function
which usually loops over the outgoing management frame queue first,
and then the data frame queue.

To prevent transmission of additional data frames during AP switch,
the net80211 stack sets the TX_MGMT_ONLY flag which tells if_start()
to skip the data frame queue. This flag currently gets set too late,
so sending the deauth frame could also result in additional data frames
being queued after the deauth frame. The diff below fixes this issue.

diff 8fdeade23c5858406f2bc5e8be973aa2a970bd92 /usr/src (staged changes)
blob - 535c281bdd8e0d4eb22fd5476c8df2e24cb62be8
blob + e9ca2c9645ced26c272a3b4e63557c9e4e1b60ac
--- sys/net80211/ieee80211_node.c
+++ sys/net80211/ieee80211_node.c
@@ -1451,6 +1451,9 @@ ieee80211_end_scan(struct ifnet *ifp)
 
ic->ic_bgscan_fail = 0;
 
+   /* Prevent dispatch of additional data frames to hardware. */
+   ic->ic_xflags |= IEEE80211_F_TX_MGMT_ONLY;
+
/* 
 * We are going to switch APs. Stop A-MPDU Tx and
 * queue a de-auth frame addressed to our current AP.
@@ -1461,12 +1464,10 @@ ieee80211_end_scan(struct ifnet *ifp)
IEEE80211_FC0_SUBTYPE_DEAUTH,
IEEE80211_REASON_AUTH_LEAVE) != 0) {
ic->ic_flags &= ~IEEE80211_F_BGSCAN;
+   ic->ic_xflags &= ~IEEE80211_F_TX_MGMT_ONLY;
free(arg, M_DEVBUF, sizeof(*arg));
return;
}
-
-   /* Prevent dispatch of additional data frames to hardware. */
-   ic->ic_xflags |= IEEE80211_F_TX_MGMT_ONLY;
 
/* 
 * Install a callback which will switch us to the new AP once



[UPDATE] xhost 1.0.8

2019-12-29 Thread Matthieu Herrb
Hi again,

the patch below update xhost to version 1.0.8. testing and oks
welcome.

Index: ChangeLog
===
RCS file: /cvs/OpenBSD/xenocara/app/xhost/ChangeLog,v
retrieving revision 1.6
diff -u -p -u -r1.6 ChangeLog
--- ChangeLog   10 May 2015 10:12:42 -  1.6
+++ ChangeLog   15 Aug 2019 17:34:35 -
@@ -1,3 +1,96 @@
+commit 997135c6e37faa50f8b42a5f95c0cc8461ed6be9
+Author: Alan Coopersmith 
+Date:   Tue Feb 19 14:50:20 2019 -0800
+
+xhost 1.0.8
+
+Signed-off-by: Alan Coopersmith 
+
+commit 0ef87307f77e7e3df04b227046904cecbe6dd3f6
+Author: Alan Coopersmith 
+Date:   Wed Nov 21 17:06:21 2018 -0800
+
+Update configure.ac bug URL for gitlab migration
+
+Signed-off-by: Alan Coopersmith 
+
+commit 136e3be46cbd93a490483126b837f67c391129a1
+Author: Alan Coopersmith 
+Date:   Fri Nov 16 22:15:54 2018 -0800
+
+Update README for gitlab migration
+
+Signed-off-by: Alan Coopersmith 
+
+commit 317312bd23cf5c524932c6f12319ed3eed68d981
+Author: Alan Coopersmith 
+Date:   Mon Nov 12 14:05:52 2018 -0800
+
+Drop ancient workarounds for Cray that are no longer needed
+
+Signed-off-by: Alan Coopersmith 
+
+commit 62bfa9d421138ec538682eb0323fa9f438d6b2c7
+Author: Alan Coopersmith 
+Date:   Mon Nov 12 13:27:55 2018 -0800
+
+Prefer inet_aton, if available, over inet_addr
+
+Signed-off-by: Alan Coopersmith 
+
+commit 0c3627bc7dac395c6af8bd1fb747ef3556e95fb4
+Author: Tobias Stoeckmann 
+Date:   Wed Jul 4 16:20:06 2018 +0200
+
+Prevent OOB access on illegal server response.
+
+While parsing Xorg responses it is possible to trigger an out of
+boundary read if the response does not contain enough bytes.
+
+In case of IPv4, the padding normally prevents this, but IPv6
+addresses can trigger an out of boundary read.
+
+It takes a hostile xorg-server to reproduce this issue. If
+os/access.c is adjusted to always use a length of 1, it is possible
+to reproduce it and make it visible with an ASAN-compiled xhost.
+
+Reading past the memory boundary could reveal sensitive information
+to external DNS servers, because a lookup will be performed.
+
+Signed-off-by: Tobias Stoeckmann 
+Reviewed-by: Matthieu Herrb 
+
+commit 28015d91e284ee4b797a6e99ec16d53147c0ddb6
+Author: Mihail Konev 
+Date:   Thu Jan 26 14:00:21 2017 +1000
+
+autogen: add default patch prefix
+
+Signed-off-by: Mihail Konev 
+
+commit 3ee80cd398579c0f182ff7131ebfe7b65efed72b
+Author: Emil Velikov 
+Date:   Mon Mar 9 12:00:52 2015 +
+
+autogen.sh: use quoted string variables
+
+Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
+fall-outs, when they contain space.
+
+Signed-off-by: Emil Velikov 
+Reviewed-by: Peter Hutterer 
+Signed-off-by: Peter Hutterer 
+
+commit 991e4a8a26e9c03faa291b522067443a8d05af7a
+Author: Jon TURNEY 
+Date:   Sun Sep 14 18:13:28 2014 +0100
+
+Move sethostent()/gethostent() stubs used in Windows builds to avoid 
implicit-function-declaration warnings
+
+Signed-off-by: Jon TURNEY 
+Reviewed-by: Alan Coopersmith 
+Reviewed-by: David Macek 
+
 commit 06d71376aa43f9177ec1e37ed1e4d0faca655cff
 Author: Alan Coopersmith 
 Date:   Thu Apr 16 23:28:02 2015 -0700
Index: Makefile.am
===
RCS file: /cvs/OpenBSD/xenocara/app/xhost/Makefile.am,v
retrieving revision 1.4
diff -u -p -u -r1.4 Makefile.am
--- Makefile.am 7 Apr 2012 15:52:30 -   1.4
+++ Makefile.am 15 Aug 2019 17:34:35 -
@@ -18,4 +18,4 @@ ChangeLog:
 
 dist-hook: ChangeLog INSTALL
 
-
+EXTRA_DIST = README.md
Index: Makefile.in
===
RCS file: /cvs/OpenBSD/xenocara/app/xhost/Makefile.in,v
retrieving revision 1.9
diff -u -p -u -r1.9 Makefile.in
--- Makefile.in 11 Oct 2016 22:14:40 -  1.9
+++ Makefile.in 15 Aug 2019 17:34:57 -
@@ -52,7 +52,7 @@ build_triplet = @build@
 host_triplet = @host@
 bin_PROGRAMS = xhost$(EXEEXT)
 subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL \
compile config.guess config.sub depcomp install-sh missing
@@ -293,6 +293,7 @@ xhost_SOURCES = xhost.c
 AM_CFLAGS = $(CWARNFLAGS) $(XHOST_CFLAGS) $(XAU_CFLAGS)
 xhost_LDADD = $(XHOST_LIBS)
 MAINTAINERCLEANFILES = ChangeLog INSTALL
+EXTRA_DIST = README.md
 all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
Index: README
===
RCS file: README
diff -N README
--- README  24 Oct 2009 14:14:08 -  1.2
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,26 +0,0 @@
-xhost is used to manage the list of host names or user names
-

[UPDATE] xauth 1.1.0

2019-12-29 Thread Matthieu Herrb
Hi,

The patch below update xauth to version 1.1. Testing and oks welcome

Index: ChangeLog
===
RCS file: /cvs/OpenBSD/xenocara/app/xauth/ChangeLog,v
retrieving revision 1.9
diff -u -p -u -r1.9 ChangeLog
--- ChangeLog   19 Feb 2017 17:30:58 -  1.9
+++ ChangeLog   15 Aug 2019 17:06:03 -
@@ -1,3 +1,103 @@
+commit e97992671b3870878709a1c01991488965b61b94
+Author: Adam Jackson 
+Date:   Thu Jul 11 13:49:26 2019 -0400
+
+xauth 1.1
+
+commit 0932418d9b47e8240160bcbacbdc38b9bc9870d3
+Author: Adam Jackson 
+Date:   Tue Jun 18 12:03:33 2019 -0400
+
+process: Close a window where no authority file would exist
+
+unlink()ing the old auth file before link()ing the temp to the new is
+just silly. rename() is atomic and will happily clobber the destination,
+and the only thing link() can give you here is the ability to fail on
+filesystems that don't support hardlinks.
+
+Fixes: xorg/app/xauth#2
+
+commit 42239054b088dcdfc637880a8edf39b841c5ea51
+Author: Michal Srb 
+Date:   Thu May 31 15:12:36 2018 +0200
+
+Sort entries from most specific to most generic.
+
+There is no point in adding entry or merging lists if a FamilyWild entry 
would
+end in front of any entry, or entry without display number would end in 
front
+of entry with number.
+
+This sorts all entries in order:
+  * FamilyWild without display number
+  * FamilyWild with display number
+  * Other family without display number
+  * Other family with display number
+
+The order of the entries in each category is kept.
+
+Signed-off-by: Alan Coopersmith 
+
+commit 06a21f7c3d5eb5dc9a86418e87946cc7ac83e437
+Author: Michal Srb 
+Date:   Thu May 31 15:12:35 2018 +0200
+
+Merge only entries with equal dpy and protoname.
+
+Merging two lists, or adding entry a into list acts unexpectedly if the 
list
+contains FamilyWild or entry with an empty display numbers. For example:
+
+  > xauth list
+  ##6f70656e737573652d74756d626c6577656564#:  MIT-MAGIC-COOKIE-1  
1500d80327733252cc42ba469138a259
+
+  > xauth add test/unix:2 MIT-MAGIC-COOKIE-1 
aabbccddeeff00112233445566778899
+  > xauth list
+  test/unix:2  MIT-MAGIC-COOKIE-1  aabbccddeeff00112233445566778899
+
+This is because merge_entries compares entries using `match_auth`, which
+follows the same rules as XauGetBestAuthByAddr. Following these rules is 
good
+when filtering the output of `xauth list`, but for merging we should 
compare
+for equality. It used to be done that way before commit 1555fff4. That 
commit
+changed it to improve the `xauth list` behavior, but did not seem consider 
the
+impact on merge.
+
+Signed-off-by: Alan Coopersmith 
+
+commit 673d42c5ffbbb07ad6b9b3d99a9cc78198999dd1
+Author: Alan Coopersmith 
+Date:   Wed Nov 21 16:58:33 2018 -0800
+
+Update configure.ac bug URL for gitlab migration
+
+Signed-off-by: Alan Coopersmith 
+
+commit fa5c2797921b2b0c6dcdde5cf1832a90a0a9dfbf
+Author: Alan Coopersmith 
+Date:   Fri Nov 16 21:03:57 2018 -0800
+
+Update README for gitlab migration
+
+Signed-off-by: Alan Coopersmith 
+
+commit 4a3a9fc5271cd04ab9123e4713d00b161daf0b6a
+Author: Alan Coopersmith 
+Date:   Sat May 5 14:58:15 2018 -0700
+
+Change fall through comment in process.c to match gcc's requirements
+
+Needs to match one of the regexps shown under
+
https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/Warning-Options.html#index-Wimplicit-fallthrough
+
+Silences warning from gcc 7.3:
+process.c: In function ‘dump_entry’:
+process.c:1007:9: warning: this statement may fall through 
[-Wimplicit-fallthrough=]
+  if (dpyname) {
+ ^
+process.c:1012:4: note: here
+default:
+^~~
+
+Signed-off-by: Alan Coopersmith 
+
 commit 536d1003a5c4d5ac24cd3b8afd10492e4e6242df
 Author: Matt Turner 
 Date:   Sun Jan 29 13:09:12 2017 -0800
Index: Makefile.am
===
RCS file: /cvs/OpenBSD/xenocara/app/xauth/Makefile.am,v
retrieving revision 1.7
diff -u -p -u -r1.7 Makefile.am
--- Makefile.am 19 Feb 2017 17:30:58 -  1.7
+++ Makefile.am 15 Aug 2019 17:06:03 -
@@ -51,3 +51,5 @@ ChangeLog:
$(CHANGELOG_CMD)
 
 dist-hook: ChangeLog INSTALL
+
+EXTRA_DIST = README.md
Index: Makefile.in
===
RCS file: /cvs/OpenBSD/xenocara/app/xauth/Makefile.in,v
retrieving revision 1.11
diff -u -p -u -r1.11 Makefile.in
--- Makefile.in 19 Feb 2017 17:30:58 -  1.11
+++ Makefile.in 15 Aug 2019 17:06:16 -
@@ -73,7 +73,7 @@ build_triplet = @build@
 host_triplet = @host@
 bin_PROGRAMS = xauth$(EXEEXT)
 subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \

Re: net80211: post-bgscan RSSI threshold check

2019-12-29 Thread Stefan Sperling
On Sat, Dec 28, 2019 at 07:46:46PM -0600, Patrick Dohman wrote:
> 
> > On Dec 28, 2019, at 6:11 AM, Stefan Sperling  wrote:
> > 
> > Access points at 36c3 use low transmit power on purpose, and often fall 
> > below
> > the RSSI threshold which trigger background scans. At some locations (e.g.
> > at the lake in CCL) I've seen iwm(4) ping-pong between APs repeatedly even
> > while the laptop is stationary.
> > 
> > I am now running with the diff below which prevents roaming to a new AP
> > with an RSSI level below the background scan threshold. In other words,
> > if we can tell ahead of time that the new candiate AP will also trigger
> > background scans then there is little point in switching to it.
> 
> My understanding is that RSSI is a valid consideration in a soft handover.
> Do you consider soft handovers a secure roaming implementation?
> Is a hard handover option safer & simpler?

I don't understand your question.
What is a "handover" and what does soft vs. hard mean?



Re: cdio(1): remove CDDB support

2019-12-29 Thread Marc Espie
On Sat, Dec 28, 2019 at 07:48:45PM -0500, Bryan Steele wrote:
> With FreeDB announcing[0] that the service will be shutting down as of
> March 31st of 2020, and the only other alternative (MusicBrainz) already
> having shutdown their freedb/cddb gateway in favour of their own API
> early this year, it likely makes sense to remove support from cdio(1).
> 
> CDDB is used to retrieve music CD metadata over the Internet, e.g:
> Artist and Track names.
> 
> I left in support for the "cdid" command as it may be useful for
> archival(?) purposes, if not that can go too.
> 
> Cc: espie@ as he wrote this code, & maybe he still has music on CDs.

How about we wait until the service actually shuts down ?

Who knows, maybe someone else will pick up ?

It's fairly sad, as this means you would have (again) to annotate mp3s
you make from your own CDs by hand.



[UPDATE] libXpm 3.5.13

2019-12-29 Thread Matthieu Herrb
Hi,

The diff below updates libXpm to version 3.5.13. Tests and oks
welcome.

Apply in $XSRCDIR/lib/libXpm and then rebuild xenocara following
release(8).

Index: ChangeLog
===
RCS file: /cvs/OpenBSD/xenocara/lib/libXpm/ChangeLog,v
retrieving revision 1.6
diff -u -p -u -r1.6 ChangeLog
--- ChangeLog   16 Dec 2016 07:28:34 -  1.6
+++ ChangeLog   15 Dec 2019 18:27:04 -
@@ -1,3 +1,131 @@
+commit b0fc485495a694816d76a43978e2cfd5575c554d
+Author: Peter Hutterer 
+Date:   Fri Dec 13 14:25:06 2019 +1000
+
+libXpm 3.5.13
+
+Signed-off-by: Peter Hutterer 
+
+commit 5817fd4ac5308fe7c23301c652f174997009b7d5
+Author: Benjamin Tissoires 
+Date:   Wed Dec 4 11:17:21 2019 +0100
+
+parse: simplify error paths in xpmParseColors()
+
+We introduced a new label to handle the errors, we should use it
+for the rest of the function.
+
+Signed-off-by: Benjamin Tissoires 
+
+commit e1d8f704d52f70680869b7aae1da0ad2382db363
+Author: Peter Hutterer 
+Date:   Thu Dec 5 06:17:00 2019 +1000
+
+parse: avoid memleak on error with STRLCAT/STRLCPY
+
+The original macro might exit the function without freeing `colorTable`.
+
+Move the macros into a slightly less awful helper function and use goto
+to clean up in case of error.
+
+Signed-off-by: Peter Hutterer 
+
+commit 7af7c5e275b69daedee3696bee1e880586f30373
+Author: Fabrice Fontaine 
+Date:   Fri May 3 07:59:09 2019 +0200
+
+Allow usage when fork() is not available
+
+When fork() is not available, we need to define NO_ZPIPE so that
+libXpm doesn't try to fork/exec to use a pipe to uncompress compressed
+.xpm files. There is obviously a loss of functionality, but loading
+uncompressed .xpm files should continue to work.
+
+Signed-off-by: Thomas Petazzoni 
+[Retrieved from:
+
https://git.buildroot.net/buildroot/tree/package/x11r7/xlib_libXpm/0001-fork-check.patch]
+Signed-off-by: Fabrice Fontaine 
+
+commit 0be2c6712728cea1fa1bcc640e564c45c2c82e37
+Author: Alan Coopersmith 
+Date:   Fri Dec 7 19:47:06 2018 -0800
+
+Update configure.ac bug URL for gitlab migration
+
+Signed-off-by: Alan Coopersmith 
+
+commit c9f8faf1c05fb92abc6c5b1db5e45eb1a7942875
+Author: Alan Coopersmith 
+Date:   Mon Nov 19 22:30:30 2018 -0800
+
+Update README for gitlab migration
+
+Signed-off-by: Alan Coopersmith 
+
+commit 73a1e769dcf2a603fc63f5c36626c1c6db815f46
+Author: Alan Coopersmith 
+Date:   Sun Sep 30 15:09:29 2018 -0700
+
+After fdopen(), use fclose() instead of close() in error path
+
+Found by Oracle's Parfait 2.2 static analyzer:
+
+Error: File Leak
+   File Leak [file-ptr-leak]:
+  Leaked File fp
+at line 94 of lib/libXpm/src/RdFToBuf.c in function 
'XpmReadFileToBuffer
+'.
+  fp initialized at line 86 with fdopen
+  fp leaks when len < 0 at line 92.
+
+Introduced-by: commit 8b3024e6871ce50b34bf2dff924774bd654703bc
+
+Signed-off-by: Alan Coopersmith 
+Reviewed-by: Peter Hutterer 
+
+commit bc1b4962f048cfa33b76be46493e10cfb256fe98
+Author: Dave Bodenstab 
+Date:   Wed Feb 22 12:04:54 2012 +
+
+Windows build fixes
+
+https://bugs.freedesktop.org/show_bug.cgi?id=46475
+https://bugs.freedesktop.org/attachment.cgi?id=57479
+
+Signed-off-by: Alan Coopersmith 
+
+commit e42ca7b484418b169fd19a4c68e23ad2a6ec7a11
+Author: Mihail Konev 
+Date:   Thu Jan 26 13:52:49 2017 +1000
+
+autogen: add default patch prefix
+
+Signed-off-by: Mihail Konev 
+
+commit ed8f9c2e8b635eb63497c48b24a056f9e6f50609
+Author: Emil Velikov 
+Date:   Mon Mar 9 12:00:52 2015 +
+
+autogen.sh: use quoted string variables
+
+Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
+fall-outs, when they contain space.
+
+Signed-off-by: Emil Velikov 
+Reviewed-by: Peter Hutterer 
+Signed-off-by: Peter Hutterer 
+
+commit 644d7c595ba29fb368666fb497e1e14a92a65a77
+Author: Peter Hutterer 
+Date:   Tue Jan 24 10:32:07 2017 +1000
+
+autogen.sh: use exec instead of waiting for configure to finish
+
+Syncs the invocation of configure with the one from the server.
+
+Signed-off-by: Peter Hutterer 
+Reviewed-by: Emil Velikov 
+
 commit 1fab5e81fd761f628fb68d22934615536dbd0220
 Author: Matthieu Herrb 
 Date:   Mon Dec 12 23:09:52 2016 +0100
Index: Makefile.am
===
RCS file: /cvs/OpenBSD/xenocara/lib/libXpm/Makefile.am,v
retrieving revision 1.4
diff -u -p -u -r1.4 Makefile.am
--- Makefile.am 10 Mar 2012 14:30:32 -  1.4
+++ Makefile.am 15 Dec 2019 18:27:04 -
@@ -8,7 +8,7 @@ ACLOCAL_AMFLAGS = -I m4
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = xpm.pc
 
-EXTRA_DIST = COPYRIGHT NEWS.old
+EXTRA_DIST = COPYRIGHT NEWS.old README.md
 
 MAINTAINERCLEANFILES = ChangeLog INSTALL