Buying a New Laptop

2021-01-09 Thread Coppock, Patrick H
Hi,

I'm thinking about getting a new laptop, and I want to get something with good 
OpenBSD support. I know ThinkPads have had good support historically, and I'm 
wondering if that holds for recent machines. In particular, I've been eyeing 
the L13. Does anyone have a similar machine running OpenBSD that could comment 
on the hardware support?

Thanks,
Patrick



Buying a New Laptop

2021-01-09 Thread Coppock, Patrick H
Hi,

I'm thinking about getting a new laptop, and I want to get something with good 
OpenBSD support. I know ThinkPads have had good support historically, and I'm 
wondering if that holds for recent machines. In particular, I've been eyeing 
the L13. Does anyone have a similar machine running OpenBSD that could comment 
on the hardware support?

Thanks,
Patrick



really pleased with openbsd68/rpi4 8GB installation/performance

2021-01-09 Thread tech-lists

Thank you to everyone who helped make openbsd work on the rpi4.

Although I won't be needing xorg/x11 on this particular machine, I tried
installing it anyway out of curiosity and was surprised how easy it was 
to get it all working. I thought firefox might bog it down but no. Very smooth.

Installation was painless once I followed the instructions exactly.

thanks,
--
J.



Re: Suggestion for small improvement in acme-client.conf.5

2021-01-09 Thread Wolf
Hello,

On 2021-01-09 22:20:26 +, Stuart Henderson wrote:
> On 2021-01-09, Wolf  wrote:
> > I have small suggestion for improving man page for acme-client.conf.5.
> > Basically just adding "comma separated" to clarify on the format of the
> > list for alternative names. I had to dig into the parser.y to figure
> > this out, so it would be nice to have it documented.
> 
> Thanks, but commas are optional, whitespace is fine here too,
> so I don't think this change makes sense directly.

Oh, now I see it. I didn't check far enough through the grammar, I saw
token `comma' and assumed it is, well a comma. You are right, comma can
also be nothing.

Sorry for not checking properly in the first place.

Have a nice day,

W.

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.


signature.asc
Description: PGP signature


Re: Suggestion for small improvement in acme-client.conf.5

2021-01-09 Thread Stuart Henderson
On 2021-01-09, Wolf  wrote:
> I have small suggestion for improving man page for acme-client.conf.5.
> Basically just adding "comma separated" to clarify on the format of the
> list for alternative names. I had to dig into the parser.y to figure
> this out, so it would be nice to have it documented.

Thanks, but commas are optional, whitespace is fine here too,
so I don't think this change makes sense directly.

> diff --git a/acme-client.conf.5 b/acme-client.conf.5
> index 7971fb6..a47a8e2 100644
> --- a/acme-client.conf.5
> +++ b/acme-client.conf.5
> @@ -125,9 +125,9 @@ If not specified, the
>  .Ar handle
>  of the domain block will be used as common name.
>  .It Ic alternative names Brq ...
> -Specify a list of alternative names for which the certificate will be valid.
> -The common name is included automatically if this option is present,
> -but there is no automatic conversion/inclusion between "www." and
> +Specify a comma separated list of alternative names for which the certificate
> +will be valid. The common name is included automatically if this option is

btw, please use a new line for a new sentence in manpages.

> +present, but there is no automatic conversion/inclusion between "www." and
>  plain domain name forms.
>  .It Ic domain key Ar file Op Ar keytype
>  The private key file for which the certificate will be obtained.
>
>
> Have a nice day,
> W.
>



Suggestion for small improvement in acme-client.conf.5

2021-01-09 Thread Wolf
Hello,

I have small suggestion for improving man page for acme-client.conf.5.
Basically just adding "comma separated" to clarify on the format of the
list for alternative names. I had to dig into the parser.y to figure
this out, so it would be nice to have it documented.

diff --git a/acme-client.conf.5 b/acme-client.conf.5
index 7971fb6..a47a8e2 100644
--- a/acme-client.conf.5
+++ b/acme-client.conf.5
@@ -125,9 +125,9 @@ If not specified, the
 .Ar handle
 of the domain block will be used as common name.
 .It Ic alternative names Brq ...
-Specify a list of alternative names for which the certificate will be valid.
-The common name is included automatically if this option is present,
-but there is no automatic conversion/inclusion between "www." and
+Specify a comma separated list of alternative names for which the certificate
+will be valid. The common name is included automatically if this option is
+present, but there is no automatic conversion/inclusion between "www." and
 plain domain name forms.
 .It Ic domain key Ar file Op Ar keytype
 The private key file for which the certificate will be obtained.


Have a nice day,
W.

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.


signature.asc
Description: PGP signature


Re: cmp(1) '-s' flag ignoring byte offset argument?

2021-01-09 Thread Otto Moerbeek
On Sat, Jan 09, 2021 at 12:05:31AM -0800, William Ahern wrote:

> On Fri, Jan 08, 2021 at 07:09:01PM -0800, Jordan Geoghegan wrote:
> > Hey folks,
> > 
> > I've noticed some surprising behaviour from cmp(1) when using the '-s'
> > flag.
> > 
> > It appears that cmp -s is ignoring the byte offset arguments I'm giving
> > it.
> 
> > Not sure what to make of this, I noticed this same behaviour on
> > DragonflyBSD and FreeBSD, so maybe I'm just missing something obvious.
> > This certainly caused some frustration before I figured out what was going
> > on.
> 
> The bug seems to be in the short-circuit optimization for regular files[1]:
> 
> void
>   c_regular(int fd1, char *file1, off_t skip1, off_t len1,
>   int fd2, char *file2, off_t skip2, off_t len2)
>   {
>   u_char ch, *p1, *p2;
>   off_t byte, length, line;
>   int dfound;
>   
>   if (sflag && len1 != len2)
>   exit(1);
>   
>   if (skip1 > len1)
>   eofmsg(file1);
>   len1 -= skip1;
>   if (skip2 > len2)
>   eofmsg(file2);
>   len2 -= skip2;
> 
> The short-circuit should probably be moved below the subsequent chunk of
> code (i.e. below `len2 -= skip2`). The eofmsg function already obeys sflag,
> so it'll be quiet.[2] Doing this works for me. See patch at end of message.
> 
> Interestingly, DragonflyBSD and FreeBSD already do it this way[3][4], yet I
> can confirm FreeBSD still has the problem. (DragonflyBSD has nearly
> identical code.) But that implementation duplicates the short-circuit, along
> with the bug of not accounting for skip1 and skip2, in cmp.c as part of
> implementing the -z flag[5]:
> 
>   if (special)
>   c_special(fd1, file1, skip1, fd2, file2, skip2);
>   else {
>   if (zflag && sb1.st_size != sb2.st_size) {
>   if (!sflag)
>   (void) printf("%s %s differ: size\n",
>   file1, file2);
>   exit(DIFF_EXIT);
>   }
>   c_regular(fd1, file1, skip1, sb1.st_size,
>   fd2, file2, skip2, sb2.st_size);
>   }
>   exit(0);
> 
> It appears that the June 20, 2000 fix to the short-circuit in regular.c
> wasn't recognized during the July 14, 2000 -z feature addition.[6][7]
> 
> [1] https://cvsweb.openbsd.org/src/usr.bin/cmp/regular.c?rev=1.12
> [2] https://cvsweb.openbsd.org/src/usr.bin/cmp/misc.c?rev=1.7
> [3] 
> https://gitweb.dragonflybsd.org/dragonfly.git/blob/4d4f84f:/usr.bin/cmp/regular.c
> [4] https://svnweb.freebsd.org/base/head/usr.bin/cmp/regular.c?revision=344551
> [5] 
> https://svnweb.freebsd.org/base/head/usr.bin/cmp/cmp.c?revision=344551&view=markup#l193
> [6] 
> https://svnweb.freebsd.org/base/head/usr.bin/cmp/regular.c?revision=61883&view=markup
> [7] 
> https://svnweb.freebsd.org/base/head/usr.bin/cmp/cmp.c?view=markup&pathrev=63157
> 
> --- regular.c 6 Feb 2015 23:21:59 -   1.12
> +++ regular.c 9 Jan 2021 07:51:13 -
> @@ -51,15 +51,15 @@ c_regular(int fd1, char *file1, off_t sk
>   off_t byte, length, line;
>   int dfound;
>  
> - if (sflag && len1 != len2)
> - exit(1);
> -
>   if (skip1 > len1)
>   eofmsg(file1);
>   len1 -= skip1;
>   if (skip2 > len2)
>   eofmsg(file2);
>   len2 -= skip2;
> +
> + if (sflag && len1 != len2)
> + exit(1);
>  
>   length = MINIMUM(len1, len2);
>   if (length > SIZE_MAX) {
> 

I came to the same diff independently. In the meantime it has been committed.

-Otto



Re: cmp(1) '-s' flag ignoring byte offset argument?

2021-01-09 Thread William Ahern
On Sat, Jan 09, 2021 at 12:05:31AM -0800, William Ahern wrote:

> Interestingly, DragonflyBSD and FreeBSD already do it this way[3][4], yet I
> can confirm FreeBSD still has the problem. (DragonflyBSD has nearly
> identical code.) But that implementation duplicates the short-circuit, along
> with the bug of not accounting for skip1 and skip2, in cmp.c as part of
> implementing the -z flag[5]:
> 
>   if (special)
>   c_special(fd1, file1, skip1, fd2, file2, skip2);
>   else {
>   if (zflag && sb1.st_size != sb2.st_size) {
>   if (!sflag)
>   (void) printf("%s %s differ: size\n",
>   file1, file2);
>   exit(DIFF_EXIT);
>   }
>   c_regular(fd1, file1, skip1, sb1.st_size,
>   fd2, file2, skip2, sb2.st_size);
>   }
>   exit(0);
> 
> It appears that the June 20, 2000 fix to the short-circuit in regular.c
> wasn't recognized during the July 14, 2000 -z feature addition.[6][7]

Note that zflag is set with sflag earlier in FreeBSD's regular.c:

case 's':   /* silent run */
sflag = 1;
zflag = 1;
break;



Re: cmp(1) '-s' flag ignoring byte offset argument?

2021-01-09 Thread William Ahern
On Fri, Jan 08, 2021 at 07:09:01PM -0800, Jordan Geoghegan wrote:
> Hey folks,
> 
> I've noticed some surprising behaviour from cmp(1) when using the '-s'
> flag.
> 
> It appears that cmp -s is ignoring the byte offset arguments I'm giving
> it.

> Not sure what to make of this, I noticed this same behaviour on
> DragonflyBSD and FreeBSD, so maybe I'm just missing something obvious.
> This certainly caused some frustration before I figured out what was going
> on.

The bug seems to be in the short-circuit optimization for regular files[1]:

void
  c_regular(int fd1, char *file1, off_t skip1, off_t len1,
  int fd2, char *file2, off_t skip2, off_t len2)
  {
u_char ch, *p1, *p2;
off_t byte, length, line;
int dfound;
  
if (sflag && len1 != len2)
exit(1);
  
if (skip1 > len1)
eofmsg(file1);
len1 -= skip1;
if (skip2 > len2)
eofmsg(file2);
len2 -= skip2;

The short-circuit should probably be moved below the subsequent chunk of
code (i.e. below `len2 -= skip2`). The eofmsg function already obeys sflag,
so it'll be quiet.[2] Doing this works for me. See patch at end of message.

Interestingly, DragonflyBSD and FreeBSD already do it this way[3][4], yet I
can confirm FreeBSD still has the problem. (DragonflyBSD has nearly
identical code.) But that implementation duplicates the short-circuit, along
with the bug of not accounting for skip1 and skip2, in cmp.c as part of
implementing the -z flag[5]:

if (special)
c_special(fd1, file1, skip1, fd2, file2, skip2);
else {
if (zflag && sb1.st_size != sb2.st_size) {
if (!sflag)
(void) printf("%s %s differ: size\n",
file1, file2);
exit(DIFF_EXIT);
}
c_regular(fd1, file1, skip1, sb1.st_size,
fd2, file2, skip2, sb2.st_size);
}
exit(0);

It appears that the June 20, 2000 fix to the short-circuit in regular.c
wasn't recognized during the July 14, 2000 -z feature addition.[6][7]

[1] https://cvsweb.openbsd.org/src/usr.bin/cmp/regular.c?rev=1.12
[2] https://cvsweb.openbsd.org/src/usr.bin/cmp/misc.c?rev=1.7
[3] 
https://gitweb.dragonflybsd.org/dragonfly.git/blob/4d4f84f:/usr.bin/cmp/regular.c
[4] https://svnweb.freebsd.org/base/head/usr.bin/cmp/regular.c?revision=344551
[5] 
https://svnweb.freebsd.org/base/head/usr.bin/cmp/cmp.c?revision=344551&view=markup#l193
[6] 
https://svnweb.freebsd.org/base/head/usr.bin/cmp/regular.c?revision=61883&view=markup
[7] 
https://svnweb.freebsd.org/base/head/usr.bin/cmp/cmp.c?view=markup&pathrev=63157

--- regular.c   6 Feb 2015 23:21:59 -   1.12
+++ regular.c   9 Jan 2021 07:51:13 -
@@ -51,15 +51,15 @@ c_regular(int fd1, char *file1, off_t sk
off_t byte, length, line;
int dfound;
 
-   if (sflag && len1 != len2)
-   exit(1);
-
if (skip1 > len1)
eofmsg(file1);
len1 -= skip1;
if (skip2 > len2)
eofmsg(file2);
len2 -= skip2;
+
+   if (sflag && len1 != len2)
+   exit(1);
 
length = MINIMUM(len1, len2);
if (length > SIZE_MAX) {