cron scheduling on a laptop and backups

2020-06-06 Thread Switch 1024
Hello,

first time OpenBSD user here. I came from 20 years of linux, then 6
years of freebsd, and finally arrived at OpenBSD, thank you guys for
doing such a great job. It just feels right, feels like home!

While checking about how to backup the system correctly, and what
files I need to recover my system and checked the altroot strategy,
which is executed from the daily script which is started via cron.

I checked my cron log and there are no executions of daily, weekly,
etc. I only see newsyslog jobs being executed. Right, I put my laptop
to sleep or turn it off most of the time when I am done working.

So how to deal with this correctly? Change the hours to run the
backups during the day? Is there a way to tell cron to run jobs it
missed? (Reading the man pages, I did not see that there would be ...)

How do you guys schedule these tasks (also cleanup tasks to clean out
/tmp etc. on your laptops?

Thank you,
Best regards
Rai



OpenSMTP relaying to multiple mail servers

2020-06-06 Thread Predrag Punosevac
Hi Misc,

I have a very noob question. Is it possible to configure OpenSMTP to use
multiple relay servers? 

I would like to be able to do the following.

mail -r someb...@gmail.com miscATopenbsd

should relay through smtp.gmail.com

mail -r someb...@hotmail.com miscATopenbsd

should relay through smtp-mail.outlook.com

I have seen an article 

https://www.admin-magazine.com/Articles/OpenSMTPD-makes-mail-server-configuration-easy/(offset)/3

but the configuration syntax is old. I tried to configure filter using
new syntax to no avail. I do know how to configure OpenSMTP to relay
email per minimal working example provided with man pages. I am trying
to abuse OpenSMTP to improve my MUA mail(1) experience.

Cheers,
Predrag



Re: Potential awk bug?

2020-06-06 Thread Theo de Raadt
I was halfway there.

That's an old bug.

Philip Guenther  wrote:

> On Sat, Jun 6, 2020 at 5:08 PM Zé Loff  wrote:
> 
> > On Sat, Jun 06, 2020 at 03:51:58PM -0700, Jordan Geoghegan wrote:
> > > I'm working on a simple awk snippet to convert the IP range data listed
> > in
> > > the Extended Delegation Statistics data from ARIN [1] and convert it into
> > > CIDR blocks. I have a snippet that works perfectly fine on mawk and gawk,
> > > but not on the base system awk. I'm 99% sure I'm not using any GNUisms,
> > as
> > > when I break the command up into two parts, it works perfectly.
> > >
> > > The snippet below does not work with base awk, but does work with gawk
> > and
> > > mawk: (Running on 6.6 -stable system)
> > >
> > >   awk -F '|' '{ if ( $3 == "ipv4" && $2 == "US") printf("%s/%d\n", $4,
> > > 32-log($5)/log(2))}' delegated-arin-extended-latest.txt
> > >
> > >
> > > The command does output data, but it also throws errors for certain
> > lines:
> > >
> > >   awk: log result out of range
> > >   input record number 94027, file delegated-arin-extended-latest.txt
> > >   source line number 1
> > >
> > > Most CIDR blocks are calculated correctly, but about 10% of them have
> > errors
> > > (ie something that should calculated to be a /24 is instead calculated
> > to be
> > > a /30).
> >
> ...
> 
> > I have no idea about what is going on, but FWIW I can reproduce this on
> > i386 6.7-stable and amd64 6.7-current (well, current-ish, #232).
> > Truncating the file to a single offending line produces the same result:
> > log($5) is out of range.
> >
> > It appears to have something to do with the last field.  Removing it or
> > changing some of its characters seems to work, e.g.:
> >
> >
> > arin|US|ipv4|216.250.144.0|4096|20050503|allocated|5e58386636aa775c2106140445cf2c30
> >
> > arin|US|ipv4|216.250.144.0|4096|20050503|allocated|5a58386636aa775c2106140445cf2c30
> > ^
> > Fails on the first line but works on the second.
> >
> 
> Hah!  Nice observation!
> 
> The last field of the first line looks kinda like a number in scientific
> notation, but when awk internally tries to set up the fields it generates
> an ERANGE error...and the global errno variable is left with that value.
> Several builtins in awk, including log(), perform operations and then check
> whether errno is set to EDOM or ERANGE but fail to clear errno beforehand.
> 
> The fix is to zero errno before all the code sequences that use the
> errcheck() function, ala:
> 
> --- run.c   13 Aug 2019 10:45:56 -  1.44
> +++ run.c   7 Jun 2020 03:14:38 -
> @@ -26,6 +26,7 @@ THIS SOFTWARE.
>  #define DEBUG
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -1041,8 +1042,10 @@ Cell *arith(Node **a, int n) /* a[0] + a
> case POWER:
> if (j >= 0 && modf(j, &v) == 0.0)   /* pos integer
> exponent */
> i = ipow(i, (int) j);
> -   else
> +   else {
> +   errno = 0;
> i = errcheck(pow(i, j), "pow");
> +   }
> break;
> default:/* can't happen */
> FATAL("illegal arithmetic operator %d", n);
> @@ -1135,8 +1138,10 @@ Cell *assign(Node **a, int n)/* a[0] =
> case POWEQ:
> if (yf >= 0 && modf(yf, &v) == 0.0) /* pos integer
> exponent */
> xf = ipow(xf, (int) yf);
> -   else
> +   else {
> +   errno = 0;
> xf = errcheck(pow(xf, yf), "pow");
> +   }
> break;
> default:
> FATAL("illegal assignment operator %d", n);
> @@ -1499,12 +1504,15 @@ Cell *bltin(Node **a, int n)/* builtin
> u = strlen(getsval(x));
> break;
> case FLOG:
> +   errno = 0;
> u = errcheck(log(getfval(x)), "log"); break;
> case FINT:
> modf(getfval(x), &u); break;
> case FEXP:
> +   errno = 0;
> u = errcheck(exp(getfval(x)), "exp"); break;
> case FSQRT:
> +   errno = 0;
> u = errcheck(sqrt(getfval(x)), "sqrt"); break;
> case FSIN:
> u = sin(getfval(x)); break;
> 
> 
> Todd, are we up to date with upstream, or is this latent there too?
> 
> 
> Philip Guenther



Re: Potential awk bug?

2020-06-06 Thread Philip Guenther
On Sat, Jun 6, 2020 at 5:08 PM Zé Loff  wrote:

> On Sat, Jun 06, 2020 at 03:51:58PM -0700, Jordan Geoghegan wrote:
> > I'm working on a simple awk snippet to convert the IP range data listed
> in
> > the Extended Delegation Statistics data from ARIN [1] and convert it into
> > CIDR blocks. I have a snippet that works perfectly fine on mawk and gawk,
> > but not on the base system awk. I'm 99% sure I'm not using any GNUisms,
> as
> > when I break the command up into two parts, it works perfectly.
> >
> > The snippet below does not work with base awk, but does work with gawk
> and
> > mawk: (Running on 6.6 -stable system)
> >
> >   awk -F '|' '{ if ( $3 == "ipv4" && $2 == "US") printf("%s/%d\n", $4,
> > 32-log($5)/log(2))}' delegated-arin-extended-latest.txt
> >
> >
> > The command does output data, but it also throws errors for certain
> lines:
> >
> >   awk: log result out of range
> >   input record number 94027, file delegated-arin-extended-latest.txt
> >   source line number 1
> >
> > Most CIDR blocks are calculated correctly, but about 10% of them have
> errors
> > (ie something that should calculated to be a /24 is instead calculated
> to be
> > a /30).
>
...

> I have no idea about what is going on, but FWIW I can reproduce this on
> i386 6.7-stable and amd64 6.7-current (well, current-ish, #232).
> Truncating the file to a single offending line produces the same result:
> log($5) is out of range.
>
> It appears to have something to do with the last field.  Removing it or
> changing some of its characters seems to work, e.g.:
>
>
> arin|US|ipv4|216.250.144.0|4096|20050503|allocated|5e58386636aa775c2106140445cf2c30
>
> arin|US|ipv4|216.250.144.0|4096|20050503|allocated|5a58386636aa775c2106140445cf2c30
> ^
> Fails on the first line but works on the second.
>

Hah!  Nice observation!

The last field of the first line looks kinda like a number in scientific
notation, but when awk internally tries to set up the fields it generates
an ERANGE error...and the global errno variable is left with that value.
Several builtins in awk, including log(), perform operations and then check
whether errno is set to EDOM or ERANGE but fail to clear errno beforehand.

The fix is to zero errno before all the code sequences that use the
errcheck() function, ala:

--- run.c   13 Aug 2019 10:45:56 -  1.44
+++ run.c   7 Jun 2020 03:14:38 -
@@ -26,6 +26,7 @@ THIS SOFTWARE.
 #define DEBUG
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1041,8 +1042,10 @@ Cell *arith(Node **a, int n) /* a[0] + a
case POWER:
if (j >= 0 && modf(j, &v) == 0.0)   /* pos integer
exponent */
i = ipow(i, (int) j);
-   else
+   else {
+   errno = 0;
i = errcheck(pow(i, j), "pow");
+   }
break;
default:/* can't happen */
FATAL("illegal arithmetic operator %d", n);
@@ -1135,8 +1138,10 @@ Cell *assign(Node **a, int n)/* a[0] =
case POWEQ:
if (yf >= 0 && modf(yf, &v) == 0.0) /* pos integer
exponent */
xf = ipow(xf, (int) yf);
-   else
+   else {
+   errno = 0;
xf = errcheck(pow(xf, yf), "pow");
+   }
break;
default:
FATAL("illegal assignment operator %d", n);
@@ -1499,12 +1504,15 @@ Cell *bltin(Node **a, int n)/* builtin
u = strlen(getsval(x));
break;
case FLOG:
+   errno = 0;
u = errcheck(log(getfval(x)), "log"); break;
case FINT:
modf(getfval(x), &u); break;
case FEXP:
+   errno = 0;
u = errcheck(exp(getfval(x)), "exp"); break;
case FSQRT:
+   errno = 0;
u = errcheck(sqrt(getfval(x)), "sqrt"); break;
case FSIN:
u = sin(getfval(x)); break;


Todd, are we up to date with upstream, or is this latent there too?


Philip Guenther


Re: Potential awk bug?

2020-06-06 Thread Zé Loff
On Sat, Jun 06, 2020 at 03:51:58PM -0700, Jordan Geoghegan wrote:
> Hello,
> 
> I was hoping the fine folks here could give me a quick sanity check, I'm by
> no means an awk guru, so I'm likely missing something obvious. I wanted to
> ask here quickly before I started flapping my gums on bugs@.
> 
> I'm working on a simple awk snippet to convert the IP range data listed in
> the Extended Delegation Statistics data from ARIN [1] and convert it into
> CIDR blocks. I have a snippet that works perfectly fine on mawk and gawk,
> but not on the base system awk. I'm 99% sure I'm not using any GNUisms, as
> when I break the command up into two parts, it works perfectly.
> 
> The snippet below does not work with base awk, but does work with gawk and
> mawk: (Running on 6.6 -stable system)
> 
>   awk -F '|' '{ if ( $3 == "ipv4" && $2 == "US") printf("%s/%d\n", $4,
> 32-log($5)/log(2))}' delegated-arin-extended-latest.txt
> 
> 
> The command does output data, but it also throws errors for certain lines:
> 
>   awk: log result out of range
>   input record number 94027, file delegated-arin-extended-latest.txt
>   source line number 1
> 
> Most CIDR blocks are calculated correctly, but about 10% of them have errors
> (ie something that should calculated to be a /24 is instead calculated to be
> a /30).
> 
> However, when I break it up into two parts, it produces the expected output:
> 
>   awk -F '|' '{ if ( $3 == "ipv4" && $2 == "US") print($4, $5)}'
> delegated-arin-extended-latest.txt | awk  '{printf("%s/%d\n", $1,
> 32-log($2)/log(2)) }'
> 
> As you can see, the same number of lines are printed, but the hashes are
> different.
> 
>   luna$ gawk -F '|' '{ if ( $3 == "ipv4" && $2 == "US") printf("%s/%d\n",
> $4, 32-log($5)/log(2))}' delegated-*-latest.txt | wc -l
>      56446
>   luna$ mawk -F '|' '{ if ( $3 == "ipv4" && $2 == "US") printf("%s/%d\n",
> $4, 32-log($5)/log(2))}' delegated-*-latest.txt | wc -l
>      56446
>   luna$ awk -F '|' '{ if ( $3 == "ipv4" && $2 == "US") printf("%s/%d\n", $4,
> 32-log($5)/log(2))}' delegated-*-latest.txt 2>/dev/null | wc -l
>      56446
> 
>   luna$ awk -F '|' '{ if ( $3 == "ipv4" && $2 == "US") printf("%s/%d\n", $4,
> 32-log($5)/log(2))}' delegated-arin-extended-latest.txt 2>/dev/null | md5
>     6f549bbc0799bc202c12695f8530d1df
>   luna$ gawk -F '|' '{ if ( $3 == "ipv4" && $2 == "US") printf("%s/%d\n",
> $4, 32-log($5)/log(2))}' delegated-arin-extended-latest.txt 2>/dev/null |
> md5
>     40c28b8ebfd2796e1ae15d9f6401c0c1
>   luna$ mawk -F '|' '{ if ( $3 == "ipv4" && $2 == "US") printf("%s/%d\n",
> $4, 32-log($5)/log(2))}' delegated-arin-extended-latest.txt 2>/dev/null |
> md5
>     40c28b8ebfd2796e1ae15d9f6401c0c1
> 
> 
> Example of the differences:
> 
> --- mawk.txt    Sat Jun  6 18:43:30 2020
> +++ awk.txt Sat Jun  6 18:43:38 2020
> @@ -29,7 +29,7 @@
>  9.64.0.0/10
>  9.128.0.0/9
>  11.0.0.0/8
> -12.0.0.0/8
> +12.0.0.0/30
>  13.0.0.0/11
>  13.32.0.0/12
>  13.48.0.0/14
> @@ -415,7 +415,7 @@
>  23.90.64.0/20
>  23.90.80.0/21
>  23.90.88.0/22
> -23.90.92.0/22
> +23.90.92.0/30
>  23.90.96.0/19
>  23.91.0.0/19
>  23.91.32.0/19
> @@ -545,8 +545,8 @@
>  23.133.224.0/24
>  23.133.240.0/24
>  23.134.0.0/24
> -23.134.16.0/24
> -23.134.17.0/24
> +23.134.16.0/30
> +23.134.17.0/30
> 
> 
> Any insight or advice would be much appreciated.
> 
> Regards,
> 
> Jordan
> 
> [1] https://ftp.arin.net/pub/stats/arin/delegated-arin-extended-latest
> 
> 

I have no idea about what is going on, but FWIW I can reproduce this on
i386 6.7-stable and amd64 6.7-current (well, current-ish, #232).
Truncating the file to a single offending line produces the same result:
log($5) is out of range.

It appears to have something to do with the last field.  Removing it or
changing some of its characters seems to work, e.g.:

arin|US|ipv4|216.250.144.0|4096|20050503|allocated|5e58386636aa775c2106140445cf2c30
arin|US|ipv4|216.250.144.0|4096|20050503|allocated|5a58386636aa775c2106140445cf2c30
^
Fails on the first line but works on the second.

-- 
 



Re: late pppoe address

2020-06-06 Thread Kenneth Gober
On Sat, Jun 6, 2020 at 11:57 AM Jan Stary  wrote:

> This is current/amd64 on an APU2.
> The egress is XDSL pppoe(4) over vlan(4) over em(4),
>
> ...
>
> Are people having the same problem?
> Are you doing something about the late ifconfig?
>

I have some routers that connect to DSL using pppoe(4) and yes, I
have the same problem with delayed startup.  For me the impact is to
isc_named and openvpn, but the result is similar -- a lot of logged
errors, mostly due to inability to resolve names until the pppoe link
comes up.  A somewhat more difficult problem is that ospfd fails to start
at all under these conditions (I have it listening for routes over the
vpn links, and ospfd won't start if those links are down).

I don't do anything at startup to address this, because the DSL is also
prone to dropping at other times for other reasons.  I considered using
ifstated to fix it, but found it more expedient to simply use a cron job
to "rcctl start ospfd" periodically, and to ignore everything else.

Ignoring everything else works because most things resolve themselves
when pppoe negotiation finally completes.  I am very happy that things just
start working once the link comes up, and that manual intervention isn't
needed.  A few logged errors from software that is able to resume normal
function on its own is very little burden compared to some alternatives.

-ken


Re: late pppoe address

2020-06-06 Thread Mihai Popescu
Start address this problem to your ISP and ask it to remedy this stupid
implementation of pppoe on server side. Otherwise, you have to wait for it
and avoid spamming the list with your "i need to get this done quickly"
messages, please. Maybe it is time to employ a real expert on OpenBSD.

Thank you.


Potential awk bug?

2020-06-06 Thread Jordan Geoghegan

Hello,

I was hoping the fine folks here could give me a quick sanity check, I'm 
by no means an awk guru, so I'm likely missing something obvious. I 
wanted to ask here quickly before I started flapping my gums on bugs@.


I'm working on a simple awk snippet to convert the IP range data listed 
in the Extended Delegation Statistics data from ARIN [1] and convert it 
into CIDR blocks. I have a snippet that works perfectly fine on mawk and 
gawk, but not on the base system awk. I'm 99% sure I'm not using any 
GNUisms, as when I break the command up into two parts, it works perfectly.


The snippet below does not work with base awk, but does work with gawk 
and mawk: (Running on 6.6 -stable system)


  awk -F '|' '{ if ( $3 == "ipv4" && $2 == "US") printf("%s/%d\n", $4, 
32-log($5)/log(2))}' delegated-arin-extended-latest.txt



The command does output data, but it also throws errors for certain lines:

  awk: log result out of range
  input record number 94027, file delegated-arin-extended-latest.txt
  source line number 1

Most CIDR blocks are calculated correctly, but about 10% of them have 
errors (ie something that should calculated to be a /24 is instead 
calculated to be a /30).


However, when I break it up into two parts, it produces the expected output:

  awk -F '|' '{ if ( $3 == "ipv4" && $2 == "US") print($4, $5)}' 
delegated-arin-extended-latest.txt | awk  '{printf("%s/%d\n", $1, 
32-log($2)/log(2)) }'


As you can see, the same number of lines are printed, but the hashes are 
different.


  luna$ gawk -F '|' '{ if ( $3 == "ipv4" && $2 == "US") 
printf("%s/%d\n", $4, 32-log($5)/log(2))}' delegated-*-latest.txt | wc -l

     56446
  luna$ mawk -F '|' '{ if ( $3 == "ipv4" && $2 == "US") 
printf("%s/%d\n", $4, 32-log($5)/log(2))}' delegated-*-latest.txt | wc -l

     56446
  luna$ awk -F '|' '{ if ( $3 == "ipv4" && $2 == "US") 
printf("%s/%d\n", $4, 32-log($5)/log(2))}' delegated-*-latest.txt 
2>/dev/null | wc -l

     56446

  luna$ awk -F '|' '{ if ( $3 == "ipv4" && $2 == "US") 
printf("%s/%d\n", $4, 32-log($5)/log(2))}' 
delegated-arin-extended-latest.txt 2>/dev/null | md5

    6f549bbc0799bc202c12695f8530d1df
  luna$ gawk -F '|' '{ if ( $3 == "ipv4" && $2 == "US") 
printf("%s/%d\n", $4, 32-log($5)/log(2))}' 
delegated-arin-extended-latest.txt 2>/dev/null | md5

    40c28b8ebfd2796e1ae15d9f6401c0c1
  luna$ mawk -F '|' '{ if ( $3 == "ipv4" && $2 == "US") 
printf("%s/%d\n", $4, 32-log($5)/log(2))}' 
delegated-arin-extended-latest.txt 2>/dev/null | md5

    40c28b8ebfd2796e1ae15d9f6401c0c1


Example of the differences:

--- mawk.txt    Sat Jun  6 18:43:30 2020
+++ awk.txt Sat Jun  6 18:43:38 2020
@@ -29,7 +29,7 @@
 9.64.0.0/10
 9.128.0.0/9
 11.0.0.0/8
-12.0.0.0/8
+12.0.0.0/30
 13.0.0.0/11
 13.32.0.0/12
 13.48.0.0/14
@@ -415,7 +415,7 @@
 23.90.64.0/20
 23.90.80.0/21
 23.90.88.0/22
-23.90.92.0/22
+23.90.92.0/30
 23.90.96.0/19
 23.91.0.0/19
 23.91.32.0/19
@@ -545,8 +545,8 @@
 23.133.224.0/24
 23.133.240.0/24
 23.134.0.0/24
-23.134.16.0/24
-23.134.17.0/24
+23.134.16.0/30
+23.134.17.0/30


Any insight or advice would be much appreciated.

Regards,

Jordan

[1] https://ftp.arin.net/pub/stats/arin/delegated-arin-extended-latest




Re: late pppoe address

2020-06-06 Thread Stuart Henderson
On 2020-06-06, Todd C  Miller  wrote:
> On Sat, 06 Jun 2020 19:14:28 +0200, Jan Stary wrote:
>
>> Is the aim to let the ISP know that the iface is down,
>> so that it gets set up afresh on boot, as opposed to
>> waiting for some PPP keep-alive timeout?
>
> Basically.  It is to work around an issue where the pppoe ethernet
> interface goes down during reboot before the pppoe disconnect message
> can be sent to the ISP.
>
> I'm not sure it is needed anymore, though I still have it in my own
> rc.shutdown file.

I still have it in mine, not sure if it's needed or not either.
I definitely needed it with a previous ISP who didn't seem to do
LCP keepalives and hanged onto the session for ages (the alternative
for that one was PPPOE_TERM_UNKNOWN_SESSIONS but the kernel-wrangling
became annoying).

Whether it will help or not depends on the reason for the delay.
If it's just poor/slow ISP infrastructure there might be nothing much
you can do other than wait for the interface to come up.




Re: athn on APU2

2020-06-06 Thread Jan Stary
On Jun 06 22:01:14, maillists.rul...@mailbox.org wrote:
> > None of the clients gets more than cca 1.5MB/s from that, alone.
> > Is that to be expected with 11g? (Not that I expect the 54 Mbit/s)
> 
> I faced the same problem with my new APU2 just yesterday and found
> more info here: https://marc.info/?l=openbsd-misc&m=158680303103003&w=2
> 
> It seems like 11a is really much better than 11g on athn right now. I'm
> getting ca. 16-20Mbit/s now (but the bottleneck might be the iwm driver
> on my laptop).
> 
> On a side note: I thought channel 1 was a 2.4GHz channel [1]. I'm
> surprised it works for you. I'm using something like 36, 100 or 128 on
> my APU2.

Unfortunately, some of the clients cannot do 11a or 11n,
so 11g is my only workable choice.

Thanks for the pointer to the older discussion,
I will try to also do some testing without WPA.

Jan





Re: Realtek Edimax AC1750 USB gets properly detected but not configurable in ifconfig

2020-06-06 Thread Patrick Harper
Judging by the dmesg there is at least one unoccupied PCIe slot that could 
accommodate an adapter such as a Silverstone ECWA2-LITE.

This would allow you to use Mini-PCIe cards that normally go in laptops, 
including all of the iwm(4) devices.

-- 
  Patrick Harper
  paia...@fastmail.com

On Sat, 6 Jun 2020, at 19:44, Tristan wrote:
> Oh sorry,  my mistake, I might need some sleep :)
> 
> Thanks for the list of USB adapters, that helps a lot.
> 
> > On Jun 6, 2020, at 9:35 PM, Stuart Henderson  wrote:
> > 
> > On 2020/06/06 19:14, Tristan wrote:
> >> Ok thanks. Yes I’m looking for just using 11n.
> > 
> > You already replied saying that!
> > 
> > It doesn't matter if you only want to use 11n, OpenBSD does not have a
> > driver for the controller used in that adapter.
> > 
> > For USB adapters look for a device using one of these:
> > 
> > bwfm(4) - Broadcom and Cypress IEEE 802.11a/ac/b/g/n wireless network device
> > otus(4) - Atheros USB IEEE 802.11a/b/g/n wireless network device
> > rsu(4) - Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n wireless network 
> > device
> > run(4) - Ralink Technology/MediaTek USB IEEE 802.11a/b/g/n wireless network 
> > device
> > urtwn(4) - Realtek RTL8188CU/RTL8188EU/RTL8192CU/RTL8192EU USB IEEE 
> > 802.11b/g/n wireless network device
> > 
> > (or there are some 11g-only ones but not much point looking for them).
> > 
> > 
> >> 
>  On Jun 6, 2020, at 5:55 AM, Stuart Henderson  
>  wrote:
> >>> 
> >>> On 2020-06-05, Tristan  wrote:
>  Just plugged in a Realtek Edimax AC1750 USB card into a ASRock B450M 
>  board.
>  I can see the card being detected and registered properly in dmesg and
>  usbdevs, but cannot configure it.
>  Is this card supported?
> >>> 
> >>> No. The only supported 11ac USB devices are the limited and fairly hard 
> >>> to get
> >>> hold of bwfm(4) devices. (Some PCIe 11ac are supported but not in 11ac 
> >>> mode.)
> >>> 
> >>> 
> >>> 
> >> 
> > 
> 
>



6.7 EFI boot failure on amd64 since 12/2019 commit (entry point at 0x1001000)

2020-06-06 Thread Matt Kunkel
Since the 6.7 release there have been a few mentions of EFI boot 
failure on amd64. The most common resolution has been to use legacy 
boot. My T440P is running coreboot/TianoCore. The only way to legacy 
boot requires re-flashing the chips via SOIC8 bus pirate. 

Bisecting bootloader commits since 6.6 exposes the breaking commit for 
my laptop on: /src/sys/arch/amd64/stand/efiboot/exec_i386.c

===
date: 2019/12/12 13:09:35; author: bluhm; state: Exp; lines: +33 -1; 
commitid: tGTjnCkwobU1X16m;

"On a HP EliteBook 830 G6 the Computrace executable is located in
the area where the boot loader copies the kernel. Its EfiLoaderCode
is write protected, so the boot loader hangs in memmove(). As we
may use this memory after calling EFI ExitBootServices(), change
the protection bit to writeable in the page table."
===

GitHub: 
https://github.com/openbsd/src/commit/53d61855c6bc9c8ed81d22219d891ee26d918d21#diff-a927f4d9c71ab27dd3e00a136f5679d6

If I roll back prior to that commit, BOOTX64.EFI is fine.
Past that commit, it hangs ` entry point at 0x1001000 `.

Admittedly I'm not familiar with the guts of EFI and am unlikely to
develop a fix. Are there any other ways I can help troubleshoot? 
(Is it possible to run bootx64.efi in lldb?)


For those of you that have experienced this problem, please try compiling
/src/sys/arch/amd64/stand/efiboot/ prior to 2019/12/12. I can provide a 
compiled binary if you reach out directly. 

If this msg belongs in bugs, I can send it there as well. There are other 
recent mentions of this problem on -misc.


Thank you,
Matt Kunkel



Re: athn on APU2

2020-06-06 Thread Richard Ulmer
> None of the clients gets more than cca 1.5MB/s from that, alone.
> Is that to be expected with 11g? (Not that I expect the 54 Mbit/s)

I faced the same problem with my new APU2 just yesterday and found
more info here: https://marc.info/?l=openbsd-misc&m=158680303103003&w=2

It seems like 11a is really much better than 11g on athn right now. I'm
getting ca. 16-20Mbit/s now (but the bottleneck might be the iwm driver
on my laptop).

On a side note: I thought channel 1 was a 2.4GHz channel [1]. I'm
surprised it works for you. I'm using something like 36, 100 or 128 on
my APU2.

[1] https://en.wikipedia.org/wiki/List_of_WLAN_channels



Re: Realtek Edimax AC1750 USB gets properly detected but not configurable in ifconfig

2020-06-06 Thread Tristan
Oh sorry,  my mistake, I might need some sleep :)

Thanks for the list of USB adapters, that helps a lot.

> On Jun 6, 2020, at 9:35 PM, Stuart Henderson  wrote:
> 
> On 2020/06/06 19:14, Tristan wrote:
>> Ok thanks. Yes I’m looking for just using 11n.
> 
> You already replied saying that!
> 
> It doesn't matter if you only want to use 11n, OpenBSD does not have a
> driver for the controller used in that adapter.
> 
> For USB adapters look for a device using one of these:
> 
> bwfm(4) - Broadcom and Cypress IEEE 802.11a/ac/b/g/n wireless network device
> otus(4) - Atheros USB IEEE 802.11a/b/g/n wireless network device
> rsu(4) - Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n wireless network 
> device
> run(4) - Ralink Technology/MediaTek USB IEEE 802.11a/b/g/n wireless network 
> device
> urtwn(4) - Realtek RTL8188CU/RTL8188EU/RTL8192CU/RTL8192EU USB IEEE 
> 802.11b/g/n wireless network device
> 
> (or there are some 11g-only ones but not much point looking for them).
> 
> 
>> 
 On Jun 6, 2020, at 5:55 AM, Stuart Henderson  wrote:
>>> 
>>> On 2020-06-05, Tristan  wrote:
 Just plugged in a Realtek Edimax AC1750 USB card into a ASRock B450M board.
 I can see the card being detected and registered properly in dmesg and
 usbdevs, but cannot configure it.
 Is this card supported?
>>> 
>>> No. The only supported 11ac USB devices are the limited and fairly hard to 
>>> get
>>> hold of bwfm(4) devices. (Some PCIe 11ac are supported but not in 11ac 
>>> mode.)
>>> 
>>> 
>>> 
>> 
> 



Re: Realtek Edimax AC1750 USB gets properly detected but not configurable in ifconfig

2020-06-06 Thread Stuart Henderson
On 2020/06/06 19:14, Tristan wrote:
> Ok thanks. Yes I’m looking for just using 11n.

You already replied saying that!

It doesn't matter if you only want to use 11n, OpenBSD does not have a
driver for the controller used in that adapter.

For USB adapters look for a device using one of these:

bwfm(4) - Broadcom and Cypress IEEE 802.11a/ac/b/g/n wireless network device
otus(4) - Atheros USB IEEE 802.11a/b/g/n wireless network device
rsu(4) - Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n wireless network 
device
run(4) - Ralink Technology/MediaTek USB IEEE 802.11a/b/g/n wireless network 
device
urtwn(4) - Realtek RTL8188CU/RTL8188EU/RTL8192CU/RTL8192EU USB IEEE 802.11b/g/n 
wireless network device

(or there are some 11g-only ones but not much point looking for them).


> 
> > On Jun 6, 2020, at 5:55 AM, Stuart Henderson  wrote:
> > 
> > On 2020-06-05, Tristan  wrote:
> >> Just plugged in a Realtek Edimax AC1750 USB card into a ASRock B450M board.
> >> I can see the card being detected and registered properly in dmesg and 
> >> usbdevs, but cannot configure it.
> >> Is this card supported?
> > 
> > No. The only supported 11ac USB devices are the limited and fairly hard to 
> > get
> > hold of bwfm(4) devices. (Some PCIe 11ac are supported but not in 11ac 
> > mode.)
> > 
> > 
> > 
> 



Re: late pppoe address

2020-06-06 Thread Todd C . Miller
On Sat, 06 Jun 2020 19:14:28 +0200, Jan Stary wrote:

> Is the aim to let the ISP know that the iface is down,
> so that it gets set up afresh on boot, as opposed to
> waiting for some PPP keep-alive timeout?

Basically.  It is to work around an issue where the pppoe ethernet
interface goes down during reboot before the pppoe disconnect message
can be sent to the ISP.

I'm not sure it is needed anymore, though I still have it in my own
rc.shutdown file.

 - todd



OpenBSD Multiboot Installation on UEFI

2020-06-06 Thread marto1980
Dear all,

multiboot installation of a BSD system with other operating systems
(OSs) on UEFI hardware is not officially supported by any of the
popular
BSDs. Because of the general interest in this topic, here I would like
to share my experience of running DragonFly BSD, OpenBSD, and Slackware
Linux on an UEFI ASUS laptop. The only boot manager you need is
[rEFInd](http://www.rodsbooks.com/refind). The tutorial is appended at
the
end of this post. I have also attached it as an .md file for better
readability in case some formatting is lost. I hope you will find the
tutorial useful.

Best regards,

Martin Ivanov


# Installation of OpenBSD in a multiboot on a UEFI machine 

## Preliminaries

As each OS is going to reside on its own hard drive slice,
the first step of setting your system for multiboot is slicing the hard
drive. In general, if you want to multiboot n OSs, you would need n + 1
slices. The extra slice is for the EFI system partition (ESP). Of
course, you have to make sure each partition is large enough for the OS
that is going to reside on it. As mentioned, in this tutorial I share
my
experience with installing DragonFly, OpenBSD, and Slackware Linux. I
sliced the hard drive from DragonFly, which I have exemplarily
described
in the [DragonFly documentation on
multiboot](
https://www.dragonflybsd.org/docs/handbook/Installation/#index6h1).
Of course, you will slice the hard drive from the first OS that you are
going to install. In the above link to the DragonFly documentation, I
have also described how the ESP is to be set up. Therefore, in the
following I assume your first OS has already been installed in its
slice, rEFInd has been installed in the ESP, and I only
consider the specifics of the OpenBSD installation.

## Installation of OpenBSD

First of all, I cannot enough recommend you to read the document 
https://ftp.openbsd.org/pub/OpenBSD/6.7/amd64/INSTALL.amd64. Of course,
this is for OpenBSD version 6.7, for a different OpenBSD version you
should update the version number accordingly.

Prepare the install medium for OpenBSD as described in the
[documentation](https://www.openbsd.org/faq/faq4.html#Download). If you
would need any additional firmware, make sure to download it to a USB
stick as [described in the documentation]
(https://www.openbsd.org/faq/faq4.html#Checklist). In my case with
OpenBSD-6.7, I had to go to http://firmware.openbsd.org/firmware/6.7/
and download the wireless driver I need (iwm-firmware-20191022p0.tgz).
Please make sure to download not only the respective *.tgz files but
also
the SHA256.sig and index.txt files and store them together in the same
folder on the USB stick as the *.tgz file(s).

Boot the computer with the install medium. In the following, I will
just
skim through the questions the installer asks that are not that obvious
how to answer (at least they weren't that obvious for me at the first
install :-))

Select (I)nstall

Do you want the X Window System to be started by xenodm? no (default)
You can always enable xenodm later. Setting no here makes sure after
booting you will be able to inspect the boot messages.

I do not configure network, because my wifi card needs the firmware to
be installed later.

Setup a user: no (default)
You can do this also after installing OpenBSD.

Which disk is the root disk: sd0
In your case the root disk maybe something else, please replace
accordingly.
Disk slicing:
We assume we have already created a disk slice for OpenBSD from the
other OS. Now we have to give that slice a type of A6, so that
the OpenBSD installer is able to recognise it. So, select your hard
drive when offered, and then select (E)dit. This will start an
interactive fdisk session. Typing p will show you the partition table.
If the partition for OpenBSD is number 2, setting its type to A6
involves the following command-line input:

e 2
t
A6
write
quit

As we are going to use rEFInd as a boot manager, you do not need to
toggle a bootable flag on the OpenBSD partition.

Note: On subsequent installs, the OpenBSD installer detects the A6
partition and readily offers it as (O)penBSD area. 

Use (W)hole disk, use the (O)penBSD area, or (E)dit the GPT: OpenBSD
Select the OpenBSD area here, which is also the default choice.

Disklabel partitioning: 
Select a custom layout: C
We want to create a custom layout for the disklabel partitions to make
sure our file systems are large enough for our needs. For example, my
OpenBSD slice is 200 GiB. First, delete all partitions (note that c
cannot be deleted):

z 

Then, I create the following layout:

Partition Size File System Mount Point
a 10g 4.2BSD/
b 16g swap
d 50g 4.2BSD/usr
e 10g 4.2BSD/var
f 15g 4.2BSD/tmp
g rest4.2BSD/home

Typing ? will help you figure out the exact commands you have to type
to
create your desired layout. When you ar

Re: late pppoe address

2020-06-06 Thread Jan Stary
Hi,

On Jun 06 17:46:35, j...@kerhand.co.uk wrote:
> On Sat, Jun 06, 2020 at 05:56:56PM +0200, Jan Stary wrote:
> > This is current/amd64 on an APU2.
> > The egress is XDSL pppoe(4) over vlan(4) over em(4),
> > as is the case with many European dialup telecoms.
> > 
> > The connection itself works just fine (after some mss woes),
> > but it takes some time to get assigned and IP address at startup.
> > 
> > $ cat /etc/hostname.pppoe0
> > inet 0.0.0.0 255.255.255.255 NONE pppoedev vlan0 \
> > authproto 'pap' authname 'X' authkey 'PASS' up
> > dest 0.0.0.1
> > inet6 eui64
> > !/sbin/route add default 0.0.0.1
> > !/sbin/route add -inet6 default -ifp pppoe0 fe80::%pppoe0
> > 
> > As per pppoe(4), the 0.0.0.0 and 0.0.0.1 get changed
> > to my actual address (fixed) and the other end, respectively;
> > routes get established, etc.
> > 
> > My problem is that the delay is long enough
> > to make some of the the early daemons choke:
> > 
> > starting network
> > add net default: gateway 0.0.0.1
> > add net default: gateway fe80::%pppoe0
> > starting early daemons: syslogd pflogd nsd(failed) unbound ntpd.
> > 
> > nsd seems to get fixed using "ip-transparent: yes";
> > ntpd eventualy synchronizes after some "DNS lookup tempfail"s;
> > but unbound spams /var/log/daemon with thousands of lines of
> > 
> > unbound: [2895:0] notice: sendto failed: Permission denied
> > unbound: [2895:0] notice: remote address is 178.17.0.12 port 53
> > 
> > as it tries in vain to contact its forwarders
> > (or the root servers, if I don't specify forwarders).
> > 
> > Eventually, it all falls into place, but is there a way
> > to make the boot sequence wait for the pppoe IP address
> > get assigned before moving on? I appended a lame
> > 
> > !while ! ifconfig pppoe0 | grep -F 185.63.96.79; do date ; sleep 1; done
> > 
> > to /etc/hostname.pppoe0, resulting in
> > 
> > starting network
> > add net default: gateway 0.0.0.1
> > add net default: gateway fe80::%pppoe0
> > Sat Jun  6 17:41:19 CEST 2020
> > Sat Jun  6 17:41:21 CEST 2020
> > [...]
> > Sat Jun  6 17:42:53 CEST 2020
> > Sat Jun  6 17:42:54 CEST 2020
> > inet 185.63.96.79 --> 10.11.5.146 netmask 0x
> > starting early daemons: syslogd pflogd nsd unbound ntpd.
> > 
> > (The date is there purely for debug of course;
> > it shows it took about a minute and a half this time.)
> > 
> > Are people having the same problem?
> > Are you doing something about the late ifconfig?
> > 
> > Jan
> > 
> 
> hi.
> 
> although i haven't used pppoe for a little while, i definitely had the
> same issue when i did (uk provider). i think i bugged another developer
> to look at it (mpi?) but we never got far in working out a solution.
> 
> sthen provided a workaround though: sth like "ifconfig pppoe0 down" in
> /etc/rc.shutdown. i guess it's worth a shot...

thank you for the tip.

I just tried that, but it didn't make a difference.

Is the aim to let the ISP know that the iface is down,
so that it gets set up afresh on boot, as opposed to
waiting for some PPP keep-alive timeout?

Jan



Re: Latest snapshot - no go on amd64

2020-06-06 Thread Clay Daniels
On Sat, Jun 6, 2020 at 11:05 AM ari.openbsd  wrote:

> Hi All,
>
> I have problem with latest snapshot from 5 Jun
>

I too had a problem with yesterday's sysupgrade -s. It failed (twice) with
verification errors, and I just gave up and went to bed.

Today, just now, I got a clean upgrade to: OpenBSD obsd.attlocal.net
GENERIC.MP#247 amd64
And pkg_add -u worked just fine too.


> After sysupgrade booting looks like this:
>
> probing: pc0 com0 com1 mem[248K 376K 255M 1596M 344K 13M 3M 6144M]
> disk: hd0 hd1 hd2 hd3 hd4* hd5* sr0
> >> OpenBSD/amd64 BOOTX64 3.51
> switching console to com0
> >> OpenBSD/amd64 BOOTX64 3.51
> boot> boot bsd
> NOTE: random seed is being reused.
> booting hd0a:bsd.ok: 12961096+2757640+335904+0+864256
> [807833+128+1026336+750576]=0x129c530
> entry point at 0x1001000
>
> At this point booting hangs permanently
> I tried to boot bsd.sp and bsd.booted with same results.
> When I inserted bsd.mp from 6.7 release booting looks normal.
> Also checked files form sysupgrade against SHA256 which was OK.
>
> Is there wa way to restore previous snapshot or
> should I wait to next snapshot which maybe resolve this behavior
> and in the meantime install release version.
>
> Regards,
> Ari
>
> below boot process with bsd from release:
>
> boot> boot hd1a:/bsd
> booting hd1a:/bsd: 12944712+2753552+331808+0+704512
> [804728+128+1024872+749630]=0x126dfa0
> entry point at 0x1001000
> [ using 2580384 bytes of bsd ELF symbol table ]
> Copyright (c) 1982, 1986, 1989, 1991, 1993
> The Regents of the University of California.  All rights reserved.
> Copyright (c) 1995-2020 OpenBSD. All rights reserved.
> https://www.OpenBSD.org
>
> OpenBSD 6.7 (GENERIC.MP) #182: Thu May  7 11:11:58 MDT 2020
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 8385654784 (7997MB)
> avail mem = 8118906880 (7742MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.8 @ 0x79856000 (60 entries)
> bios0: vendor American Megatrends Inc. version "5.13" date 04/27/2020
> bios0: HARDKERNEL ODROID-H2
> acpi0 at bios0: ACPI 6.1
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP FPDT FIDT MCFG DBG2 DBGP HPET LPIT APIC NPKT SSDT
> SSDT SSDT SSDT SSDT SSDT SSDT SSDT UEFI SPCR BERT DMAR WDAT WSMT
> acpi0: wakeup devices HDAS(S3) XHC_(S4) XDCI(S4) RP01(S4) RP02(S4)
> RP03(S4) RP04(S4) RP05(S4) RP06(S4)
> acpitimer0 at acpi0: 3579545 Hz, 32 bits
> acpimcfg0 at acpi0
> acpimcfg0: addr 0xe000, bus 0-255
> acpihpet0 at acpi0: 1920 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Celeron(R) J4105 CPU @ 1.50GHz, 5941.75 MHz, 06-7a-01
> cpu0:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2
> ,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,SMEP,ERMS,M
> PX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,UMIP,MD_CLEAR,IBRS,IBPB,STIBP,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
> cpu0: 4MB 64b/line 16-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> cpu0: apic clock running at 19MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.0.2.4.2.1.1, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Celeron(R) J4105 CPU @ 1.50GHz, 1495.87 MHz, 06-7a-01
> cpu1:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2
> ,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,SMEP,ERMS,M
> PX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,UMIP,MD_CLEAR,IBRS,IBPB,STIBP,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
> cpu1: 4MB 64b/line 16-way L2 cache
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 4 (application processor)
> cpu2: Intel(R) Celeron(R) J4105 CPU @ 1.50GHz, 1495.87 MHz, 06-7a-01
> cpu2:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2
> ,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,SMEP,ERMS,M
> PX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,UMIP,MD_CLEAR,IBRS,IBPB,STIBP,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
> cpu2: 4MB 64b/line 16-way L2 cache
> cpu2: smt 0, core 2, package 0
> cpu3 at mainbus0: apid 6 (application processor)
> cpu3: Intel(R) Celeron(R) J4105 CPU @ 1.50GHz, 1495.87 MHz, 06-7a-01
> cpu3:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL

Re: late pppoe address

2020-06-06 Thread Jason McIntyre
On Sat, Jun 06, 2020 at 05:56:56PM +0200, Jan Stary wrote:
> This is current/amd64 on an APU2.
> The egress is XDSL pppoe(4) over vlan(4) over em(4),
> as is the case with many European dialup telecoms.
> 
> The connection itself works just fine (after some mss woes),
> but it takes some time to get assigned and IP address at startup.
> 
>   $ cat /etc/hostname.pppoe0
>   inet 0.0.0.0 255.255.255.255 NONE pppoedev vlan0 \
>   authproto 'pap' authname 'X' authkey 'PASS' up
>   dest 0.0.0.1
>   inet6 eui64
>   !/sbin/route add default 0.0.0.1
>   !/sbin/route add -inet6 default -ifp pppoe0 fe80::%pppoe0
> 
> As per pppoe(4), the 0.0.0.0 and 0.0.0.1 get changed
> to my actual address (fixed) and the other end, respectively;
> routes get established, etc.
> 
> My problem is that the delay is long enough
> to make some of the the early daemons choke:
> 
>   starting network
>   add net default: gateway 0.0.0.1
>   add net default: gateway fe80::%pppoe0
>   starting early daemons: syslogd pflogd nsd(failed) unbound ntpd.
> 
> nsd seems to get fixed using "ip-transparent: yes";
> ntpd eventualy synchronizes after some "DNS lookup tempfail"s;
> but unbound spams /var/log/daemon with thousands of lines of
> 
>   unbound: [2895:0] notice: sendto failed: Permission denied
>   unbound: [2895:0] notice: remote address is 178.17.0.12 port 53
> 
> as it tries in vain to contact its forwarders
> (or the root servers, if I don't specify forwarders).
> 
> Eventually, it all falls into place, but is there a way
> to make the boot sequence wait for the pppoe IP address
> get assigned before moving on? I appended a lame
> 
> !while ! ifconfig pppoe0 | grep -F 185.63.96.79; do date ; sleep 1; done
> 
> to /etc/hostname.pppoe0, resulting in
> 
> starting network
> add net default: gateway 0.0.0.1
> add net default: gateway fe80::%pppoe0
> Sat Jun  6 17:41:19 CEST 2020
> Sat Jun  6 17:41:21 CEST 2020
> [...]
> Sat Jun  6 17:42:53 CEST 2020
> Sat Jun  6 17:42:54 CEST 2020
> inet 185.63.96.79 --> 10.11.5.146 netmask 0x
> starting early daemons: syslogd pflogd nsd unbound ntpd.
> 
> (The date is there purely for debug of course;
> it shows it took about a minute and a half this time.)
> 
> Are people having the same problem?
> Are you doing something about the late ifconfig?
> 
>   Jan
> 

hi.

although i haven't used pppoe for a little while, i definitely had the
same issue when i did (uk provider). i think i bugged another developer
to look at it (mpi?) but we never got far in working out a solution.

sthen provided a workaround though: sth like "ifconfig pppoe0 down" in
/etc/rc.shutdown. i guess it's worth a shot...

jmc



Re: Realtek Edimax AC1750 USB gets properly detected but not configurable in ifconfig

2020-06-06 Thread Tristan
Ok thanks. Yes I’m looking for just using 11n.


> On Jun 6, 2020, at 5:55 AM, Stuart Henderson  wrote:
> 
> On 2020-06-05, Tristan  wrote:
>> Just plugged in a Realtek Edimax AC1750 USB card into a ASRock B450M board.
>> I can see the card being detected and registered properly in dmesg and 
>> usbdevs, but cannot configure it.
>> Is this card supported?
> 
> No. The only supported 11ac USB devices are the limited and fairly hard to get
> hold of bwfm(4) devices. (Some PCIe 11ac are supported but not in 11ac mode.)
> 
> 
> 



Latest snapshot - no go on amd64

2020-06-06 Thread ari.openbsd
Hi All,

I have problem with latest snapshot from 5 Jun
After sysupgrade booting looks like this:

probing: pc0 com0 com1 mem[248K 376K 255M 1596M 344K 13M 3M 6144M]
disk: hd0 hd1 hd2 hd3 hd4* hd5* sr0
>> OpenBSD/amd64 BOOTX64 3.51
switching console to com0
>> OpenBSD/amd64 BOOTX64 3.51
boot> boot bsd
NOTE: random seed is being reused.
booting hd0a:bsd.ok: 12961096+2757640+335904+0+864256 
[807833+128+1026336+750576]=0x129c530
entry point at 0x1001000

At this point booting hangs permanently
I tried to boot bsd.sp and bsd.booted with same results.
When I inserted bsd.mp from 6.7 release booting looks normal.
Also checked files form sysupgrade against SHA256 which was OK.

Is there wa way to restore previous snapshot or
should I wait to next snapshot which maybe resolve this behavior
and in the meantime install release version.

Regards,
Ari

below boot process with bsd from release:

boot> boot hd1a:/bsd
booting hd1a:/bsd: 12944712+2753552+331808+0+704512 
[804728+128+1024872+749630]=0x126dfa0
entry point at 0x1001000
[ using 2580384 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2020 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 6.7 (GENERIC.MP) #182: Thu May  7 11:11:58 MDT 2020
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8385654784 (7997MB)
avail mem = 8118906880 (7742MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0x79856000 (60 entries)
bios0: vendor American Megatrends Inc. version "5.13" date 04/27/2020
bios0: HARDKERNEL ODROID-H2
acpi0 at bios0: ACPI 6.1
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP FPDT FIDT MCFG DBG2 DBGP HPET LPIT APIC NPKT SSDT SSDT 
SSDT SSDT SSDT SSDT SSDT SSDT UEFI SPCR BERT DMAR WDAT WSMT
acpi0: wakeup devices HDAS(S3) XHC_(S4) XDCI(S4) RP01(S4) RP02(S4) RP03(S4) 
RP04(S4) RP05(S4) RP06(S4)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimcfg0 at acpi0
acpimcfg0: addr 0xe000, bus 0-255
acpihpet0 at acpi0: 1920 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Celeron(R) J4105 CPU @ 1.50GHz, 5941.75 MHz, 06-7a-01
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2
 
,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,SMEP,ERMS,M
 
PX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,UMIP,MD_CLEAR,IBRS,IBPB,STIBP,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 19MHz
cpu0: mwait min=64, max=64, C-substates=0.2.0.2.4.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Celeron(R) J4105 CPU @ 1.50GHz, 1495.87 MHz, 06-7a-01
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2
 
,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,SMEP,ERMS,M
 
PX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,UMIP,MD_CLEAR,IBRS,IBPB,STIBP,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu1: 4MB 64b/line 16-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Celeron(R) J4105 CPU @ 1.50GHz, 1495.87 MHz, 06-7a-01
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2
 
,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,SMEP,ERMS,M
 
PX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,UMIP,MD_CLEAR,IBRS,IBPB,STIBP,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu2: 4MB 64b/line 16-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Celeron(R) J4105 CPU @ 1.50GHz, 1495.87 MHz, 06-7a-01
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2
 
,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,SMEP,ERMS,M
 
PX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,UMIP,MD_CLEAR,IBRS,IBPB,STIBP,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu3: 4MB 64b/line 16-way L2 cache
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 120 pins
acpiprt0 at acpi0

late pppoe address

2020-06-06 Thread Jan Stary
This is current/amd64 on an APU2.
The egress is XDSL pppoe(4) over vlan(4) over em(4),
as is the case with many European dialup telecoms.

The connection itself works just fine (after some mss woes),
but it takes some time to get assigned and IP address at startup.

$ cat /etc/hostname.pppoe0
inet 0.0.0.0 255.255.255.255 NONE pppoedev vlan0 \
authproto 'pap' authname 'X' authkey 'PASS' up
dest 0.0.0.1
inet6 eui64
!/sbin/route add default 0.0.0.1
!/sbin/route add -inet6 default -ifp pppoe0 fe80::%pppoe0

As per pppoe(4), the 0.0.0.0 and 0.0.0.1 get changed
to my actual address (fixed) and the other end, respectively;
routes get established, etc.

My problem is that the delay is long enough
to make some of the the early daemons choke:

starting network
add net default: gateway 0.0.0.1
add net default: gateway fe80::%pppoe0
starting early daemons: syslogd pflogd nsd(failed) unbound ntpd.

nsd seems to get fixed using "ip-transparent: yes";
ntpd eventualy synchronizes after some "DNS lookup tempfail"s;
but unbound spams /var/log/daemon with thousands of lines of

unbound: [2895:0] notice: sendto failed: Permission denied
unbound: [2895:0] notice: remote address is 178.17.0.12 port 53

as it tries in vain to contact its forwarders
(or the root servers, if I don't specify forwarders).

Eventually, it all falls into place, but is there a way
to make the boot sequence wait for the pppoe IP address
get assigned before moving on? I appended a lame

!while ! ifconfig pppoe0 | grep -F 185.63.96.79; do date ; sleep 1; done

to /etc/hostname.pppoe0, resulting in

starting network
add net default: gateway 0.0.0.1
add net default: gateway fe80::%pppoe0
Sat Jun  6 17:41:19 CEST 2020
Sat Jun  6 17:41:21 CEST 2020
[...]
Sat Jun  6 17:42:53 CEST 2020
Sat Jun  6 17:42:54 CEST 2020
inet 185.63.96.79 --> 10.11.5.146 netmask 0x
starting early daemons: syslogd pflogd nsd unbound ntpd.

(The date is there purely for debug of course;
it shows it took about a minute and a half this time.)

Are people having the same problem?
Are you doing something about the late ifconfig?

Jan



Re: athn0: could not wakeup chip

2020-06-06 Thread Jan Stary
On Jun 06 15:34:32, h...@stare.cz wrote:
> This is current/amd64 on an APU@ (dmesg below). I put a
> 
> athn0 at pci4 dev 0 function 0 "Atheros AR5418" rev 0x01: apic 5 int 16
> athn0: MAC AR5418 rev 2, RF AR5133 (2T3R), ROM rev 5, address 
> 00:1c:26:46:e4:8a
> 
> into it, but it fails with
> 
> athn0: could not wakeup chip
> athn0: unable to reset hardware; reset status 60
> 
> and cannot be configured. Does the error message
> indicate a hardware error? (The device is not new.)

(I can send this one and a working one
- please let me know off list.)

Jan

> OpenBSD 6.7-current (GENERIC.MP) #243: Fri Jun  5 09:25:07 MDT 2020
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 1996484608 (1903MB)
> avail mem = 1923252224 (1834MB)
> random: good seed from bootblocks
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.8 @ 0x7ee8d020 (13 entries)
> bios0: vendor coreboot version "v4.11.0.5" date 03/29/2020
> bios0: PC Engines apu2
> acpi0 at bios0: ACPI 4.0
> acpi0: sleep states S0 S1 S4 S5
> acpi0: tables DSDT FACP SSDT MCFG TPM2 APIC HEST SSDT SSDT HPET
> acpi0: wakeup devices PWRB(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4) PBR8(S4) 
> UOH1(S3) UOH2(S3) UOH3(S3) UOH4(S3) UOH5(S3) UOH6(S3) XHC0(S4)
> acpitimer0 at acpi0: 3579545 Hz, 32 bits
> acpimcfg0 at acpi0
> acpimcfg0: addr 0xf800, bus 0-64
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: AMD GX-412TC SOC, 998.28 MHz, 16-30-01
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
> 16-way L2 cache
> cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
> cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 99MHz
> cpu0: mwait min=64, max=64, IBE
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
> 16-way L2 cache
> cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
> cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 2 (application processor)
> cpu2: AMD GX-412TC SOC, 998.17 MHz, 16-30-01
> cpu2: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> cpu2: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
> 16-way L2 cache
> cpu2: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
> cpu2: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
> cpu2: smt 0, core 2, package 0
> cpu3 at mainbus0: apid 3 (application processor)
> cpu3: AMD GX-412TC SOC, 998.14 MHz, 16-30-01
> cpu3: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> cpu3: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
> 16-way L2 cache
> cpu3: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
> cpu3: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
> cpu3: smt 0, core 3, package 0
> ioapic0 at mainbus0: apid 4 pa 0xfec0, version 21, 24 pins
> ioapic1 at mainbus0: apid 5 pa 0xfec2, version 21, 32 pins
> acpihpet0 at acpi0: 14318180 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus -1 (PBR4)
> acpiprt2 at acpi0: bus 1 (PBR5)
> acpiprt3 at acpi0: bus 2 (PBR6)
> acpiprt4 at acpi0: bus 3 (PBR7)
> acpiprt5 at acpi0: bus 4 (PBR8)
> acpitz0 at acpi0: critical temperature is 115 degC
> "ACPI0007" at acpi0 not configured
> "ACPI0007" at acpi0 not configured
> "ACPI0007" at acpi0 no

athn0: could not wakeup chip

2020-06-06 Thread Jan Stary
This is current/amd64 on an APU@ (dmesg below). I put a

athn0 at pci4 dev 0 function 0 "Atheros AR5418" rev 0x01: apic 5 int 16
athn0: MAC AR5418 rev 2, RF AR5133 (2T3R), ROM rev 5, address 00:1c:26:46:e4:8a

into it, but it fails with

athn0: could not wakeup chip
athn0: unable to reset hardware; reset status 60

and cannot be configured. Does the error message
indicate a hardware error? (The device is not new.)

Jan


OpenBSD 6.7-current (GENERIC.MP) #243: Fri Jun  5 09:25:07 MDT 2020
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 1996484608 (1903MB)
avail mem = 1923252224 (1834MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0x7ee8d020 (13 entries)
bios0: vendor coreboot version "v4.11.0.5" date 03/29/2020
bios0: PC Engines apu2
acpi0 at bios0: ACPI 4.0
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP SSDT MCFG TPM2 APIC HEST SSDT SSDT HPET
acpi0: wakeup devices PWRB(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4) PBR8(S4) 
UOH1(S3) UOH2(S3) UOH3(S3) UOH4(S3) UOH5(S3) UOH6(S3) XHC0(S4)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimcfg0 at acpi0
acpimcfg0: addr 0xf800, bus 0-64
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD GX-412TC SOC, 998.28 MHz, 16-30-01
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
16-way L2 cache
cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: AMD GX-412TC SOC, 998.17 MHz, 16-30-01
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
cpu2: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
16-way L2 cache
cpu2: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu2: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: AMD GX-412TC SOC, 998.14 MHz, 16-30-01
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
cpu3: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
16-way L2 cache
cpu3: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu3: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 4 pa 0xfec0, version 21, 24 pins
ioapic1 at mainbus0: apid 5 pa 0xfec2, version 21, 32 pins
acpihpet0 at acpi0: 14318180 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PBR4)
acpiprt2 at acpi0: bus 1 (PBR5)
acpiprt3 at acpi0: bus 2 (PBR6)
acpiprt4 at acpi0: bus 3 (PBR7)
acpiprt5 at acpi0: bus 4 (PBR8)
acpitz0 at acpi0: critical temperature is 115 degC
"ACPI0007" at acpi0 not configured
"ACPI0007" at acpi0 not configured
"ACPI0007" at acpi0 not configured
"ACPI0007" at acpi0 not configured
"ACPI0007" at acpi0 not configured
"ACPI0007" at acpi0 not configured
"ACPI0007" at acpi0 not configured
"ACPI0007" at acpi0 not configured
acpibtn0 at acpi0: PWRB
acpipci0 at acpi0 PCI0: 0x 0x0011 0x0001
extent `acpipc

athn on APU2

2020-06-06 Thread Jan Stary
This is current/amd64 on an APU2 (dmesg below). It's my AP, using
athn0 at pci4 dev 0 function 0 "Atheros AR9281" rev 0x01: apic 5 int 16
athn0: AR9280 rev 2 (2T2R), ROM rev 11, address c0:d9:62:75:ee:26

athn0: flags=8843 mtu 1500
lladdr c0:d9:62:75:ee:26
index 4 priority 4 llprio 3
groups: wlan
media: IEEE802.11 autoselect mode 11g hostap
status: active
ieee80211: nwid stare.cz chan 1 bssid c0:d9:62:75:ee:26 -91dBm wpakey wp
aprotos wpa2 wpaakms psk wpaciphers ccmp wpagroupcipher ccmp
inet 192.168.33.1 netmask 0xff00 broadcast 192.168.33.255

It seems to work just fine, serving various laptops (obsd, macos, win),
androids an ipads. I have two questions:

Why is it detected as "Atheros AR9281" and then as AR9280?
I am asking because athn(4) distinguishes the two. The device
provably does both 2G and 5G, so it must be the 9280 ...
Is it just a vendor's string, possibly misleading?

None of the clients gets more than cca 1.5MB/s from that, alone.
Is that to be expected with 11g? (Not that I expect the 54 Mbit/s)

Jan


OpenBSD 6.7-current (GENERIC.MP) #0: Sat Jun  6 00:00:01 CEST 2020
h...@uvt.stare.cz:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 1996484608 (1903MB)
avail mem = 1923248128 (1834MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0x7ee8d020 (13 entries)
bios0: vendor coreboot version "v4.11.0.5" date 03/29/2020
bios0: PC Engines apu2
acpi0 at bios0: ACPI 4.0
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP SSDT MCFG TPM2 APIC HEST SSDT SSDT HPET
acpi0: wakeup devices PWRB(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4) PBR8(S4) 
UOH1(S3) UOH2(S3) UOH3(S3) UOH4(S3) UOH5(S3) UOH6(S3) XHC0(S4)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimcfg0 at acpi0
acpimcfg0: addr 0xf800, bus 0-64
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD GX-412TC SOC, 998.25 MHz, 16-30-01
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD GX-412TC SOC, 998.14 MHz, 16-30-01
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
16-way L2 cache
cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: AMD GX-412TC SOC, 998.14 MHz, 16-30-01
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
cpu2: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
16-way L2 cache
cpu2: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu2: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: AMD GX-412TC SOC, 998.19 MHz, 16-30-01
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
cpu3: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
16-way L2 cache
cpu3: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu3: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 4 pa 0xfec0, version 21, 24 pins
ioapic1 at mainbus0: apid 5 pa 0xfec2, ver

tmux border change in 6.7-current

2020-06-06 Thread Mischa

Hi All,

Not sure I am the only one and my config needs to change, but with tmux 
config I am using I seeing a difference in 6.7-stable and 6.7-current in 
the way the border is presented.


The config I am using is:
###
set -g  base-index 1
set -g  history-limit 1
set -g  mouse on
set -g  prefix C-a
set -g  renumber-windows on
set -g  status-interval 1
set -g  status-left ''
set -g  status-left-length 40
set -g  status-position bottom
set -g  status-right ' #(status)'
set -g  status-right-length 100
set -g  status-style fg=default,bg=black
set -g  visual-activity on
set -gs default-terminal xterm-256color
set -gs escape-time 0
set -gw alternate-screen off
set -gw automatic-rename on
set -gw mode-keys vi
set -gw monitor-activity on
set -gw pane-active-border-style fg=brightwhite
set -gw pane-base-index 1
set -gw pane-border-format ' #W '
set -gw pane-border-status bottom
set -gw window-status-activity-style fg=brightwhite
set -gw window-status-bell-style fg=brightcyan
set -gw window-status-current-format '#W'
set -gw window-status-current-style fg=yellow,bg=default,bright
set -gw window-status-format '#W'
set -gw window-status-separator '  '
set -gw window-status-style fg=default,bg=default
unbind C-b
unbind r
unbind l
bind a send-prefix
bind r source-file ~/.tmux.conf \; display ' Reloaded!'
bind C-a last-window
bind -T copy-mode-vi 'v' send -X begin-selection
bind -T copy-mode-vi 'p' send -X copy-pipe-and-cancel 'xclip -selection 
primary -i'
bind -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -selection 
clipboard -i'

###

Yes I was a screen user before. :))

The bottom border in simple mode now has ++ at the beginning and the end 
of the line.

In "normal" mode these are presented in utf-8 (?) characters.
See attached screenshots.

For the ones who aren't able to view them in their mail client, I have 
added them to my website. https://high5.nl/tmux/


Is this something that I can fix in my config?

Thanx!

Mischa


Re: [smartmontools] OpenBSD testers required

2020-06-06 Thread Jurjen Oskam
On Fri, Jun 05, 2020 at 10:52:38AM +0200, Marek Benc wrote:

> There's been some changes in the OpenBSD port of smartmontools,
> tools for working with S.M.A.R.T diagnostic of hard drives and SSDs,
> the platform-specific code was modernized, so it would be quite useful
> if people could test these changes out to make sure they work on all
> systems, I tested them on a macppc system with an ATA drive.
> 
> The developer doesn't currently have access to a physical system
> with OpenBSD running on it, so they wrote the changes in a virtual
> machine.
> 
> You can find the changes here:
> https://github.com/smartmontools/smartmontools/pull/56
> 

Seems to work fine here:

calvin$ uname -a
OpenBSD calvin.int.osk.am 6.7 GENERIC.MP#2 amd64
calvin$ sysctl hw | egrep '(model|vendor|product|version)'
hw.model=Intel(R) Pentium(R) CPU G3450 @ 3.40GHz
hw.vendor=Shuttle Inc.
hw.product=DS81L
hw.version=V1.0
calvin$ doas ./smartctl -a -d ata /dev/rsd0c
smartctl 7.2 (build date Jun  6 2020) [OpenBSD 6.7 amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Samsung based SSDs
Device Model: Samsung SSD 840 EVO 120GB
Serial Number:S1D5NSBDB26732X
LU WWN Device Id: 5 002538 8a00f2d01
Firmware Version: EXT0DB6Q
User Capacity:120,034,123,776 bytes [120 GB]
Sector Size:  512 bytes logical/physical
Rotation Rate:Solid State Device
TRIM Command: Available
Device is:In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4c
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:Sat Jun  6 10:41:51 2020 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status:  (   0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection:( 4200) seconds.
Offline data collection
capabilities:(0x53) SMART execute Offline immediate.
Auto Offline data collection on/off 
support.
Suspend Offline collection upon new
command.
No Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities:(0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability:(0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time:(   2) minutes.
Extended self-test routine
recommended polling time:(  70) minutes.
SCT capabilities:  (0x003d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME  FLAG VALUE WORST THRESH TYPE  UPDATED  
WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   100   100   010Pre-fail  Always   
-   0
  9 Power_On_Hours  0x0032   087   087   000Old_age   Always   
-   64013
 12 Power_Cycle_Count   0x0032   099   099   000Old_age   Always   
-   545
177 Wear_Leveling_Count 0x0013   098   098   000Pre-fail  Always   
-   24
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   100   100   010Pre-fail  Always   
-   0
181 Program_Fail_Cnt_Total  0x0032   100   100   010Old_age   Always   
-   0
182 Erase_Fail_Count_Total  0x0032   100   100   010Old_age   Always   
-   0
183 Runtime_Bad_Block   0x0013   100   100   010Pre-fail  Always   
-   0
187 Uncorrectable_Error_Cnt 0x0032   100   100   000Old_age   Always   
-   0
190 Airflow_Temperature_Cel 0x0032   067   053   000Old_age   Always   
-   33
195 ECC_Error_Rate  0x001a   200   200   000Old_age   Always   
-   0
199 CRC_Error_Count