ppppoe octeon kernel panic .6.6

2019-10-21 Thread Peter J. Philipp
Hi,

The mail from Holger Glaess seems to be missing a backtrace.  I got one, but
I have very little time today and tomorrow to debug anything, I have put a 
temporary replacement for the octeon pppoe router at my premises for the time
being.  

Also, I tried poking around in sppp_auth_send() in /sys/net/if_spppsubr.c but 
to no avail.  The fault lies in bcopy() in that function.  In the backtrace
it shows up as smallcpy().  When pppoe0 is disabled the kernel doesn't panic.

My bt follows with dmesg from my machine that was upgraded to 6.6.
After that Holger Glaess's mail which I had to fish out of my trash as I 
had accidentally deleted it.

saturn# cu -l /dev/cuaU0 -s 115200
Connected to /dev/cuaU0 (speed 115200)
btint
smallcpy+0x8 (1,980001b6e376,1,2)  ra 0x8125140c sp 0x98000ffdb
9b8, sz 0
sppp_auth_send+0x10c (1,980001b6e376,1,2)  ra 0x8124d294 sp 0x98000
ffdb9b8, sz 144
sppp_lcp_tlu+0x274 (1,980001b6e376,1,2)  ra 0x81246f64 sp 0x980
00ffdba48, sz 128
sppp_cp_input+0x141c (1,980001b6e376,1,2)  ra 0x81245458 sp 0x98000
ffdbac8, sz 112
sppp_input+0x1d0 (1,980001b6e376,1,2)  ra 0x810b5e74 sp 0x98000
ffdbb38, sz 80
pppoeintr+0xf9c (1,980001b6e376,1,2)  ra 0x813572c8 sp 0x98000f
fdbb88, sz 400
if_netisr+0x118 (1,980001b6e376,1,2)  ra 0x8145d48c sp 0x98000f
fdbd18, sz 80
taskq_thread+0x54 (1,980001b6e376,1,2)  ra 0x8127a0ec sp 0x9800
0ffdbd68, sz 80
proc_trampoline+0x1c (1,980001b6e376,1,2)  ra 0x0 sp 0x98000ffdbdb8, sz
 0
User-level: pid 81393
ddb{1}> show panic
the kernel did not panic
ddb{1}> boot reboot
System restart.
Jumping to start of image at address 0xbfca


U-Boot 2012.04.01 (UBNT Build ID: 4605996-gd120a44) (Build time: Oct 14 2013 - 
18:14:14)

Skipping PCIe port 0 BIST, in EP mode, can't tell if clocked.
Skipping PCIe port 1 BIST, reset not done. (port not configured)
BIST check passed.
UBNT_E200 r1:1, r2:9, serial #: 24A43C069F12
Core clock: 800 MHz, IO clock: 600 MHz, DDR clock: 533 MHz (1066 Mhz DDR)
Base DRAM address used by u-boot: 0x8f80, size: 0x80
DRAM: 2 GiB
Clearing DRAM.. done
Flash: 8 MiB
Net:   octeth0, octeth1, octeth2, octeth3, octeth4, octeth5, octeth6, octeth7
MMC:   Octeon MMC/SD0: 0
USB:   USB EHCI 1.00
scanning bus for devices... cannot reset port 1!?
1 USB Device(s) found
Type the command 'usb start' to scan for USB storage devices.

Hit any key to stop autoboot:  0
reading boot

3122300 bytes read
argv[2]: numcores=2
Allocating memory for ELF segment: addr: 0x8200 (adjusted to: 
0x200), size 0x330d50
## Loading big-endian Linux kernel with entry point: 0x8200 ...
Bootloader: Done loading app on coremask: 0x3
Starting cores 0x3
bootmem desc 0x48108 version 3.0
avail phys mem 0x001004d0 - 0x01fffbc0
skipped
avail phys mem 0x02330d50 - 0x0f10
avail phys mem 0x0f100020 - 0x0f100080
avail phys mem 0x0f1000a0 - 0x0fffd700
avail phys mem 0x2000 - 0x8f80
Total DRAM Size 0x8000
mem_layout[0] page 0x08CD -> 0x3C40
mem_layout[1] page 0x3C41 -> 
0x3FF)+"ij}"}Rj$}"}R$}}Rj$}B}Rj$}B}Rj$}
Rj$}2ij}}{j}"}R$Rj$}"}}Rj$}*R$}}}R$}}}Rj$}$}R}}Rj$2}{j$}R$}Rj$}}j}}RR}Rj$}"}{j}Copyright989,
 1991, 1egents of the y of Califhtorg

OpenBSD 6.6 (BOOT) #97: Sat Oct 12 06:00:20 MDT 2019
dera...@octeon.openbsd.org:/usr/src/sys/arch/octeon/compile/BOOT
real mem = 2147483648 (2048MB)
avail mem = 2083438592 (1986MB)
mainbus0 at root: board 20003 rev 1.9
cpu0 at mainbus0: CN61xx CPU rev 0.1 800 MHz, Software FP emulation
cpu0: cache L1-I 37KB 37 way D 32KB 32 way, L2 1024KB 8 way
clock0 at mainbus0: int 5
iobus0 at mainbus0
simplebus0 at iobus0: "soc"
octciu0 at simplebus0
"gpio-controller" at simplebus0 not configured
"mdio" at simplebus0 not configured
"mdio" at simplebus0 not configured
"pip" at simplebus0 not configured
"i2c" at simplebus0 not configured
"i2c" at simplebus0 not configured
com0 at simplebus0: ns16550a, 64 byte fifo
com0: console
com1 at simplebus0: ns16550a, 64 byte fifo
com1: probed fifo depth: 0 bytes
"spi" at simplebus0 not configured
octmmc0 at simplebus0
sdmmc0 at octmmc0: 8-bit, mmc high-speed
"bootbus" at simplebus0 not configured
"dma-engine" at simplebus0 not configured
"dma-engine" at simplebus0 not configured
octuctl0 at simplebus0
ehci0 at octuctl0
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Octeon EHCI root hub" rev 2.00/1.00 
addr 1
ohci0 at octuctl0, version 1.0
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "Octeon OHCI root hub" rev 1.00/1.00 
addr 1
octpcie0 at iobus0: 2 ports
octpcie0 port 1: reset timeout
"American Power Conversion Back-UPS CS 650 FW:817.v9.I USB FW:v9" rev 1.10/0.06 
addr 2 at uhub1 port 1 not configured
scsibus0 at sdmmc0: 2 targets, initiator 0
sd0 at 

Re: OpenBSD and doas xterm pftop

2019-10-21 Thread Martijn van Duren
On 10/21/19 10:35 PM, Peter Fraser wrote:
> I was surprised that after upgrading to 6.6 that
> 
> doas xterm pftop & 
> 
> fails with:
> 
> Warning: This program is an suid-root program or is being run by the root 
> user.
> The full text of the error or warning message cannot be safely formatted
> in this environment. You may get a more descriptive message by running the
> program as a non-root user or by removing the suid bit on the executable.
> xterm: Xt error: Can't open display: %s
> 
> This is the result of the change in the behavior of doas.
> Quoting from the upgrade manual
> 
> doas(1). The environment variable handling in doas(1) has been changed. In 
> particular HOME and PATH are now reset to the target user.
> 
> I assume that the problem arises because .Xauthority cannot be found
> 
> Pass HOME and PATH in doas.conf allows the old behavior.
> 
This is primarily the reason for changing doas' behaviour.
Not Xauthority per say, but reaching back to he caller's home directory
allowing arbitrary files to be loaded and potentially executed as
another user in a way not intended potentially leading to privilege
escalation.

Instead of setenving HOME and PATH I suggest you change the command to
xterm -e doas pftop &
or if your needs are covered
xterm -e doas systat states &

martijn@



After sysupgrade to 6.6 from 6.5, xfce display alternates between desktop and app

2019-10-21 Thread Jon Fineman
So I read through the two threads below which both point to the third link 
about xfwm4 composter.
I am not sure if I have the exact same issue. While you could say my screen 
flickers - what it really
does is randomly (to my eyes) show the desktop and then show any open apps I 
might have while hiding
the title bar. If I click around or move the cursor around the title bar area 
it will alternate between the desktop
and apps. If I leave the display alone every 1-4 seconds the display will flip.

Via .xsessions turning the composter off or setting it to xpresent freezes the 
screen to show just
the desktop. Clicking doesn't change the view or bring forward or hide any apps.
However I found if I switch to a non XFCE tty and back the display will change 
to what I tried to click on.

Any thoughts on what I might experiment with or investigate further?

Thanks.

Jon


https://marc.info/?l=openbsd-misc=157150424810780=2

https://www.reddit.com/r/openbsd/comments/dk675z/chrome_slow_high_cpu_on_openbsd_66/

https://git.xfce.org/xfce/xfwm4/tree/COMPOSITOR#n114



My dmesg:

OpenBSD 6.6 (GENERIC.MP) #372: Sat Oct 12 10:56:27 MDT 2019
 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 5978714112 (5701MB)
avail mem = 5784797184 (5516MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0xdf266000 (27 entries)
bios0: vendor Insyde Corp. version "V1.00" date 03/20/2017
bios0: Acer Aspire A315-21
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP MSDM BOOT HPET MCFG WDAT UEFI SSDT IVRS SSDT SSDT SSDT 
UEFI SPCR SSDT CRAT TPM2 FPDT ASF! WDRT VFCT SSDT APIC SSDT BGRT
acpi0: wakeup devices GPP1(S4) GPP4(S4) GFX0(S4) GFX1(S4) GFX2(S4) GFX3(S4) 
GFX4(S4) EHC1(S3) XHC0(S3)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpihpet0 at acpi0: 14318180 Hz
acpimcfg0 at acpi0
acpimcfg0: addr 0xf800, bus 0-63
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 16 (boot processor)
cpu0: AMD A9-9420 RADEON R5, 5 COMPUTE CORES 2C+3G, 2994.81 MHz, 15-70-00
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,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,TCE,NODEID,TBM,CPCTR,DBKP,PERFTSC,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,XSAVEOPT
cpu0: 96KB 64b/line 3-way I-cache, 32KB 64b/line 8-way D-cache, 1MB 64b/line 
16-way L2 cache
cpu0: ITLB 48 4KB entries fully associative, 24 4MB entries fully associative
cpu0: DTLB 64 4KB entries fully associative, 64 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 17 (application processor)
cpu1: AMD A9-9420 RADEON R5, 5 COMPUTE CORES 2C+3G, 2994.38 MHz, 15-70-00
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,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,TCE,NODEID,TBM,CPCTR,DBKP,PERFTSC,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,XSAVEOPT
cpu1: 96KB 64b/line 3-way I-cache, 32KB 64b/line 8-way D-cache, 1MB 64b/line 
16-way L2 cache
cpu1: ITLB 48 4KB entries fully associative, 24 4MB entries fully associative
cpu1: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative
cpu1: smt 1, core 0, package 0
ioapic0 at mainbus0: apid 4 pa 0xfec0, version 21, 24 pins, remapped
ioapic1 at mainbus0: apid 5 pa 0xfec01000, version 21, 32 pins, remapped
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (GPP0)
acpiprt2 at acpi0: bus 2 (GPP1)
acpiprt3 at acpi0: bus 3 (GPP2)
acpiprt4 at acpi0: bus -1 (GPP3)
acpiprt5 at acpi0: bus -1 (GPP4)
acpiprt6 at acpi0: bus -1 (GFX0)
acpiprt7 at acpi0: bus -1 (GFX1)
acpiprt8 at acpi0: bus -1 (GFX2)
acpiprt9 at acpi0: bus -1 (GFX3)
acpiprt10 at acpi0: bus -1 (GFX4)
acpiec0 at acpi0
acpicpu0 at acpi0: C2(0@400 io@0x414), C1(@1 halt!), PSS
acpicpu1 at acpi0: C2(0@400 io@0x414), C1(@1 halt!), PSS
acpipwrres0 at acpi0: WRST
acpipwrres1 at acpi0: P0U3, resource for XHC0
acpipwrres2 at acpi0: P3U3, resource for XHC0
acpipwrres3 at acpi0: P0U2, resource for EHC1
acpipwrres4 at acpi0: P3U2, resource for EHC1
acpipwrres5 at acpi0: P0SD, resource for SDIO
acpipwrres6 at acpi0: P3SD, resource for SDIO
acpipwrres7 at acpi0: P0ST, resource for SATA
acpipwrres8 at acpi0: P3ST, resource for SATA
acpitz0 at acpi0: critical temperature is 100 degC
acpibtn0 at acpi0: PWRB
acpipci0 at acpi0 PCI0: 0x0010 0x0011 0x
acpicmos0 at acpi0
"PNP0C14" at acpi0 not configured
"PNP0C14" at acpi0 not configured
acpibtn1 at acpi0: SLPB
acpiac0 at acpi0: AC unit 

acme-client issue with domain w/ alternative name

2019-10-21 Thread Ian Darwin
Today acme-client renewed all but 2 of my domains; the two that have 
"alternative names"
in the certificates. I cannot get it to renew those two.  This is on amd64 on 
6.6-current,
updated today.

My acme-config.conf is the latest example version, with the v2 URLs and with 
example.com replaced by
my domains.

#
# $OpenBSD: acme-client.conf,v 1.2 2019/06/07 08:08:30 florian Exp $
#
authority letsencrypt {
api url "https://acme-v02.api.letsencrypt.org/directory;
account key "/etc/acme/letsencrypt-privkey.pem"
}

authority letsencrypt-staging {
api url "https://acme-staging-v02.api.letsencrypt.org/directory;
account key "/etc/acme/letsencrypt-staging-privkey.pem"
}

domain androidcookbook.com {
alternative names { androidcookbook.net }
domain key "/etc/ssl/private/androidcookbook.com.key"
domain certificate "/etc/ssl/androidcookbook.com.crt"
domain full chain certificate 
"/etc/ssl/androidcookbook.com.fullchain.pem"
sign with letsencrypt
}
domain annabot.org {
domain key "/etc/ssl/private/annabot.org.key"
domain certificate "/etc/ssl/annabot.org.crt"
domain full chain certificate 
"/etc/ssl/annabot.org.fullchain.pem"
sign with letsencrypt
}
...

The first domain fails, the second one succeeded.

$ doas acme-client androidcookbook.com
acme-client: 172.65.32.248: tls_close: EOF without close notify
acme-client: 172.65.32.248: tls_close: EOF without close notify
acme-client: 172.65.32.248: tls_close: EOF without close notify
acme-client: 172.65.32.248: tls_close: EOF without close notify
acme-client: 172.65.32.248: tls_close: EOF without close notify
acme-client: 172.65.32.248: tls_close: EOF without close notify
acme-client: 172.65.32.248: tls_close: EOF without close notify
$ echo $?
1
$ 

IDK what those EOF w/o notify are caused by, but the domains that worked
also gave a similar bunch of that message.

Running with -v does not give any useful info except it ends with -1:

$ doas acme-client -v -F androidcookbook.com
acme-client: /etc/ssl/androidcookbook.com.crt: certificate renewable: 29 days 
left
acme-client: https://acme-v02.api.letsencrypt.org/directory: directories
acme-client: acme-v02.api.letsencrypt.org: DNS: 172.65.32.248
acme-client: 172.65.32.248: tls_close: EOF without close notify
acme-client: 172.65.32.248: tls_close: EOF without close notify
acme-client: dochngreq: 
https://acme-v02.api.letsencrypt.org/acme/authz-v3/882690343
acme-client: 172.65.32.248: tls_close: EOF without close notify
acme-client: challenge, token: 22zE2mRAquYtRmY0lMxiCVfYXcTLEUEm78rRa6Nt0So, 
uri: https://acme-v02.api.letsencrypt.org/acme/chall-v3/882690343/im5q-Q, 
status: 0
acme-client: /var/www/acme/22zE2mRAquYtRmY0lMxiCVfYXcTLEUEm78rRa6Nt0So: created
acme-client: 
https://acme-v02.api.letsencrypt.org/acme/chall-v3/882690343/im5q-Q: challenge
acme-client: 172.65.32.248: tls_close: EOF without close notify
acme-client: dochngreq: 
https://acme-v02.api.letsencrypt.org/acme/authz-v3/882690357
acme-client: 172.65.32.248: tls_close: EOF without close notify
acme-client: challenge, token: XQm6jdVi6yzlFJHP8ucI8d3AenQFl81KqfC4tNlaDsU, 
uri: https://acme-v02.api.letsencrypt.org/acme/chall-v3/882690357/7cuNOw, 
status: 0
acme-client: /var/www/acme/XQm6jdVi6yzlFJHP8ucI8d3AenQFl81KqfC4tNlaDsU: created
acme-client: 
https://acme-v02.api.letsencrypt.org/acme/chall-v3/882690357/7cuNOw: challenge
acme-client: 172.65.32.248: tls_close: EOF without close notify
acme-client: 172.65.32.248: tls_close: EOF without close notify
acme-client: order.status -1
acme-client: bad exit: netproc(82984): 1
$ 


Any thoughts or more info? Thx.



wireguard and nat redirection issue

2019-10-21 Thread 4642
Hi, I have setup a Wireguard server on my home network and I can get my phone 
to connect to the WG server over the Internet but from my local lan I am having 
nat issues that I have been unable to resolve and wondered if someone could 
help ?

After reading the NAT man pages I moved my WireGuard server onto it's own 
network / vlan as I though that by doing that I would be able to get a combo of 
nat / rdr rules to redirect the traffic from my default lan onto the wireguard 
vlan but this just doesn't seem to be working. I can see the WG traffic coming 
in on the lan interface but it just keeps heading for public IP address.

  IP 95.x.x.x
  Port 51820
  Proto: UDP
My Wireless access point is 192.168.1.70

Firewall = APU1c, with three interfaces.
re0 = lan
re1 = the wireguard vlan
re2 = pppoe0

tcpdump -n -i re0 port 51820
Oct 21 23:35:16.061166 58:c5:cb:xx:xx:xx 00:0d:b9:yy:yy:yy 0800 190: 
192.168.1.70.42332 > 95.x.x.x.51820: udp 148 (DF)
Oct 21 23:35:21.317678 58:c5:cb:xx:xx:xx 00:0d:b9:yy:yy:yy 0800 190: 
192.168.1.70.42332 > 95.x.x.x.51820: udp 148 (DF)

tcpdump -n -i vlan010 = nothing

...

lan_if= "re0"
wg_if = "vlan010"
wg_svr = "192.168.2.2/32"

table  { 0.0.0.0/8 10.0.0.0/8 127.0.0.0/8 169.254.0.0/16 
172.16.0.0/12 192.0.0.0/24 192.0.2.0/24 224.0.0.0/3 192.168.0.0/16 
198.18.0.0/15 198.51.100.0/24 203.0.113.0/24 }
set block-policy drop
set loginterface egress
set skip on lo0
match in all scrub (no-df random-id max-mss 1440)
match out on egress inet from !(egress:network) to any nat-to (egress:0)
antispoof quick for { egress $lan_if $wg_if }
block in quick on egress from  to any
block return out quick on egress from any to 
block log all

## Egress ###
pass in on egress inet proto udp  from anyto (egress:0)  port 51820 
rdr-to $wg_svr
pass out quick on egress inet

##  LAN ###
pass  in   on $lan_if inet proto udp  from anyto (egress:0)  
port 51820 rdr-to $wg_svr
pass  in   on $lan_if inet
pass out quick on $lan_if inet

##  WG ###
pass  in   on $wg_if inet
pass out quick on $wg_if inet

Thanks for looking.
Keith.


OpenBSD and doas xterm pftop

2019-10-21 Thread Peter Fraser
I was surprised that after upgrading to 6.6 that

doas xterm pftop & 

fails with:

Warning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm: Xt error: Can't open display: %s

This is the result of the change in the behavior of doas.
Quoting from the upgrade manual

doas(1). The environment variable handling in doas(1) has been changed. In 
particular HOME and PATH are now reset to the target user.

I assume that the problem arises because .Xauthority cannot be found

Pass HOME and PATH in doas.conf allows the old behavior.



Re: Two part question on httpd

2019-10-21 Thread Jeremy
Thank you for these links.

These related projects are what inspired me to head down this path,
however they seem focused on using sqlite, which I do not wish to
use.

I currently use sqlite in other software and run into both performance
and scalability issues. Hence my interest in mysql based dbs.

Regards,
-J


On Mon, Oct 21, 2019 at 2:37 PM Justin Noor  wrote:

> Try these sites:
>
> https://learnbchs.org
> https://kristaps.bsd.lv/kcgi
>
> On Mon, Oct 21, 2019 at 11:20 AM Jeremy  wrote:
>
>> Hello,
>>
>> I am experimenting with httpd's cgi options.
>>
>> Why when I run binaries written in C from /var/www/cgi-bin, it's allowed
>> but if I use other compiled languages (ex: Haskell) I need to adjust the
>> wxallowed options for where /var/www/cgi-bin is mounted?
>>
>> Is this due to where it says: "...The base system has no W^X-violating
>> programs, but the ports tree contains quite a few" in the following?
>> https://www.openbsd.org/faq/upgrade60.html
>>
>> Additionally, if c/c++ are indeed the few compiled languages which do
>> not violate this option, where might one find a library to write a
>> C program which interacts with mysql/mariadb? So far, I have only found
>> mysql++ and would prefer not to use c++ unless there are no other
>> options. My goal is to write a simple REST api which interacts with
>> mysql, and serves via httpd. I already have one written in PHP, but
>> would like to port it to a compiled language.
>>
>> Regards,
>>
>> -J
>>
>


Re: Two part question on httpd

2019-10-21 Thread Stuart Henderson
On 2019-10-21, Jeremy  wrote:
> Why when I run binaries written in C from /var/www/cgi-bin, it's allowed
> but if I use other compiled languages (ex: Haskell) I need to adjust the
> wxallowed options for where /var/www/cgi-bin is mounted?

Most compiled languages don't need w+x across the board (though might
do for certain software). afaik GHC-compiled things do require w+x mappings.

> Additionally, if c/c++ are indeed the few compiled languages which do
> not violate this option, where might one find a library to write a
> C program which interacts with mysql/mariadb? So far, I have only found
> mysql++ and would prefer not to use c++ unless there are no other
> options.

libmariadb (similar to the old libmysqlclient) works with C..



Re: Two part question on httpd

2019-10-21 Thread Justin Noor
Try these sites:

https://learnbchs.org
https://kristaps.bsd.lv/kcgi

On Mon, Oct 21, 2019 at 11:20 AM Jeremy  wrote:

> Hello,
>
> I am experimenting with httpd's cgi options.
>
> Why when I run binaries written in C from /var/www/cgi-bin, it's allowed
> but if I use other compiled languages (ex: Haskell) I need to adjust the
> wxallowed options for where /var/www/cgi-bin is mounted?
>
> Is this due to where it says: "...The base system has no W^X-violating
> programs, but the ports tree contains quite a few" in the following?
> https://www.openbsd.org/faq/upgrade60.html
>
> Additionally, if c/c++ are indeed the few compiled languages which do
> not violate this option, where might one find a library to write a
> C program which interacts with mysql/mariadb? So far, I have only found
> mysql++ and would prefer not to use c++ unless there are no other
> options. My goal is to write a simple REST api which interacts with
> mysql, and serves via httpd. I already have one written in PHP, but
> would like to port it to a compiled language.
>
> Regards,
>
> -J
>


Two part question on httpd

2019-10-21 Thread Jeremy
Hello,

I am experimenting with httpd's cgi options.

Why when I run binaries written in C from /var/www/cgi-bin, it's allowed
but if I use other compiled languages (ex: Haskell) I need to adjust the
wxallowed options for where /var/www/cgi-bin is mounted?

Is this due to where it says: "...The base system has no W^X-violating
programs, but the ports tree contains quite a few" in the following?
https://www.openbsd.org/faq/upgrade60.html

Additionally, if c/c++ are indeed the few compiled languages which do
not violate this option, where might one find a library to write a
C program which interacts with mysql/mariadb? So far, I have only found
mysql++ and would prefer not to use c++ unless there are no other
options. My goal is to write a simple REST api which interacts with
mysql, and serves via httpd. I already have one written in PHP, but
would like to port it to a compiled language.

Regards,

-J


Re: OpenBSD 6.6 amd64 iavf(4) iavf / SR-iov 40G NIC lots of Jitter

2019-10-21 Thread Consus
On 13:33 Sun 20 Oct, Joseph Mayer wrote:
> Tom, is not the jitter you are experiencing totally normal overhead
> for a hypervisor.

Are you sure? E.g. VM (centos) on busy as hell Proxmox instance:

# ping -c 5 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=47 time=4.96 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=47 time=5.42 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=47 time=6.90 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=47 time=5.29 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=47 time=7.37 ms

--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 4.961/5.993/7.378/0.961 ms