Re: unable to boot new 6.2 install

2018-02-15 Thread Mike Larkin
On Fri, Feb 16, 2018 at 03:17:28AM +, niya wrote:
> hi
> 
> i have installed openbsd 6.2 on a lenovo thinkcentre i5 desktop computer,
> 
> the installation completes fine afaics.
> 
> i reboot, the dmesg report scrolls up then the screen goes blank,
> 
> i can't tell if dmesg completes or stops half way through,
> 
> after which the machine doesn't respond to keyboard or mouse.
> 
> the following dmesg i retrieved dropping to a shell when booting from the
> installation usb stick
> 
> i have also booted the machine with a live linux mint which works fine.
> 
> what could be causing the problem or what else can i do to retrieve any
> meaningful diagnostics to forward to the list ?
> 
> ---
> 

a couple ideas:

1. try amd64. was there a specific reason you wanted to use i386 on this
relatively recent hardware?

2. if the screen goes black during autoconf, try disabling inteldrm to
see if any traces/stack dumps are printed. You can do this from the
boot> prompt by booting "bsd -c" or just "-c" and then "disable inteldrm"
when at the config prompt. "quit" after that to continue the boot.

-ml


> 
> OpenBSD 6.2 (RAMDISK_CD) #165: Tue Oct  3 20:05:31 MDT 2017
> dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/RAMDISK_CD
> cpu0: Intel(R) Core(TM) i5-4440S CPU @ 2.80GHz ("GenuineIntel" 686-class)
> 2.90 GHz
> cpu0: 
> FPU,V86,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,NXE,PAGE1GB,LONG,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
> real mem  = 3568664576 (3403MB)
> avail mem = 3491119104 (3329MB)
> mainbus0 at root
> bios0 at mainbus0: date 04/13/12, SMBIOS rev. 2.8 @ 0xebe90 (31 entries)
> bios0: vendor LENOVO version "FCKT46AUS" date 12/16/2013
> bios0: LENOVO 10AW008FUK
> acpi0 at bios0: rev 2
> acpi0: tables DSDT FACP APIC FPDT LPIT SLIC MSDM SSDT SSDT MCFG HPET SSDT
> SSDT BGRT
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: apic clock running at 99MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4, IBE
> cpu at mainbus0: not configured
> cpu at mainbus0: not configured
> cpu at mainbus0: not configured
> ioapic0 at mainbus0: apid 8 pa 0xfec0, version 20, 24 pins
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus 1 (RP01)
> acpiprt2 at acpi0: bus 2 (RP06)
> acpiprt3 at acpi0: bus -1 (PEG0)
> acpiprt4 at acpi0: bus -1 (PEG1)
> acpiprt5 at acpi0: bus -1 (PEG2)
> acpiec0 at acpi0: not present
> acpicpu at acpi0 not configured
> acpipwrres at acpi0 not configured
> acpipwrres at acpi0 not configured
> acpipwrres at acpi0 not configured
> acpipwrres at acpi0 not configured
> acpipwrres at acpi0 not configured
> acpitz at acpi0 not configured
> acpitz at acpi0 not configured
> "INT3F0D" at acpi0 not configured
> "PNP0401" at acpi0 not configured
> "PNP0C0C" at acpi0 not configured
> "PNP0C0B" at acpi0 not configured
> "PNP0C0B" at acpi0 not configured
> "PNP0C0B" at acpi0 not configured
> "PNP0C0B" at acpi0 not configured
> "PNP0C0B" at acpi0 not configured
> "PNP0C14" at acpi0 not configured
> bios0: ROM list: 0xc/0xec00 0xcf000/0x1000
> pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> pchb0 at pci0 dev 0 function 0 "Intel Core 4G Host" rev 0x06
> vga1 at pci0 dev 2 function 0 "Intel HD Graphics 4600" rev 0x06
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> "Intel Core 4G HD Audio" rev 0x06 at pci0 dev 3 function 0 not configured
> xhci0 at pci0 dev 20 function 0 "Intel 8 Series xHCI" rev 0x04: msi
> usb0 at xhci0: USB revision 3.0
> uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev
> 3.00/1.00 addr 1
> "Intel 8 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
> ehci0 at pci0 dev 26 function 0 "Intel 8 Series USB" rev 0x04: apic 8 int 17
> usb1 at ehci0: USB revision 2.0
> uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev
> 2.00/1.00 addr 1
> "Intel 8 Series HD Audio" rev 0x04 at pci0 dev 27 function 0 not configured
> ppb0 at pci0 dev 28 function 0 "Intel 8 Series PCIE" rev 0xd4: apic 8 int 16
> pci1 at ppb0 bus 1
> ppb1 at pci0 dev 28 function 5 "Intel 8 Series PCIE" rev 0xd4: apic 8 int 17
> pci2 at ppb1 bus 2
> re0 at pci2 dev 0 function 0 "Realtek 8168" rev 0x0c: RTL8168G/8111G
> (0x4c00), msi, address 44:37:e6:e1:67:65
> rgephy0 at re0 phy 7: RTL8251 PHY, rev. 0
> ehci1 at pci0 dev 29 function 0 "Intel 8 Series USB" rev 0x04: apic 8 int 23
> usb2 at ehci1: USB revision 2.0
> uhub2 at usb2 configuration 1 interface 0 "Intel EHCI root hub" rev
> 2.00/1.00 addr 1
> pcib0 at pci0 dev 31 function 0 "Intel H81 LPC" rev 0x04
> ahci0 at pci0 dev 31 function 2 "Intel 8 Series AHCI" rev 0x04: msi, AHCI
> 1.3
> ahci0: port 0: 6.0Gb/s
> ahci0: port 1: 1.5Gb/s
> 

Re: pfstat and queueing

2018-02-15 Thread Predrag Punosevac
Stuart Henderson wrote:

> It can already be monitored to some extent, base snmpd does already
> support a number of things in OPENBSD-PF-MIB, but not queues yet.

Any chance that you share with us how you plot the data you recover with
snmpwalk from those MIBs. I would be most interested in
LibreNMS/Observium. Also how difficult would be to write PF plugin for
PF? Somebody apparently tried


https://github.com/darinkes/collectd-pf
https://collectd.org/wiki/index.php/Plugin:PF

Any hints?

Best,
Predrag



Re: Sharing files between OpenBSD, Linux, and Windows boxes

2018-02-15 Thread mathuin
 
> Not sure what your environment is, but I'm a big fan of sshfs for light
> usage.
> 
Zero config and fast enough for light usage, sshfs is pretty cool. 



unable to boot new 6.2 install

2018-02-15 Thread niya

hi

i have installed openbsd 6.2 on a lenovo thinkcentre i5 desktop computer,

the installation completes fine afaics.

i reboot, the dmesg report scrolls up then the screen goes blank,

i can't tell if dmesg completes or stops half way through,

after which the machine doesn't respond to keyboard or mouse.

the following dmesg i retrieved dropping to a shell when booting from 
the installation usb stick


i have also booted the machine with a live linux mint which works fine.

what could be causing the problem or what else can i do to retrieve any 
meaningful diagnostics to forward to the list ?


---


OpenBSD 6.2 (RAMDISK_CD) #165: Tue Oct  3 20:05:31 MDT 2017
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/RAMDISK_CD
cpu0: Intel(R) Core(TM) i5-4440S CPU @ 2.80GHz ("GenuineIntel" 
686-class) 2.90 GHz
cpu0: 
FPU,V86,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,NXE,PAGE1GB,LONG,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT

real mem  = 3568664576 (3403MB)
avail mem = 3491119104 (3329MB)
mainbus0 at root
bios0 at mainbus0: date 04/13/12, SMBIOS rev. 2.8 @ 0xebe90 (31 entries)
bios0: vendor LENOVO version "FCKT46AUS" date 12/16/2013
bios0: LENOVO 10AW008FUK
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP APIC FPDT LPIT SLIC MSDM SSDT SSDT MCFG HPET 
SSDT SSDT BGRT

acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4, IBE
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 8 pa 0xfec0, version 20, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (RP01)
acpiprt2 at acpi0: bus 2 (RP06)
acpiprt3 at acpi0: bus -1 (PEG0)
acpiprt4 at acpi0: bus -1 (PEG1)
acpiprt5 at acpi0: bus -1 (PEG2)
acpiec0 at acpi0: not present
acpicpu at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpitz at acpi0 not configured
acpitz at acpi0 not configured
"INT3F0D" at acpi0 not configured
"PNP0401" at acpi0 not configured
"PNP0C0C" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C14" at acpi0 not configured
bios0: ROM list: 0xc/0xec00 0xcf000/0x1000
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel Core 4G Host" rev 0x06
vga1 at pci0 dev 2 function 0 "Intel HD Graphics 4600" rev 0x06
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
"Intel Core 4G HD Audio" rev 0x06 at pci0 dev 3 function 0 not configured
xhci0 at pci0 dev 20 function 0 "Intel 8 Series xHCI" rev 0x04: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 
3.00/1.00 addr 1

"Intel 8 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
ehci0 at pci0 dev 26 function 0 "Intel 8 Series USB" rev 0x04: apic 8 int 17
usb1 at ehci0: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev 
2.00/1.00 addr 1

"Intel 8 Series HD Audio" rev 0x04 at pci0 dev 27 function 0 not configured
ppb0 at pci0 dev 28 function 0 "Intel 8 Series PCIE" rev 0xd4: apic 8 int 16
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 5 "Intel 8 Series PCIE" rev 0xd4: apic 8 int 17
pci2 at ppb1 bus 2
re0 at pci2 dev 0 function 0 "Realtek 8168" rev 0x0c: RTL8168G/8111G 
(0x4c00), msi, address 44:37:e6:e1:67:65

rgephy0 at re0 phy 7: RTL8251 PHY, rev. 0
ehci1 at pci0 dev 29 function 0 "Intel 8 Series USB" rev 0x04: apic 8 int 23
usb2 at ehci1: USB revision 2.0
uhub2 at usb2 configuration 1 interface 0 "Intel EHCI root hub" rev 
2.00/1.00 addr 1

pcib0 at pci0 dev 31 function 0 "Intel H81 LPC" rev 0x04
ahci0 at pci0 dev 31 function 2 "Intel 8 Series AHCI" rev 0x04: msi, 
AHCI 1.3

ahci0: port 0: 6.0Gb/s
ahci0: port 1: 1.5Gb/s
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0:  SCSI3 
0/direct fixed naa.5000c50074c74d5b

sd0: 476940MB, 512 bytes/sector, 976773168 sectors
cd0 at scsibus0 targ 1 lun 0:  ATAPI 
5/cdrom removable

"Intel 8 Series SMBus" rev 0x04 at pci0 dev 31 function 3 not configured
isa0 at pcib0
isadma0 at isa0
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
umass0 at uhub0 port 3 

Re: VMM VM - 'dummy' based driver-based X11 server inside, not possible?

2018-02-15 Thread Mike Larkin
On Thu, Feb 15, 2018 at 07:31:07PM -0500, Jiri B wrote:
> On Thu, Feb 15, 2018 at 04:18:33PM -0800, Mike Larkin wrote:
> > On Thu, Feb 15, 2018 at 07:10:26PM -0500, Jiri B wrote:
> > > Is it possible to run 'dummy' based X11 (should be better that Xvfb)[1] 
> > > inside
> > > VMM VM?
> > > 
> > 
> > what are you trying to accomplish?
> 
> A persistent remote display session, ie. xenodm->wm or users one accessible
> via VNC with x11vnc.
> 
> Jiri

I found a solution to do this with about 1 minute of google searching. What
are you finding difficult?



libasr/libevent question

2018-02-15 Thread Edgar Pettijohn
I have this trivial program that I keep getting a segfault trying to use 
event_asr_run(). I have #if 0'd working code to show my progression from 
getaddrinfo() to event_asr_run(). It is hopefully something trivial that 
I'm overlooking.  Anyway I compiled like so:


cc -g -o test test.c -levent

#include 
#include 
#include 
#include 

#include 

#include 
#include 
#include 
#include 
#include 
#include 
#include 

void
ev_cb(struct asr_result *ar, void *arg)
{
if (ar->ar_addrinfo)
freeaddrinfo(ar->ar_addrinfo);
if (ar->ar_gai_errno == EAI_NODATA || ar->ar_gai_errno == EAI_NONAME)
printf("nodata\n");
else
printf("data\n");
}

int
main(void)
{
in_addr_t ia;
struct addrinfo hints, *info, *p;
int rv;
char buf[512];
char *host = "a.root-servers.net";
struct sockaddr_in sa;
struct asr_query *aq;
/*struct asr_result *ar;
int ans; */

inet_pton(AF_INET, "108.61.222.55", &(sa.sin_addr));
ia = sa.sin_addr.s_addr;

ia = ntohl(ia);

if (snprintf(buf, sizeof(buf), "%d.%d.%d.%d.%s.",
ia & 0xff, (ia >> 8) & 0xff, (ia >> 16) & 0xff, (ia >> 24) 
& 0xff, host) >= sizeof(buf))

exit(1);

memset(, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;

aq = getaddrinfo_async(buf, NULL, , NULL);
event_asr_run(aq, ev_cb, (void *)NULL);
#if 0
ar = calloc(1, sizeof *ar);
if (ar == NULL)
exit(1);
do {
ans = asr_run(aq, ar);
} while (ans != 1);

if (ar->ar_gai_errno == EAI_NODATA || ar->ar_gai_errno == EAI_NONAME)
printf("nodata\n");
else
printf("data\n");
#endif
#if 0
if ((rv = getaddrinfo(buf, NULL, , )) != 0) {
if (rv == EAI_NODATA || rv == EAI_NONAME)
printf("nodata\n");
else
printf("failed\n");
exit(1);
} else {
printf("data\n");
}
#endif
return 0;
}

Here is what gdb has to say about it.

laptop$ gdb ./test ./test.core
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you 
are
welcome to change it and/or distribute copies of it under certain 
conditions.

Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-unknown-openbsd6.2"...
Core was generated by `test'.
Program terminated with signal 11, Segmentation fault.
Loaded symbols for /home/edgar/test
Reading symbols from /usr/lib/libevent.so.4.1...done.
Loaded symbols for /usr/lib/libevent.so.4.1
Reading symbols from /usr/lib/libc.so.90.0...done.
Loaded symbols for /usr/lib/libc.so.90.0
Reading symbols from /usr/libexec/ld.so...done.
Loaded symbols for /usr/libexec/ld.so
#0  event_add (ev=0x155e476b1a00, tv=0x7f7e1ab0) at 
/usr/src/lib/libevent/event.c:680

680 const struct eventop *evsel = base->evsel;
(gdb) bt
#0  event_add (ev=0x155e476b1a00, tv=0x7f7e1ab0) at 
/usr/src/lib/libevent/event.c:680
#1  0x155e6b5fb227 in event_asr_run (async=0x155e476b1c00, 
cb=0x155bb72005a0 , arg=0x0)

at /usr/src/lib/libevent/event.c:1035
#2  0x155bb720080e in main () at test.c:54
Current language:  auto; currently minimal

Makes me think I'm doing something wrong with the callback function, but 
I just can't see it.



Thanks in advance.



Re: VMM VM - 'dummy' based driver-based X11 server inside, not possible?

2018-02-15 Thread Jiri B
On Thu, Feb 15, 2018 at 04:18:33PM -0800, Mike Larkin wrote:
> On Thu, Feb 15, 2018 at 07:10:26PM -0500, Jiri B wrote:
> > Is it possible to run 'dummy' based X11 (should be better that Xvfb)[1] 
> > inside
> > VMM VM?
> > 
> 
> what are you trying to accomplish?

A persistent remote display session, ie. xenodm->wm or users one accessible
via VNC with x11vnc.

Jiri



Re: VMM VM - 'dummy' based driver-based X11 server inside, not possible?

2018-02-15 Thread Mike Larkin
On Thu, Feb 15, 2018 at 07:10:26PM -0500, Jiri B wrote:
> Is it possible to run 'dummy' based X11 (should be better that Xvfb)[1] inside
> VMM VM?
> 

what are you trying to accomplish?

> $ Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile 
> ./10.log -config ./xorg.conf :10
> (EE)
> Fatal server error:
> (EE) xf86OpenConsole: No console driver found
> Supported drivers: wscons
> Check your kernel's console driver configuration and /dev entries(EE)
> (EE)
> Please consult the The X.Org Foundation support
>  at http://wiki.x.org
>  for help.
> (EE) Please also check the log file at "./10.log" for additional information.
> (EE)
> (EE) Server terminated with error (1). Closing log file.
> 
> $ cat 10.log
> [62.900] (--) checkDevMem: using aperture driver /dev/xf86
> [62.969] (EE) 
> Fatal server error:
> [62.970] (EE) xf86OpenConsole: No console driver found
> Supported drivers: wscons
> Check your kernel's console driver configuration and /dev entries(EE) 
> [62.973] (EE) 
> Please consult the The X.Org Foundation support 
>  at http://wiki.x.org
>  for help. 
> [62.974] (EE) Please also check the log file at "./10.log" for additional 
> information.
> [62.976] (EE) 
> [62.992] (EE) Server terminated with error (1). Closing log file.
> 
> xorg.conf is from https://xpra.org/xorg.conf (attached in the end of the 
> mail).
> 
> But same xorg.conf and same command work OK on headless baremetal.
> 
> [1] http://xpra.org/trac/wiki/Xdummy
> [2] https://xpra.org/xorg.conf
> 
> Jiri
> 
> - from host
> 
> OpenBSD 6.2-current (GENERIC.MP) #6: Tue Feb 13 20:16:11 MST 2018
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 8564375552 (8167MB)
> avail mem = 8297807872 (7913MB)
> enter_shared_special_pages: entered idt page va 0x8001 pa 
> 0x1d5a000
> enter_shared_special_pages: entered kutext page va 0x81831000 pa 
> 0x1831000
> enter_shared_special_pages: entered kutext page va 0x81832000 pa 
> 0x1832000
> enter_shared_special_pages: entered kutext page va 0x81833000 pa 
> 0x1833000
> enter_shared_special_pages: entered kudata page va 0x81ac9000 pa 
> 0x1ac9000
> cpu_enter_pages: entered tss+gdt page at va 0x81abd000 pa 0x1abd000
> cpu_enter_pages: entered t.stack page at va 0x81abe000 pa 0x1abe000
> cpu_enter_pages: cif_tss.tss_rsp0 = 0x81abe3e0
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.6 @ 0x9f000 (68 entries)
> bios0: vendor American Megatrends Inc. version "1.1" date 05/27/2010
> bios0: Supermicro X8SIL
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S1 S4 S5
> acpi0: tables DSDT FACP APIC MCFG OEMB HPET GSCI DMAR SSDT
> acpi0: wakeup devices P0P1(S4) P0P3(S4) P0P4(S4) P0P5(S4) P0P6(S4) BR1E(S4) 
> USB0(S4) USB1(S4) USB2(S4) USB3(S4) USB4(S4) USB5(S4) USB6(S4) GBE_(S4) 
> BR20(S4) BR21(S4) [...]
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> lapic_map: entered lapic page va 0x81ab2000 pa 0xfee0
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Xeon(R) CPU L3426 @ 1.87GHz, 1866.93 MHz
> 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,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,MELTDOWN
> cpu0: 256KB 64b/line 8-way L2 cache
> acpitimer0: recalibrated TSC frequency 189986 Hz
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 133MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
> cpu1 at mainbus0cpu_enter_pages: entered tss+gdt page at va 
> 0x800021fff000 pa 0x10f7ab000
> cpu_enter_pages: entered t.stack page at va 0x80002200 pa 0x10f7ac000
> cpu_enter_pages: cif_tss.tss_rsp0 = 0x8000220003e0
> : apid 2 (application processor)
> cpu1: Intel(R) Xeon(R) CPU L3426 @ 1.87GHz, 1866.67 MHz
> 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,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,MELTDOWN
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0cpu_enter_pages: entered tss+gdt page at va 
> 0x80002201 pa 0x10f7b6000
> cpu_enter_pages: entered t.stack page at va 0x800022011000 pa 0x10f7b7000
> cpu_enter_pages: cif_tss.tss_rsp0 = 0x8000220113e0
> : apid 4 (application processor)
> cpu2: Intel(R) Xeon(R) CPU L3426 @ 1.87GHz, 1866.67 MHz
> cpu2: 
> 

VMM VM - 'dummy' based driver-based X11 server inside, not possible?

2018-02-15 Thread Jiri B
Is it possible to run 'dummy' based X11 (should be better that Xvfb)[1] inside
VMM VM?

$ Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile 
./10.log -config ./xorg.conf :10
(EE)
Fatal server error:
(EE) xf86OpenConsole: No console driver found
Supported drivers: wscons
Check your kernel's console driver configuration and /dev entries(EE)
(EE)
Please consult the The X.Org Foundation support
 at http://wiki.x.org
 for help.
(EE) Please also check the log file at "./10.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.

$ cat 10.log
[62.900] (--) checkDevMem: using aperture driver /dev/xf86
[62.969] (EE) 
Fatal server error:
[62.970] (EE) xf86OpenConsole: No console driver found
Supported drivers: wscons
Check your kernel's console driver configuration and /dev entries(EE) 
[62.973] (EE) 
Please consult the The X.Org Foundation support 
 at http://wiki.x.org
 for help. 
[62.974] (EE) Please also check the log file at "./10.log" for additional 
information.
[62.976] (EE) 
[62.992] (EE) Server terminated with error (1). Closing log file.

xorg.conf is from https://xpra.org/xorg.conf (attached in the end of the mail).

But same xorg.conf and same command work OK on headless baremetal.

[1] http://xpra.org/trac/wiki/Xdummy
[2] https://xpra.org/xorg.conf

Jiri

- from host

OpenBSD 6.2-current (GENERIC.MP) #6: Tue Feb 13 20:16:11 MST 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8564375552 (8167MB)
avail mem = 8297807872 (7913MB)
enter_shared_special_pages: entered idt page va 0x8001 pa 0x1d5a000
enter_shared_special_pages: entered kutext page va 0x81831000 pa 
0x1831000
enter_shared_special_pages: entered kutext page va 0x81832000 pa 
0x1832000
enter_shared_special_pages: entered kutext page va 0x81833000 pa 
0x1833000
enter_shared_special_pages: entered kudata page va 0x81ac9000 pa 
0x1ac9000
cpu_enter_pages: entered tss+gdt page at va 0x81abd000 pa 0x1abd000
cpu_enter_pages: entered t.stack page at va 0x81abe000 pa 0x1abe000
cpu_enter_pages: cif_tss.tss_rsp0 = 0x81abe3e0
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0x9f000 (68 entries)
bios0: vendor American Megatrends Inc. version "1.1" date 05/27/2010
bios0: Supermicro X8SIL
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB HPET GSCI DMAR SSDT
acpi0: wakeup devices P0P1(S4) P0P3(S4) P0P4(S4) P0P5(S4) P0P6(S4) BR1E(S4) 
USB0(S4) USB1(S4) USB2(S4) USB3(S4) USB4(S4) USB5(S4) USB6(S4) GBE_(S4) 
BR20(S4) BR21(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
lapic_map: entered lapic page va 0x81ab2000 pa 0xfee0
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(R) CPU L3426 @ 1.87GHz, 1866.93 MHz
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,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
acpitimer0: recalibrated TSC frequency 189986 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 133MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0cpu_enter_pages: entered tss+gdt page at va 0x800021fff000 
pa 0x10f7ab000
cpu_enter_pages: entered t.stack page at va 0x80002200 pa 0x10f7ac000
cpu_enter_pages: cif_tss.tss_rsp0 = 0x8000220003e0
: apid 2 (application processor)
cpu1: Intel(R) Xeon(R) CPU L3426 @ 1.87GHz, 1866.67 MHz
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,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0cpu_enter_pages: entered tss+gdt page at va 0x80002201 
pa 0x10f7b6000
cpu_enter_pages: entered t.stack page at va 0x800022011000 pa 0x10f7b7000
cpu_enter_pages: cif_tss.tss_rsp0 = 0x8000220113e0
: apid 4 (application processor)
cpu2: Intel(R) Xeon(R) CPU L3426 @ 1.87GHz, 1866.67 MHz
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,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0cpu_enter_pages: entered tss+gdt page at va 0x800022019000 
pa 0x10f7b9000
cpu_enter_pages: entered t.stack page at va 0x80002201a000 pa 0x10f7ba000

Re: Segmentation fault when opening a particular PDF file in mupdf

2018-02-15 Thread Stuart Henderson
On 2018-02-15, Xianwen Chen  wrote:
> Dear Carlin and Erling,
> Thank you both!
> Yes, I am using 6.2 with mupdf-1.11p1. Then I shall just wait until next 
> release and use Firefox to read the document at the moment.
> Sincerely,
> Xianwen

BTW I've just backported this fix to the 6.2-stable ports tree if you're
happy with building from ports.. (Will need to wait a couple of hours for
anoncvs mirrors to catch up).




Re: pfstat and queueing

2018-02-15 Thread Stuart Henderson
On 2018-02-15, Kaya Saman  wrote:
>
>
> On 02/15/2018 01:34 PM, Stuart Henderson wrote:
>> On 2018/02/15 13:27, Kaya Saman wrote:
>>>
>>> On 02/15/2018 12:13 PM, Stuart Henderson wrote:
 On 2018-02-15, Kaya Saman  wrote:
> does queueing still function with pfstat? As far as I'm aware it still
> uses the old altq method which has long been abandoned.
 you're correct, pfstat hasn't been updated to follow changes in PF for
 a long time. the only change in pfstat since 2007 has been adding the
 -f flag to copy/clean the database.


>>> Thanks Stuart for the confirmation.
>>>
>>>
>>> Hmm looks like this might be a feature request to Daniel then. or
>>> someone who's working on pfstat :-)
>> Nobody is visibly working on pfstat.
>>
>> If anyone did want to work on queue monitoring I'd encourage them to
>> look at adding to snmpd instead (it will need a custom MIB). There are
>> plenty of things that can monitor SNMP stats, and as it's in base,
>> there are no real worries about ABI getting out of sync.
>>
> Interesting!
>
> I think I agree with SNMP. It would be great if pf could be monitored 
> through net-snmp or the built in snmp. To be able to see what PF is 
> doing in something like Observium, Zabbix, Cacti or any other SNMP based 
> monitoring software would be a really nice asset.

It can already be monitored to some extent, base snmpd does already
support a number of things in OPENBSD-PF-MIB, but not queues yet.




Re: feature - native softraid-crypto for VMM virtio disk

2018-02-15 Thread Mike Larkin
On Thu, Feb 15, 2018 at 12:05:31PM -0800, Mike Larkin wrote:
> On Thu, Feb 15, 2018 at 09:50:19AM -0500, Jiri B wrote:
> > 
> > Hi,
> > 
> > one cannot boot vmm-bios if not having newer hw than Westmere CPU.
> > And booting host kernel for a VM which has FDE does not work, that's clear.
> > 
> > What about a feature to support somehow softraid-crypto (or similar) for
> > vmctl create?
> > 
> > A variation for native LUKS support in QEMU:
> > 
> > qemu ... -object secret,id=sec0,data='secretpass' \
> >   -drive driver=luks,key-secret=sec0,file=diskfile
> > 
> > The use case here is not to have plain VMM disk file on
> > host (I'm using softraid-crypto for underlying device now).
> > 
> > Jiri
> > 
> 
> while that might be interesting and I'd be receptive to seeing a diff to do
> that, I think a better use of time would be to port x86emu into vmm and
> let that do that bios part for CPUs < westmere. Plus, that will be needed
> for SMP bringup eventually anyway.
> 
> -ml
> 

That should have read "port x86emu into vmd" not "vmm". No reason to run that
goop in the kernel if we don't have to (yes, I know we use it in the kernel for
VGA post after un-zzz on some rare machines, but I'd prefer to not do that for
this scenario if not absolutely needed).



Re: Segmentation fault when opening a particular PDF file in mupdf

2018-02-15 Thread Xianwen Chen
Dear Carlin and Erling,
Thank you both!
Yes, I am using 6.2 with mupdf-1.11p1. Then I shall just wait until next 
release and use Firefox to read the document at the moment.
Sincerely,
Xianwen

On Thu, Feb 15, 2018 at 5:13 PM, Erling Westenvik 
> wrote:
On Fri, Feb 16, 2018 at 05:38:11AM +1300, Carlin Bingham wrote:
> On 16/02/2018 4:28 a.m., Xianwen Chen wrote:
> > mupdf crashes and reports segmentation fault when I try to open a
> > particular PDF file:
> > https://brage.bibsys.no/xmlui/bitstream/handle/11250/2440173/SoL-Rapport-2014-06.pdf?sequence=1=y
> >
> > If you use mupdf too, could you try to open the file and see whether
> > mupdf crashes on your computer too? In that way, you can help me
> > understand whether the problem is reproducible.

Opens just fine. See below.

> Are you using 6.2 with mupdf-1.11p1?
> There was a crash that's fixed on -current:
> https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/textproc/mupdf/patches/patch-source_fitz_load-jpx_c?rev=1.5=text/x-cvsweb-markup

I'm using current as of yesterday, February 14th, here.

Erling



Re: feature - native softraid-crypto for VMM virtio disk

2018-02-15 Thread Mike Larkin
On Thu, Feb 15, 2018 at 09:50:19AM -0500, Jiri B wrote:
> 
> Hi,
> 
> one cannot boot vmm-bios if not having newer hw than Westmere CPU.
> And booting host kernel for a VM which has FDE does not work, that's clear.
> 
> What about a feature to support somehow softraid-crypto (or similar) for
> vmctl create?
> 
> A variation for native LUKS support in QEMU:
> 
> qemu ... -object secret,id=sec0,data='secretpass' \
>   -drive driver=luks,key-secret=sec0,file=diskfile
> 
> The use case here is not to have plain VMM disk file on
> host (I'm using softraid-crypto for underlying device now).
> 
> Jiri
> 

while that might be interesting and I'd be receptive to seeing a diff to do
that, I think a better use of time would be to port x86emu into vmm and
let that do that bios part for CPUs < westmere. Plus, that will be needed
for SMP bringup eventually anyway.

-ml



Re: getting data from qcow2 images on OpenBSD

2018-02-15 Thread Mike Larkin
On Thu, Feb 15, 2018 at 02:44:57PM -0500, Jiri B wrote:
> Hi,
> 
> qemu-nbd[1] is a way to "attach" qcow2 image to a nbd[2] device,
> but we don't have nbd yet. Though Patrick made it working
> for Bitrig[3]. Would it be usable in OpenBSD?
> 
> If qemu-nbd is not an option, what are other ways to get
> data from various qemu-supported images (if not running qemu
> itself and getting data over tcp/ip)?
> 
> I found vdfuse[4] but it would need VirtualBox libs working
> on OpenBSD...
> 
> Jiri
> 
> [1] http://ask.xmodulo.com/mount-qcow2-disk-image-linux.html
> [2] https://en.wikipedia.org/wiki/Network_block_device
>   An example mounting OpenBSD partitions inside qcow2 on Linux:
> 
>   # qemu-nbd --connect=/dev/nbd0 /var/lib/libvirt/images/instsrv2.qcow2
>   
>   # fdisk -l /dev/nbd0
>   Disk /dev/nbd0: 20 GiB, 21474836480 bytes, 41943040 sectors
>   Units: sectors of 1 * 512 = 512 bytes
>   Sector size (logical/physical): 512 bytes / 512 bytes
>   I/O size (minimum/optimal): 512 bytes / 512 bytes
>   Disklabel type: dos
>   Disk identifier: 0x
>   
>   Device  Boot Start  End  Sectors Size Id Type
>   /dev/nbd0p4 *   64 41929649 41929586  20G a6 OpenBSD
>   
>   # dmesg | grep -A1 nbd0:
>   [670102.643817]  nbd0: p4
>p4: 
>   
>   # mount -t ufs -o ufstype=44bsd /dev/nbd0p5 /mnt
> 
> [3] https://github.com/bitrig/bitrig/wiki/Roadmap
> [4] https://github.com/SophosLabs/vdfuse
> 

convert it to raw using qemu-img and then attach it as a vnd.

-ml



Re: Firefox (and SeaMonkey) automatically creates a Desktop folder in $HOME

2018-02-15 Thread Xianwen Chen
Dear Jim and Tobias,

It worked like charm! Thank you very much for helping me solve the problem!

Sincerely,
Xianwen

On Thu, Feb 15, 2018 at 6:00 PM, Tobias Ulmer 
> wrote:
On Wed, Feb 14, 2018 at 07:42:53AM -0700, James Anderson wrote:
> Xianwen,
>
> If you create ~/.config/user-dirs.dirs with the following lines it will
> prevent Firefox from creating those folders:
>
> XDG_DESKTOP_DIR="$HOME"
> XDG_DOCUMENTS_DIR="$HOME"
> XDG_DOWNLOAD_DIR="$HOME"

Needs to be "$HOME/" exactly:
https://cgit.freedesktop.org/xdg/xdg-user-dirs/tree/xdg-user-dir-lookup.c#n126

>
>
> Jim
>
> On Wed, Feb 14, 2018 at 7:23 AM, Xianwen Chen 
> > wrote:
>
> > Dear OpenBSD users,
> >
> > I find that Firefox and SeaMonkey automatically create a Desktop folder in
> > $HOME directory. I do not use Desktop folder in fvwm and I do not want it.
> > You probably encountered the same problem. How can this behavior of Firefox
> > be disabled?
> >
> > Sincerely,
> > Xianwen
> >



getting data from qcow2 images on OpenBSD

2018-02-15 Thread Jiri B
Hi,

qemu-nbd[1] is a way to "attach" qcow2 image to a nbd[2] device,
but we don't have nbd yet. Though Patrick made it working
for Bitrig[3]. Would it be usable in OpenBSD?

If qemu-nbd is not an option, what are other ways to get
data from various qemu-supported images (if not running qemu
itself and getting data over tcp/ip)?

I found vdfuse[4] but it would need VirtualBox libs working
on OpenBSD...

Jiri

[1] http://ask.xmodulo.com/mount-qcow2-disk-image-linux.html
[2] https://en.wikipedia.org/wiki/Network_block_device
  An example mounting OpenBSD partitions inside qcow2 on Linux:

  # qemu-nbd --connect=/dev/nbd0 /var/lib/libvirt/images/instsrv2.qcow2
  
  # fdisk -l /dev/nbd0
  Disk /dev/nbd0: 20 GiB, 21474836480 bytes, 41943040 sectors
  Units: sectors of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 512 bytes
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disklabel type: dos
  Disk identifier: 0x
  
  Device  Boot Start  End  Sectors Size Id Type
  /dev/nbd0p4 *   64 41929649 41929586  20G a6 OpenBSD
  
  # dmesg | grep -A1 nbd0:
  [670102.643817]  nbd0: p4
   p4: 
  
  # mount -t ufs -o ufstype=44bsd /dev/nbd0p5 /mnt

[3] https://github.com/bitrig/bitrig/wiki/Roadmap
[4] https://github.com/SophosLabs/vdfuse



Re: Firefox (and SeaMonkey) automatically creates a Desktop folder in $HOME

2018-02-15 Thread Tobias Ulmer
On Wed, Feb 14, 2018 at 07:42:53AM -0700, James Anderson wrote:
> Xianwen,
> 
> If you create ~/.config/user-dirs.dirs with the following lines it will
> prevent Firefox from creating those folders:
> 
> XDG_DESKTOP_DIR="$HOME"
> XDG_DOCUMENTS_DIR="$HOME"
> XDG_DOWNLOAD_DIR="$HOME"

Needs to be "$HOME/" exactly:
https://cgit.freedesktop.org/xdg/xdg-user-dirs/tree/xdg-user-dir-lookup.c#n126

> 
> 
> Jim
> 
> On Wed, Feb 14, 2018 at 7:23 AM, Xianwen Chen  wrote:
> 
> > Dear OpenBSD users,
> >
> > I find that Firefox and SeaMonkey automatically create a Desktop folder in
> > $HOME directory. I do not use Desktop folder in fvwm and I do not want it.
> > You probably encountered the same problem. How can this behavior of Firefox
> > be disabled?
> >
> > Sincerely,
> > Xianwen
> >



Re: pfstat not generating graphs after upgrading to -current

2018-02-15 Thread Kaya Saman



On 02/15/18 07:48, Glenn Faustino wrote:

After deleting and installing pfstat it now works, thanks guys!

Feb 15 14:26:37 OpenBSD pkg_delete: Removed pfstat-2.5p1
Feb 15 14:27:02 OpenBSD pkg_add: Added pfstat-2.5p1

$ doas pfstat -q -d /var/db/pfstat.db
$


Regards,
Glenn


Hi,

I'm experiencing the exact same issues for both pfstat and pftop however,
running pkg_delete / pkg_add doesn't seem to work for me as a fix :-(


pfstat -q -p
ioctl: DIOCGETSTATUS: Permission denied
pf_query: query_counters() failed

pftop: DIOCGETSTATUS: Permission denied


uname -a : 6.2 GENERIC.MP#408 amd64 <- also CURRENT updated a few days ago


Regards,

Kaya


Mine is OpenBSD 6.2-current (GENERIC) #6: Tue Feb 13 20:12:04 MST 2018

Can you try installing the latest snapshot?

Regards,
Glenn


Hi Glenn,

just updated now and ran pkg_delete / pkg_install again for pftop / 
pfstat but unfortunately they still come up with the same error. 
Probably because I have a few tunnel interfaces and pppoe interfaces ?? 
{wild guess}


Also it seems that at boot pf doesn't seem to read or like my pf.conf. 
After the system has booted I can manually get pf to read the file using 
pfctl -f /etc/pf.conf but it should be automatic.



Regards,


Kaya



Re: Segmentation fault when opening a particular PDF file in mupdf

2018-02-15 Thread Erling Westenvik
On Fri, Feb 16, 2018 at 05:38:11AM +1300, Carlin Bingham wrote:
> On 16/02/2018 4:28 a.m., Xianwen Chen wrote:
> > mupdf crashes and reports segmentation fault when I try to open a
> > particular PDF file:
> > https://brage.bibsys.no/xmlui/bitstream/handle/11250/2440173/SoL-Rapport-2014-06.pdf?sequence=1=y
> >
> > If you use mupdf too, could you try to open the file and see whether
> > mupdf crashes on your computer too? In that way, you can help me
> > understand whether the problem is reproducible.

Opens just fine. See below.

> Are you using 6.2 with mupdf-1.11p1?
> There was a crash that's fixed on -current:
> https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/textproc/mupdf/patches/patch-source_fitz_load-jpx_c?rev=1.5=text/x-cvsweb-markup

I'm using current as of yesterday, February 14th, here.

Erling



OpenBSD as an IKEv2 IPsec client with L/P authent

2018-02-15 Thread Joel Carnat

Hi,

My FTTH home-box provides IKEv2 server support.
I connected my iPhone, via 3G, to it. I can now access my internal 
home-LAN. So I know it works.


I want to do the same with an OpenBSD server hosted in "the Cloud" ; in 
transport mode as far as I understood the docs.
I've struggled with ipsec.conf(5), ipsecctl(8) and iked(8) for a couple 
of hours now but I can't connect OpenBSD to the box.


The home-box is using IKEv2 and User/Password authentication mode.
The OpenBSD machine in 6.2/amd64.

I have configured iked.conf(5) like this:
ikev2 active esp \
from egress to 192.168.0.0/24 \
peer 78.192.10.15

And running iked(8) goes:
# iked -dv
set_policy: could not find pubkey for 
/etc/iked/pubkeys/ipv4/78.192.10.15
ikev2 "policy1" active esp inet from 108.61.176.54 to 192.168.0.0/24 
local any peer 78.192.10.15 ikesa enc aes-256,aes-192,aes-128,3des prf 
hmac-sha2-256,hmac-sha1 auth hmac-sha2-256,hmac-sha1 group 
modp2048,modp1536,modp1024 childsa enc aes-256,aes-192,aes-128 auth 
hmac-sha2-256,hmac-sha1 lifetime 10800 bytes 536870912 rfc7427
ikev2_msg_send: IKE_SA_INIT request from 0.0.0.0:500 to 78.192.10.15:500 
msgid 0, 510 bytes
ikev2_recv: IKE_SA_INIT response from responder 78.192.10.15:500 to 
108.61.176.54:500 policy 'policy1' id 0, 456 bytes


And that's all :(

Is there a way to use l/p authent with iked(8)?
Or am I just not using the right software? In which case, what would the 
proper tool be?


Thanks for help.



Re: Segmentation fault when opening a particular PDF file in mupdf

2018-02-15 Thread Carlin Bingham

On 16/02/2018 4:28 a.m., Xianwen Chen wrote:

Dear OpenBSD users,

mupdf crashes and reports segmentation fault when I try to open a particular PDF 
file: 
https://brage.bibsys.no/xmlui/bitstream/handle/11250/2440173/SoL-Rapport-2014-06.pdf?sequence=1=y

If you use mupdf too, could you try to open the file and see whether mupdf 
crashes on your computer too? In that way, you can help me understand whether 
the problem is reproducible.

Sincerely,
Xianwen


Are you using 6.2 with mupdf-1.11p1?
There was a crash that's fixed on -current:
https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/textproc/mupdf/patches/patch-source_fitz_load-jpx_c?rev=1.5=text/x-cvsweb-markup

--
Carlin



Segmentation fault when opening a particular PDF file in mupdf

2018-02-15 Thread Xianwen Chen
Dear OpenBSD users,

mupdf crashes and reports segmentation fault when I try to open a particular 
PDF file: 
https://brage.bibsys.no/xmlui/bitstream/handle/11250/2440173/SoL-Rapport-2014-06.pdf?sequence=1=y

If you use mupdf too, could you try to open the file and see whether mupdf 
crashes on your computer too? In that way, you can help me understand whether 
the problem is reproducible.

Sincerely,
Xianwen


How make an UEFI-bootable USB memory stick!? fdisk -i[g]y [-b 960] does not do it!!..

2018-02-15 Thread Tinker
Hi misc@,

This enquiry follows after ~15 hours of tinkering with making a system
UEFI-boot.


While EFI is almost totally undocumented in OpenBSD's manual today, one
of the few things that the documentation says is that
"fdisk -igy -b 960 sdN" will format a block device to GPT
partitionioning scheme, and put an EFI boot partition on the device.

I tested it, it does what it says, and the EFI FAT32 partition indeed
contains /EFI/BOOT/BOOTX64.EFI .

The problem is it doesn't boot. I tried on three different systems.


Next, I tried "fdisk -iy -b 960 sdN", and the USB stick won't boot too.


Last, I tried flashing a disk with OpenBSD's "install62.fs" image,
remove its default FFS BSD partition, and then add my own stuff using
disklabel, and that works!


Why does fdisk *NOT* create an UEFI-bootable USB disk, while
"install62.fs" can be used as a workaround?


I have gathered some insight:

 * The install62.fs image contains no primary GPT partition table, it
   does contain a secondary GPT partitioning table, and it contains an
   MBR. That GPT and MBR have the same content.

 * "fdisk -igy -b 960" creates a primary GPT partition table, no
   secondary GPT, and a "protective" MBR.

 * "fdisk -iy -b 960" creates an MBR and no primary or secondary GPT.

None of this explains why the USB stick won't boot however as in all
cases there's an EFI partition, containing the proper
EFI/BOOT/BOOTX64.EFI , and also a separate OpenBSD partition.

(A curious observation is that BOOTX64.EFI between install62.fs and
"fdisk -igy -b 960" are different, however that should still not
explain the difference.)

What am I missing?

Can you even make an UEFI-bootable USB memory stick from scratch using
OpenBSD tools today!?


Thanks!
Tinker



Re: Sharing files between OpenBSD, Linux, and Windows boxes

2018-02-15 Thread Rupert Gallagher
We used SMB locally: the server was on macos, the clients on macos, windows and 
linux. The problem with file permissions on macos had solution in the windows 
registry, but windows had a mind of its own and kept changing itself. A robust 
solution was to move the server to linux and enforce file permissions in samba. 
OpenBSD does not speak SMB fluently. We deprecated the protocol and sealed its 
ports for security reasons.

We still use NFS: the servers are on OpenBSD, the clients are on Windows 10 
Pro, MacOS and GNU/Linux. Every box talks NFS. The protocol and the 
implementations are not bullet-proof. OpenBSD's NFS suffered from DoS a few 
years ago, and we have a problem right now that smells DoS to us.

We need something that does not require resetting servers in the middle of the 
night. We also need something that works on WAN. We have iSCSI in the pipeline.

Sent from ProtonMail Mobile

On Thu, Feb 15, 2018 at 00:03, Martin Hanson  wrote:

> How do you share files between OpenBSD, Linux, and Windows boxes? Currently I 
> have a setup in which I mount Samba shares that are being served from Linux 
> boxes and mounted on Linux boxes using cifs and on Windows boxes. This works 
> very well and it's both easy to administer and it's very fast. I would like 
> to use OpenBSD for more that just firewalling and I would like to replace 
> several Linux desktops with OpenBSD. However, every time I try to set this up 
> I run into some kind of trouble. NFS isn't a solution as file permissions is 
> a mess between several different OS'es with different accounts. Samba works 
> really great between Linux and Windows, but mounting Samba shares on OpenBSD? 
> I remember sharity-light, but it isn't in the ports any longer and isn't 
> maintained. How do you manage file sharing between these systems (if it all)? 
> Also, is it possible to decrypt and mount a Linux harddrive that has been 
> encrypted with LUKS? Many thanks in advance! Kind regards


Re: Windows clients crashing nfs server?

2018-02-15 Thread Rupert Gallagher
Hello Tom,

All relevant ports are already open on the clients. This morning all clients 
failed to mount the shares. Resetting the software servers solved the problem. 
The logs are quiet.

Sent from ProtonMail Mobile

On Wed, Feb 14, 2018 at 19:07, Tom Smyth  wrote:

> Hello Rupert, I might hazard a guess that you open up Windows Firewall with 
> advanced security in windows pro 10 and allow the entire dynamic range of 
> ports that the port mapper might divert the client to, or simply allow all 
> traffic to / from the NFS server on the windows clients (just to test) I have 
> seen issues with Windows Firewall and some updates ( on windows services that 
> use RPC extensively such as MS SQL / SQL Browser) if your windows 10 
> environments are controlled by active directory you may have to set the 
> windows firewall settings in Group Policy (any more than this and im 
> wandering dangerously off OpenBSD Topic ) :) I hope this helps Thanks On 14 
> February 2018 at 15:52, Rupert Gallagher wrote: > This is a recurring problem 
> that is proving hard to fix. When windows 10 pro clients run their security 
> updates and the client restarts, they are unable to reconnect to the nfs 
> server. There is nothing wrong with the network, however, and the nfs servers 
> are up as usual. The only thing that recovers functionality is to stop and 
> restart portmap mountd and nfsd. Am I the only one with this problem? > > 
> Sent from ProtonMail Mobile -- Kindest regards, Tom Smyth Mobile: +353 87 
> 6193172 The information contained in this E-mail is intended only for the 
> confidential use of the named recipient. If the reader of this message is not 
> the intended recipient or the person responsible for delivering it to the 
> recipient, you are hereby notified that you have received this communication 
> in error and that any review, dissemination or copying of this communication 
> is strictly prohibited. If you have received this in error, please notify the 
> sender immediately by telephone at the number above and erase the message You 
> are requested to carry out your own virus check before opening any 
> attachment. @protonmail.com>

feature - native softraid-crypto for VMM virtio disk

2018-02-15 Thread Jiri B

Hi,

one cannot boot vmm-bios if not having newer hw than Westmere CPU.
And booting host kernel for a VM which has FDE does not work, that's clear.

What about a feature to support somehow softraid-crypto (or similar) for
vmctl create?

A variation for native LUKS support in QEMU:

qemu ... -object secret,id=sec0,data='secretpass' \
  -drive driver=luks,key-secret=sec0,file=diskfile

The use case here is not to have plain VMM disk file on
host (I'm using softraid-crypto for underlying device now).

Jiri



Re: pfstat and queueing

2018-02-15 Thread Kaya Saman



On 02/15/2018 01:34 PM, Stuart Henderson wrote:

On 2018/02/15 13:27, Kaya Saman wrote:


On 02/15/2018 12:13 PM, Stuart Henderson wrote:

On 2018-02-15, Kaya Saman  wrote:

does queueing still function with pfstat? As far as I'm aware it still
uses the old altq method which has long been abandoned.

you're correct, pfstat hasn't been updated to follow changes in PF for
a long time. the only change in pfstat since 2007 has been adding the
-f flag to copy/clean the database.



Thanks Stuart for the confirmation.


Hmm looks like this might be a feature request to Daniel then. or
someone who's working on pfstat :-)

Nobody is visibly working on pfstat.

If anyone did want to work on queue monitoring I'd encourage them to
look at adding to snmpd instead (it will need a custom MIB). There are
plenty of things that can monitor SNMP stats, and as it's in base,
there are no real worries about ABI getting out of sync.


Interesting!

I think I agree with SNMP. It would be great if pf could be monitored 
through net-snmp or the built in snmp. To be able to see what PF is 
doing in something like Observium, Zabbix, Cacti or any other SNMP based 
monitoring software would be a really nice asset.


Regards,

Kaya



Re: pfstat and queueing

2018-02-15 Thread Stuart Henderson
On 2018/02/15 13:27, Kaya Saman wrote:
> 
> 
> On 02/15/2018 12:13 PM, Stuart Henderson wrote:
> > On 2018-02-15, Kaya Saman  wrote:
> > > does queueing still function with pfstat? As far as I'm aware it still
> > > uses the old altq method which has long been abandoned.
> > you're correct, pfstat hasn't been updated to follow changes in PF for
> > a long time. the only change in pfstat since 2007 has been adding the
> > -f flag to copy/clean the database.
> > 
> > 
> 
> Thanks Stuart for the confirmation.
> 
> 
> Hmm looks like this might be a feature request to Daniel then. or
> someone who's working on pfstat :-)

Nobody is visibly working on pfstat.

If anyone did want to work on queue monitoring I'd encourage them to
look at adding to snmpd instead (it will need a custom MIB). There are
plenty of things that can monitor SNMP stats, and as it's in base,
there are no real worries about ABI getting out of sync.



Re: pfstat and queueing

2018-02-15 Thread Kaya Saman



On 02/15/2018 12:13 PM, Stuart Henderson wrote:

On 2018-02-15, Kaya Saman  wrote:

does queueing still function with pfstat? As far as I'm aware it still
uses the old altq method which has long been abandoned.

you're correct, pfstat hasn't been updated to follow changes in PF for
a long time. the only change in pfstat since 2007 has been adding the
-f flag to copy/clean the database.




Thanks Stuart for the confirmation.


Hmm looks like this might be a feature request to Daniel then. or 
someone who's working on pfstat :-)



Regards,


Kaya



Re: Why is so slow the download speed in OpenBSD?

2018-02-15 Thread Zsolt Kantor
Ok, in this case, what I understood is that the "optimal rate algorithm" needs 
to be updated, rewritten, corrected . . . etc. I was also a programmer once, 
and I know that this can't happen from one day to another, so as a workaround I 
propose the following: mention about these "issue" in the afterboot manual 
(afterboot - things to check after the first complete boot) . For more about 
afterboot type man afterboot.



On Thursday, February 15, 2018 1:46 AM, Charlie Eddy 
 wrote:



Nice!

>From Stefan's mail:
>"In the current implementation, the wifi layer selects a transmit rate 
>based>on the number of frame transmission retries reported by wpi(4) firmware."

That's the "automatically selected optimal media type", comme ci comme ca 
defined w/r/t the strictness of your definition.

>"If you find that one of these commands makes it work as fast as it does on
>Windows, we can conclude that the problem is with OpenBSD's rate selection
>algorithm. This algorithm is very old and dates from a time when wifi networks
>were much less densly deployed."


It looks like OpenBSD is like driving a beautiful old car. Malfunction doesn't 
make sense to say even though existing properties of the OS and existing 
properties of the world aren't making it easy.


On Wed, Feb 14, 2018 at 1:47 PM, Zsolt Kantor  wrote:


>
>Now, I just switched to OpenBSD, and executed the commands as you wrote down. 
>AND IT WORKS!
>You have more in depth network knowledge than me, so I just will write down 
>what I did, and I have also some questions related to that media option of the 
>ifconfig (which I, to be honest don't really understand).
>So, I used the same mirror (https://ftp2.eu.openbsd.org/ 
>pub/OpenBSD/6.2/amd64/) for testing and used only wget for downloads. With 
>wget the download speed is a bit higher compared to firefox or chromium, I 
>think because wget is more 'light', command line tool, more optimized 
>(probably the code is more clear), firefox and chromium opens slower maybe 
>also bloat in code, so the download rate is also less.
>Now back to the point. I logged in to Xfce, I opened a terminal with two tabs, 
>one for normal user, to execute the downloads, with the following command: 
>'wget https://ftp2.eu.openbsd.org/ pub/OpenBSD/6.2/amd64/ install62.fs', and 
>one for root user to use ifconfig to make those settings. After every ifconfig 
>change, I switched to the normal user tab and started the download process 
>(sometimes, when I saw some unusual fluctuation I interrupted the download 
>process and started again, waited a while to see what happens, than if the 
>download process was not stable I waited a little to be just sure, after that 
>started the process again and so on, to have a more precise report).
>Here are the test results:
>OFDM6: max: 1.30MB/s, min: 700KB/s (this config. is not stable, sometimes 
>drops from 1.20MB/s to 700KB and back)
>OFDM9: average: 1.45MB/s (more stable, do not drops above 1.30MB)
>OFDM12: quite stable as with OFDM9, sometimes reaches a max. of 1.70MB/s
>OFDM18: stable, average: 1.50MB (I saw also 1.80MB/s for fractions of seconds)
>OFDM24: At the first try was not stable, fluctuated between 900KB/s and 
>1.70Mb/s, at the second try it was stable, avg: 1.55MB/s (for fractions of 
>seconds 1.80MB/s), at the third, fourth . . . tries was stable, avg: 1.60MB
>OFDM36: quiet stable, avg: 1.55MB/s
>OFDM48: not so stable, 700KB/s, 800KB/s, rarely reaches  1000KB/s (but 
>immediately drops)
>OFDM54: not stable at all, between 700KB and 900KB (sometimes reaches 1.1MB/s, 
>rarely drops down to 300KB/s), the avg. rate is 700-750KB.
>
>These for the tests. Now, I have a few questions. In the ifconfig manual at 
>the media option states that if it is used with no arguments displays all 
>available media. In my case it looks like this:
>
>supported media:
>media autoselect
>media autoselect mediaopt monitor
>media autoselect mode 11a
>media autoselect mode 11a mediaopt monitor
>media autoselect mode 11b
>media autoselect mode 11b mediaopt monitor
>media autoselect mode 11g
>media autoselect mode 11g mediaopt monitor
>
>But what you proposed to me to try is OFDM6, 9, 12 . . . In the supported 
>media list I don't find those types, why?
>
>The second question is: now theoretically the problem is solved, to be honest 
>I have no clue about media types, radio frequencies and such things, but based 
>on my tests it's need to be corrected something in OpenBSD related to this 
>issue? Or it is more like a user side configuration? If somebody would ask me 
>I think the optimal media type should ne automatically selected by the system 
>(driver, firmware . . . I don't know who's in charge for this), and not by the 
>user (after the system is installed).
>That's all, thanks again. For me the problem is solved. You need to decide if 
>this is a malfunction or not.
>
>Thanks again.
>
>
>
>
>
>On Wednesday, February 14, 2018 9:36 PM, Zsolt 

Re: pfstat and queueing

2018-02-15 Thread Stuart Henderson
On 2018-02-15, Kaya Saman  wrote:
>
> does queueing still function with pfstat? As far as I'm aware it still 
> uses the old altq method which has long been abandoned.

you're correct, pfstat hasn't been updated to follow changes in PF for
a long time. the only change in pfstat since 2007 has been adding the
-f flag to copy/clean the database.




Re: Sharing files between OpenBSD, Linux, and Windows boxes

2018-02-15 Thread Kevin Chadwick
On Thu, 15 Feb 2018 10:17:22 +0100


> If you get motivated, there's probably some "mount this sftp server
> as a drive" software for windows, and then you can get rid of Samba.
> But I've never looked for such a thing.

These tend to be pay for and you may need to run ntfs as I found some
inconsistent Windows programs don't cope with case sensitive file
systems despite various tweaks. In my general experience, NTFS-3G isn't
as stable (can cause panics) as FFS or ro ntfs on OpenBSD though either.



pfstat and queueing

2018-02-15 Thread Kaya Saman

Hi,


does queueing still function with pfstat? As far as I'm aware it still 
uses the old altq method which has long been abandoned.



It would be great if pfstat would graph queues again but the config 
example in: /usr/local/share/examples/pfstat/pfstat.conf still has the 
old altq style?



Whenever I try to run it, the output is "queueing not supported". As I'm 
on -current the last os update broke it as referenced in the @list 
previously so will wait on the fix before testing again.



Regards,


Kaya





Ruby On Rails application with httpd

2018-02-15 Thread Wesley MOUEDINE ASSABY

Hi,

Is there a way to get a 'Ruby on Rails' application running with the 
embedded OpenBSD httpd(+slowcgi??) ?



Thank you very much anyway!

/Wesley



Re: pfstat not generating graphs after upgrading to -current

2018-02-15 Thread Stuart Henderson
On 2018-02-15, Theo Buehler  wrote:
> On Thu, Feb 15, 2018 at 12:29:23AM +, Stuart Henderson wrote:
>> On 2018-02-14, Glenn Faustino  wrote:
>> > Hi,
>> >
>> >
>> >> Did you upgrade your packages after upgrading to -current? Can you
>> >> share your /etc/pfstat.conf?
>> >
>> > Every time I upgrade to -current I also update packages.
>> 
>> Try forcing pfstat to update (pkg_delete and pkg_add maybe, if that
>> doesn't help then build it yourself from ports). If that helps then let
>> me know because we need to figure out what change necessitated this and
>> track down which ports need REVISION bumps to force updates..
>
> Henning's SYN-cookies came with an ABI break in the ioctl path for
> /dev/pf (after it was committed, at least pfctl and pflogd needed to be
> rebuilt).
>
> This diff seems to fix pfstat{,d} for me, but only superficially tested,
> as I don't use the port normally. It adds a missing header for time(3).

OK sthen@. Presumably it's because struct pf_status gained new members
in the middle (though the exact reason doesn't matter, whatever the
cause the fix is to rebuild).

I'm doing a search for other DIOCGETSTATUS users in ports and will take
care of the rest.




Re: Sharing files between OpenBSD, Linux, and Windows boxes

2018-02-15 Thread Alex Waite

On 02/15/2018 12:03 AM, Martin Hanson wrote:

How do you share files between OpenBSD, Linux, and Windows boxes?
[...]
How do you manage file sharing between these systems (if it all)?


Not sure what your environment is, but I'm a big fan of sshfs for light 
usage.


Then you can view Samba as a service for compatibility with the island 
that is windows.


* linux box hosts the data and shares via samba
* Win boxes connect via Samba
* All other *nix system connect using sshfs

If you get motivated, there's probably some "mount this sftp server as a 
drive" software for windows, and then you can get rid of Samba. But I've 
never looked for such a thing.


---Alex