how to find reason for computer pausing often?

2018-08-07 Thread Derek Sivers
This past month or so, my Lenovo T440s laptop has started doing strange 
2-second pauses at random intervals, sometimes a few times per minute.

How would you look for the source of this trouble?  There's nothing in /var/log 
showing when it happens.  No log entries added there.  Where else would you 
look?

The easiest way to spot it in action is with a simple ls :

cd /tmp
mkdir a b c
time ls a
0m00.00s real 0m00.00s user 0m00.01s system
time ls b
0m03.22s real 0m00.00s user 0m00.01s system  # there is the random 
pause
time ls c
0m00.00s real 0m00.00s user 0m00.00s system
time ls b
0m00.00s real 0m00.00s user 0m00.00s system

I've tried it running OpenBSD 6.3 RELEASE, STABLE, and CURRENT.  Happens with 
all.

I wiped the entire drive (dd if=/dev/zero) then re-installed from scratch, and 
it still happens.

It happens whether running X or just in the initial raw console without startx.

I know it isn't an OpenBSD problem, but any suggestions where you'd look if it 
was you?

Thank you.

- Derek



Re: IPQoS values in sshd

2018-08-07 Thread Darren Tucker
On 8 August 2018 at 05:29, Mik J  wrote:
> Does anyone knows what means lowdelay and thoughput for IPQoS parameter ?
> To what DSCP correspond these words

>From https://www.openssh.com/specs.html, which documents the most
recent release: they're the values specified in RFC1349, the first of
the dozen or so attempts to specify the meaning of those few bits
(RFCs 2474, 2597, 2598, 3168, 3246, 3260, 3662, 4301, 4594, 5865 and
8325).

> I did a capture when writing ls in my terminal and I see DSCP=cs0.
> I would have expected something else.

The default values have been changed in -current but that change has
not yet made it to a release.  From
https://man.openbsd.org/ssh_config.5: "The default is af21
(Low-Latency Data) for interactive sessions and cs1 (Lower Effort) for
non-interactive sessions."

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



Re: What is the proper way to release a DHCP lease

2018-08-07 Thread Jay Hart



>
> On Aug 7, 2018 5:57 PM, Jay Hart  wrote:
>>
>> Hello all,
>>
>> About ready to put a new box online, but need to "release" the MAC / IP 
>> address [of the old box]
>> if I can prior to swapping out the boxes.  This might save me a call to 
>> Verizon.
>>
>> I tried "dhcp release", but the OS returned a "command not found" error, 
>> essentially.
>>
>> What is the proper way to get this done?  I'm drawing a blank with my 
>> google fu tonight.
>>
>> Thanks,
>>
>> Jay
>>
>
> dhclient -r 'interface'

Edgar,

Thank You, I missed that somehow while searching.

Jay



Re: What is the proper way to release a DHCP lease

2018-08-07 Thread edgar


On Aug 7, 2018 5:57 PM, Jay Hart  wrote:
>
> Hello all,
>
> About ready to put a new box online, but need to "release" the MAC / IP 
> address [of the old box]
> if I can prior to swapping out the boxes.  This might save me a call to 
> Verizon.
>
> I tried "dhcp release", but the OS returned a "command not found" error, 
> essentially.
>
> What is the proper way to get this done?  I'm drawing a blank with my google 
> fu tonight.
>
> Thanks,
>
> Jay
>

dhclient -r 'interface'



What is the proper way to release a DHCP lease

2018-08-07 Thread Jay Hart
Hello all,

About ready to put a new box online, but need to "release" the MAC / IP address 
[of the old box]
if I can prior to swapping out the boxes.  This might save me a call to Verizon.

I tried "dhcp release", but the OS returned a "command not found" error, 
essentially.

What is the proper way to get this done?  I'm drawing a blank with my google fu 
tonight.

Thanks,

Jay



Re: "no route to host" from pkg_add

2018-08-07 Thread Edgar Pettijohn III




On 08/07/18 13:18, traveller wrote:

After OpenBSD, one too many “/“


I concur.

cat /etc/installurl

https://fastly.cdn.openbsd.org/pub/OpenBSD

You probably did the ole copy/paste from somewhere and got a trailing '/'.

On Aug 7, 2018, 11:16 AM -0700, Benjamin Walkenhorst 
, wrote:

Hello everyone,

I recently installed OpenBSD 6.3 in a VPS.

In the last few days, I get an error message when running pkg_add, "no route to 
host".
I have tried setting various hosts in /etc/installurl, but the problem remains.

When I run pkg_add, this is the output I get I get:
[20:02|root@myhost:~]# pkg_add nmap
https://fastly.cdn.openbsd.org/pub/OpenBSD//6.3/packages-stable/amd64/: ftp: 
connect: No route to host
https://fastly.cdn.openbsd.org/pub/OpenBSD//6.3/packages/amd64/: ftp: connect: 
No route to host
https://fastly.cdn.openbsd.org/pub/OpenBSD//6.3/packages/amd64/: empty
Can't find nmap

When I try to ping the host specified in /etc/installurl or call traceroute, 
everything seems to work as expected.

I checked the output of /usr/bin/env to make sure there is no proxy configured
(I copied that .zshrc around quite a bit), but as far as I can tell, there are 
no proxies set up anywhere in
the environment (i.e. the output of "env | grep -i proxy" is empty).

I have two systems (one laptop and one VM) running OpenBSD 6.3 on my home 
network, and they work fine, so I
am fairly certain the problem is with the configuration of the VPS.

What am I missing?

Thank you very much for any suggestions,
Benjamin




perlish question

2018-08-07 Thread Edgar Pettijohn III
I am attempting to create and verify password hashes from within perl. 
The easiest way I saw was to use Inline::C like this:


#!/usr/bin/env perl

use Inline C;

my $pass = 'password';
my $hash = qx(encrypt password);

chomp $hash; #get rid of pesky newline
$hash =~ s/(\$)/\\$1/gx; #replace $ with \$

my $newhash = 
"\$2b\$10\$.m5VMGgV842QHnJXoob02.Kgo/ENfwRcmOgJb5h.Q.XfPxcjWyAfa";


print "hash is : $hash" . "\n";
print checkpass($pass, $hash) . "\n";
print "\n";
print "hash is : $newhash" . "\n";
print checkpass($pass, $newhash) . "\n";
print "\n";

__END__
__C__

int checkpass(const char *p, const char *h) {
    printf("%s: %s\n", p, h);
    return (crypt_checkpass(p, h));
}

However, the $newhash returns 0 (or good) and the $hash returns -1 (or bad).

hash is : \$2b\$10h\$9aBUQlB4hTXgt8Pao8frn.5EXiGzvJng5CpPK4uwRmQfNu2qYFEAi
password: \$2b\$10\$9aBUQlB4hTXgt8Pao8frn.5EXiGzvJng5CpPK4uwRmQfNu2qYFEAi
-1

hash is : $2b$10$.m5VMGgV842QHnJXoob02.Kgo/ENfwRcmOgJb5h.Q.XfPxcjWyAfa
password: $2b$10$.m5VMGgV842QHnJXoob02.Kgo/ENfwRcmOgJb5h.Q.XfPxcjWyAfa
0

I'm thinking most likely I would be reading the hash from a file or some 
such thing and then using the method for the $hash above, but that 
doesn't appear to work. I may break down and ask in more appropriate 
perl question locations, but since its an OBSD function I figured I'd 
ask here first, so I don't have to explain its a proper function, etc, 
etc... Any thoughts?


Thanks,

Edgar



BackUp with Cdrecord

2018-08-07 Thread Freddy Fisker

Hi

When I try to make a backup with Cdrecord more than once with the following 
commands there is coming this messages:


openbsd1$ mkisofs -r -quiet -print-size /home/ff/div
9203690
openbsd1$ su
Password:
openbsd1# mkisofs -r /home/ff/div | cdrecord -v -sao -data \

fs=16*2048*2048 dev=/dev/rcd0c tsize=9203690s -
Cdrecord-ProDVD-ProBD-Clone 3.00 (amd64-unknown-openbsd6.3) Copyright (C) 
1995-2010 J�rg Schilling

TOC Type: 1 = CD-ROM
cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Cannot allocate memory. Cannot get mmap for 67112960 Bytes on 
/dev/zero.


The FIFO of fs=16*2048*2048 is to make the writing faster, but there is no 
difference with the problem. I have also been using the default FIFO of 4M.



I need to reboot the computer to make a new backup.

The dmesg list is attached.

Best regards
Freddy
OpenBSD 6.3 (GENERIC.MP) #107: Sat Mar 24 14:21:59 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 7970263040 (7601MB)
avail mem = 7721644032 (7363MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xebe60 (16 entries)
bios0: vendor American Megatrends Inc. version "P1.10" date 05/06/2015
bios0: ASRock QC5000M-ITX/PH
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT MCFG HPET AAFT SSDT SSDT CRAT SSDT SSDT SSDT 
SSDT
acpi0: wakeup devices GFX_(S4) GPP1(S4) GPP2(S4) GPP3(S4) SBAZ(S4) PS2K(S4) 
PS2M(S4) UAR1(S4) OHC1(S4) EHC1(S4) OHC2(S4) EHC2(S4) OHC3(S4) EHC3(S4) XHC0(S4)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD A4-5050 APU with Radeon(TM) HD Graphics, 1547.31 MHz
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,PCTRL3,ITSC,BMI1
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
acpitimer0: recalibrated TSC frequency 1547104472 Hz
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 A4-5050 APU with Radeon(TM) HD Graphics, 1547.11 MHz
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,PCTRL3,ITSC,BMI1
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 A4-5050 APU with Radeon(TM) HD Graphics, 1547.10 MHz
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,PCTRL3,ITSC,BMI1
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 A4-5050 APU with Radeon(TM) HD Graphics, 1547.10 MHz
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,PCTRL3,ITSC,BMI1
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 5 pa 0xfec0, version 21, 24 pins
ioapic1 at mainbus0: apid 6 pa 0xfec01000, version 21, 32 pins
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpihpet0 at acpi0: 14318180 Hz
acpihpet0: recalibrated TSC frequency 1547097459 Hz
acpiprt0 at acpi0: 

Re: "no route to host" from pkg_add

2018-08-07 Thread traveller
After OpenBSD, one too many “/“
On Aug 7, 2018, 11:16 AM -0700, Benjamin Walkenhorst 
, wrote:
> Hello everyone,
>
> I recently installed OpenBSD 6.3 in a VPS.
>
> In the last few days, I get an error message when running pkg_add, "no route 
> to host".
> I have tried setting various hosts in /etc/installurl, but the problem 
> remains.
>
> When I run pkg_add, this is the output I get I get:
> [20:02|root@myhost:~]# pkg_add nmap
> https://fastly.cdn.openbsd.org/pub/OpenBSD//6.3/packages-stable/amd64/: ftp: 
> connect: No route to host
> https://fastly.cdn.openbsd.org/pub/OpenBSD//6.3/packages/amd64/: ftp: 
> connect: No route to host
> https://fastly.cdn.openbsd.org/pub/OpenBSD//6.3/packages/amd64/: empty
> Can't find nmap
>
> When I try to ping the host specified in /etc/installurl or call traceroute, 
> everything seems to work as expected.
>
> I checked the output of /usr/bin/env to make sure there is no proxy configured
> (I copied that .zshrc around quite a bit), but as far as I can tell, there 
> are no proxies set up anywhere in
> the environment (i.e. the output of "env | grep -i proxy" is empty).
>
> I have two systems (one laptop and one VM) running OpenBSD 6.3 on my home 
> network, and they work fine, so I
> am fairly certain the problem is with the configuration of the VPS.
>
> What am I missing?
>
> Thank you very much for any suggestions,
> Benjamin


IPQoS values in sshd

2018-08-07 Thread Mik J
Hello,

Does anyone knows what means lowdelay and thoughput for IPQoS parameter ?
To what DSCP correspond these words

I did a capture when writing ls in my terminal and I see DSCP=cs0.
I would have expected something else.

Regards


Re: "no route to host" from pkg_add

2018-08-07 Thread Vadim Zhukov
вт, 7 авг. 2018 г., 21:16 Benjamin Walkenhorst <
walkenhorst.benja...@gmail.com>:

> Hello everyone,
>
> I recently installed OpenBSD 6.3 in a VPS.
>
> In the last few days, I get an error message when running pkg_add, "no
> route to host".
> I have tried setting various hosts in /etc/installurl, but the problem
> remains.
>
> When I run pkg_add, this is the output I get I get:
> [20:02|root@myhost:~]# pkg_add nmap
> https://fastly.cdn.openbsd.org/pub/OpenBSD//6.3/packages-stable/amd64/:
> ftp: connect: No route to host
> https://fastly.cdn.openbsd.org/pub/OpenBSD//6.3/packages/amd64/: ftp:
> connect: No route to host
> https://fastly.cdn.openbsd.org/pub/OpenBSD//6.3/packages/amd64/: empty
> Can't find nmap
>
> When I try to ping the host specified in /etc/installurl or call
> traceroute, everything seems to work as expected.
>
> I checked the output of /usr/bin/env to make sure there is no proxy
> configured
> (I copied that .zshrc around quite a bit), but as far as I can tell,
> there are no proxies set up anywhere in
>  the environment (i.e. the output of "env | grep -i proxy" is empty).
>
> I have two systems (one laptop and one VM) running OpenBSD 6.3 on my home
> network, and they work fine, so I
> am fairly certain the problem is with the configuration of the VPS.
>
> What am I missing?
>
> Thank you very much for any suggestions,
> Benjamin
>

Most likely, you didn't allow outgoing connections for _pkgfetch user in
pf.conf.


"no route to host" from pkg_add

2018-08-07 Thread Benjamin Walkenhorst
Hello everyone,

I recently installed OpenBSD 6.3 in a VPS. 

In the last few days, I get an error message when running pkg_add, "no route to 
host".
I have tried setting various hosts in /etc/installurl, but the problem remains.

When I run pkg_add, this is the output I get I get:
[20:02|root@myhost:~]# pkg_add nmap
https://fastly.cdn.openbsd.org/pub/OpenBSD//6.3/packages-stable/amd64/: ftp: 
connect: No route to host
https://fastly.cdn.openbsd.org/pub/OpenBSD//6.3/packages/amd64/: ftp: connect: 
No route to host
https://fastly.cdn.openbsd.org/pub/OpenBSD//6.3/packages/amd64/: empty
Can't find nmap

When I try to ping the host specified in /etc/installurl or call traceroute, 
everything seems to work as expected. 

I checked the output of /usr/bin/env to make sure there is no proxy configured
(I copied that .zshrc around quite a bit), but as far as I can tell, there 
are no proxies set up anywhere in
 the environment (i.e. the output of "env | grep -i proxy" is empty).

I have two systems (one laptop and one VM) running OpenBSD 6.3 on my home 
network, and they work fine, so I 
am fairly certain the problem is with the configuration of the VPS.

What am I missing? 

Thank you very much for any suggestions,
Benjamin




Re: Create >100 ttyU* by ./MAKEDEV ttyU* command

2018-08-07 Thread Theo de Raadt
Denis  wrote:

> Is it possible to make more ttys by ./MAKEDEV ttyU* command to have:
> ttyU0a-ttyUzz?

Up to 127 such devices because of how the node's minor is split.



Re: NSA encryption algorithms in Linux kernel, OpenBSD too?

2018-08-07 Thread Bryan Harris





> On Aug 7, 2018, at 7:15 AM, Kevin Chadwick  wrote:
> 
> On Mon, 6 Aug 2018 15:52:11 -0500

> It may be more likely that some zealous chrome devs
> decided https everywhere was utterly important and so misleading
> messages were the order of the day.

For some reason I thought https everywhere was a government initiative. Or 
perhaps they just followed the trend.

Bryan



Create >100 ttyU* by ./MAKEDEV ttyU* command

2018-08-07 Thread Denis
Hi,

Is it possible to make more ttys by ./MAKEDEV ttyU* command to have:
ttyU0a-ttyUzz?



Re: NSA encryption algorithms in Linux kernel, OpenBSD too?

2018-08-07 Thread Kevin Chadwick
On Mon, 6 Aug 2018 15:52:11 -0500


> I imagine the answer is this is not implemented or going to be but
> saw this article and figured I would ask.
> 
> Seems suspect to not release all details, and have it rejected by ISO 
> but yet still being put in both the kernel and Android OS.
> 
> https://itsfoss.com/nsas-encryption-algorithm-in-linux-kernel-is-creating-unease-in-the-community/

I wouldn't be too concerned in any case. It is not like OpenBSD devs are
likely to switch out AES-NI support from the filesystem encryption.

Rarely is well implemented encryption the weak spot. Considering the
Nistp allegations have been largely discredited and AES and SHA256 hw
even is abound on modern hardware, I doubt they focus on encryption
itself!

If you want to talk conspiracies then Google Chromes blunder of calling
sites SECURE becoming a repeated blunder of NOT SECURE, when they
already had a better implementation of flashing the bar red during data
entry? https sites that provide http unsigned downloads are quite
frequent too!

It is interesting that Google apparently say AES is expensive here yet
where an attacker may saturate your website, https is apparently faster
than http. (RTT potential, ignoring the negative sides in literature
and youtube completely).

I guess it is possible that https deployment may mean Google cloud makes
money in CPU cycles from CHACHA or competitors energy costs go up
(older non AES-NI). Or VPN usage declines, so Google can target ads to
IP location. It may be more likely that some zealous chrome devs
decided https everywhere was utterly important and so misleading
messages were the order of the day.