ODROID C1

2015-02-03 Thread Jan
Agh, wrong list.
a...@openbsd.org



ODROID C1

2015-02-03 Thread Jan
Hi,
I habe a BBB. I played with obenbsd 5.5 on it. It is fun, but I can not 
recommend it as a server. I don't know what you mean by server, but for me it's 
too slow (with openbsd on it). I used Debian for a short time on the BBB. It 
runs faster than openbsd, but I don't want to use Debian for my home 
'production' network. 
Finally I thought of using it as a openbsd music jukebox but with audio over 
HDMI, that's not possible at the moment.
I will go for a apu1d4 or similar when it's time for new home server hardware. 

Jan



Erratic fan speeds (X230)

2015-02-03 Thread Toby Slight
Hi there fabulous OpenBSD people,

I have recently installed a snapshot from 1st February on my shiny,
somewhat new ThinkPad X230. Everything works wonderfully (almost!), and I
am thoroughly enjoying learning about OpenBSD. However I have one very
minor issue that I was hoping to get some feedback on.

The laptop runs at roughly the same temperature as when running under Linux
and Windows (typically between 35-50C depending on load), however, whereas
under Windows and Linux the fans remain completely dormant (0 rpm) most of
the time (only really kicking in once temperatures exceed 50C for prolonged
periods) - on OpenBSD the fans will constantly spin up and down, seemingly
haphazardly - sometimes all the way up to 3500rpm - whilst the temperatures
remain at comfortable levels, and the CPU usage is utterly minimal.

For instance over the last hour my fan has gone from 0 - 3000rpm numerous
times despite $ sysctl hw.sensors reporting constant temperatures between
35-44C, and CPU usage remainly consistently below 10% on all cores. I
wouldn't really mind that much, except the fan in the X230 is particularly
loud and obnoxious above 2000rpm and draws quite a lot of unwanted
attention in lectures!

I understand that there is nothing analogous to tpfancontrol under OpenBSD,
or any other way of controlling the fan speed. Therefore, my question is
does anyone else have this generation of ThinkPad running OpenBSD, and is
this typical, or perhaps just a recent regression in -current? Also, is
anyone doing any work in this area, and if so, is there anything I could do
to help? I'm only a 1st year CS student so I very much doubt my shitty
programming skills would be of much value (other than as comedy!), but I'd
really like to help in any other way I can - ie, testing patches, etc.

Finally, if other's are using this generation of ThinkPad, I wondered what
BIOS versions you have and whether downgrading my BIOS may help (I'm on the
latest 2.66), or perhaps if turning off hyperthreading or multiprocessor
support in the BIOS  (and just using the GENERIC kernel) could have an
effect?

Anyway, here is my dmesg and sysctl output (both bsd.sp  bsd,mp - oddly
the sp kernel produces different sysctl sensor values - why is that?). If
there's anything else I can provide, please let me know.

Kind Regards,

Toby

P.S. I have tried apmd with both -A and -L flags. This does lower the
temperature, but doesn't affect fanspeed.

GENERIC.MP:

$ sysctl hw.sensors | egrep 'temp|fan'
hw.sensors.cpu0.temp0=38.00 degC
hw.sensors.cpu1.temp0=38.00 degC
hw.sensors.cpu2.temp0=38.00 degC
hw.sensors.cpu3.temp0=38.00 degC
hw.sensors.acpitz0.temp0=43.00 degC (zone temperature)
hw.sensors.acpithinkpad0.fan0=2570 RPM

GENERIC:

$ sysctl hw.sensors | egrep 'temp|fan'
hw.sensors.cpu0.temp0=40.00 degC
hw.sensors.acpitz0.temp0=42.00 degC (zone temperature)
hw.sensors.acpithinkpad0.temp0=42.00 degC
hw.sensors.acpithinkpad0.temp1=42.00 degC
hw.sensors.acpithinkpad0.temp2=42.00 degC
hw.sensors.acpithinkpad0.temp3=42.00 degC
hw.sensors.acpithinkpad0.temp4=42.00 degC
hw.sensors.acpithinkpad0.temp5=42.00 degC
hw.sensors.acpithinkpad0.temp6=42.00 degC
hw.sensors.acpithinkpad0.temp7=42.00 degC
hw.sensors.acpithinkpad0.fan0=2572 RPM

OpenBSD 5.7-beta (GENERIC.MP) #831: Sun Feb  1 12:35:14 MST 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8237064192 (7855MB)
avail mem = 8013914112 (7642MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdae9c000 (68 entries)
bios0: vendor LENOVO version G1ETA6WW (2.66 ) date 08/19/2014
bios0: LENOVO 2349VFV
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC TCPA SSDT SSDT SSDT HPET APIC MCFG ECDT FPDT
ASF! UEFI UEFI POAT SSDT SSDT UEFI DBG2
acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP3(S4) XHCI(S3) EHC1(S3)
EHC2(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.51 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,X
SAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.11 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX

Re: sudo nohup tcpdump at startup

2015-02-03 Thread Leclerc, Sebastien
On 2015-02-03 04:16:04, Ted Unangst t...@tedunangst.com wrote:
 This is the kind of thing I usually put in a small script, and add to root's
 crontab. I don't think you need the nohup and sudo, that's probably just
 complicating things. e.g.

 #!/bin/sh
 tcpdump -n | logger 2 error.log 

 then
 @reboot /root/tcpdump.sh

Works for me!

Sebastien



Re: Raspberry Pi 2 Model B

2015-02-03 Thread Christer Solskogen
On Tue, Feb 3, 2015 at 3:27 AM, Theo de Raadt dera...@cvs.openbsd.org wrote:
 Cheaper toys:

 http://www.ebay.com/sch/i.html?_from=R40_sacat=0_nkw=toy_sop=15rt=nc


That being funny and all, if there are any devs that want a rPIv2 to
play with, I'll be more than happy paying for it (and shipping).

-- 
chs



Re: Raspberry Pi 2 Model B

2015-02-03 Thread Stuart Henderson
On 2015-02-02, Janne Johansson icepic...@gmail.com wrote:
 But it still requires a blob to actually run, does it not?

Not sure... It's no different on the 2 than the original pi (same GPU/boot
mechanism), but there is a project https://github.com/jncronin/rpi-boot which
claims to be an alternative second-stage so perhaps it's possible that way..

First-stage bootloader is pre-programmed on the board. It loads the second-
stage from SD card to the GPU and starts it.

Second-stage bootloader runs on the gpu and loads start.elf (3rd stage) which
contains gpu firmware (actually an RTOS which stays running) and which boots
the main cpu. The RTOS has a message passing interface used for GPU access
from the main OS, so one area of concern is how that handles malicious inputs.
It sets up a memory split between GPU/CPU at boot but it's unclear how this
is protected if at all; one important question is whether the code running
on the GPU can access CPU memory after boot. There are scary things on common
x86 systems too of course (network-accessible management processors running
crappy software sitting on the same i2c bus as the EEPROM containing the BIOS;
a payload inserted to code running in SMM would have a lot of access ...)

For all of the posts with people asking about OpenBSD on the rpi I don't think
I've seen a single one along the lines of I've done x and y (see this diff)
but am stuck on getting z to work, I only remember ones that are more like
can somebody port OpenBSD to the rpi for me. (Hint: if somebody is willing/
able/interested/stubborn enough to do this, posts like that will be totally
off the radar).



Re: BGPD.conf - Clue needed

2015-02-03 Thread Stuart Henderson
On 2015-02-03, Rod Whitworth glis...@witworx.com wrote:
 There has been a suggestion that $Best should be seeing the /21 as two /22s 
 which would 
 make it a more preferable path.

 Any suggestions?

 I don't like unaggreated net blocks and I don't know how to modify the bgpd 
 config to do 
 that either.

I think this is an occasion where deaggregation is the only way to do what you 
need.
Because some networks filter on RIR minimum allocations, it may be beneficial to
continue to advertise the /21 over both transits, and make the /22s additional
(rather than replacing /21 with 2x/22).

In terms of bgpd config, add network lines for the two /22's, and use filters
to selectively advertise them.

Good luck with the op Rod, I hope it goes well.



Re: Raspberry Pi 2 Model B

2015-02-03 Thread Lampshade
Hello
I haven't know that Raspberry Pi is so closed that it requires closed source 
blob to even boot. Thanks for responses. I am not going to buy Raspberry Pi 2 
any more (or at least when blob will be open source).
Have a good day.



Dell Latitude D531 hangs on boot unless radeondrm disabled

2015-02-03 Thread Martin Gignac
Hi,

This morning I installed the latest 5.7 snapshot from install57.fs and I've
noticed that, unless I disable radeondrm in the kernel, the boot process
hangs at setting tty flags. By disabling radeondrm I can successfully
boot to the login prompt, but I am not able to start X.

Is there a workaround to enable a successful boot of the device that would
still allow me to start X?

Thanks,
-Martin

DMESG output:

OpenBSD 5.7-beta (GENERIC) #778: Mon Feb  2 13:42:21 MST 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 787177472 (750MB)
avail mem = 762437632 (727MB)
User Kernel Config
UKC disable radeondrm
212 radeondrm* disabled
UKC quit
Continuing...
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf6de0 (58 entries)
bios0: vendor Dell Inc. version A05 date 04/03/2008
bios0: Dell Inc. Latitude D531
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC ASF! MCFG TCPA SSDT SLIC
acpi0: wakeup devices PCI0(S5) PCIE(S4) USB1(S0) USB2(S0) USB3(S0) USB4(S0)
USB5(S0) EHCI(S0) AZAL(S3) RP01(S3) RP02(S3) RP03(S5) RP04(S3) RP05(S3)
LID_(S3) PBTN(S4)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpihpet0 at acpi0: 14318180 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Mobile AMD Sempron(tm) Processor 3600+, 1995.33 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,CX16,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW,LAHF,EAPICSP,AMCR8,3DNOWP
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 256KB
64b/line 16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 21, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 1
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpiprt0 at acpi0: bus 3 (PCIE)
acpiprt1 at acpi0: bus 1 (AGP_)
acpiprt2 at acpi0: bus -1 (RP01)
acpiprt3 at acpi0: bus 11 (RP02)
acpiprt4 at acpi0: bus 9 (RP03)
acpiprt5 at acpi0: bus -1 (RP04)
acpiprt6 at acpi0: bus -1 (RP05)
acpiprt7 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0: C3, PSS
acpitz0 at acpi0: critical temperature is 95 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: PBTN
acpibtn2 at acpi0: SBTN
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model DELL MM1588 serial 1645 type LION oem
Sanyo
acpibat1 at acpi0: BAT1 not present
acpidock0 at acpi0: GDCK not docked (0)
acpivideo0 at acpi0: VID_
acpivideo1 at acpi0: VID_
cpu0: PowerNow! K8 1995 MHz: speeds: 2000 1800 1600 800 MHz
pci0 at mainbus0 bus 0
0:18:0: mem address conflict 0xfec01000/0x400
pchb0 at pci0 dev 0 function 0 ATI RS690 Host rev 0x00
ppb0 at pci0 dev 1 function 0 ATI RS690 PCIE rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 5 function 0 ATI Radeon X1250 IGP rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ppb1 at pci0 dev 5 function 0 ATI RS690 PCIE rev 0x00: msi
pci2 at ppb1 bus 11
Broadcom BCM4315 rev 0x01 at pci2 dev 0 function 0 not configured
ppb2 at pci0 dev 6 function 0 ATI RS690 PCIE rev 0x00: msi
pci3 at ppb2 bus 9
bge0 at pci3 dev 0 function 0 Broadcom BCM5755M rev 0x02, BCM5755 A2
(0xa002): msi, address 00:21:70:6e:da:2b
brgphy0 at bge0 phy 1: BCM5755 10/100/1000baseT PHY, rev. 0
ahci0 at pci0 dev 18 function 0 ATI SB600 SATA rev 0x00: apic 1 int 22,
AHCI 1.1
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: ATA, FUJITSU MHZ2080B, 0085 SCSI3 0/direct
fixed naa.50e0424e043d
sd0: 76319MB, 512 bytes/sector, 156301488 sectors
ohci0 at pci0 dev 19 function 0 ATI SB600 USB rev 0x00: apic 1 int 16,
version 1.0, legacy support
ohci1 at pci0 dev 19 function 1 ATI SB600 USB rev 0x00: apic 1 int 17,
version 1.0, legacy support
ohci2 at pci0 dev 19 function 2 ATI SB600 USB rev 0x00: apic 1 int 18,
version 1.0, legacy support
ohci3 at pci0 dev 19 function 3 ATI SB600 USB rev 0x00: apic 1 int 17,
version 1.0, legacy support
ohci4 at pci0 dev 19 function 4 ATI SB600 USB rev 0x00: apic 1 int 18,
version 1.0, legacy support
ehci0 at pci0 dev 19 function 5 ATI SB600 USB2 rev 0x00: apic 1 int 20
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 ATI EHCI root hub rev 2.00/1.00 addr 1
piixpm0 at pci0 dev 20 function 0 ATI SBx00 SMBus rev 0x14: SMI
iic0 at piixpm0
spdmem0 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
pciide0 at pci0 dev 20 function 1 ATI SB600 IDE rev 0x00: DMA, channel 0
configured to compatibility, channel 1 configured to compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus2 at atapiscsi0: 2 targets
cd0 at scsibus2 targ 0 lun 0: SONY, CDRWDVD CRX880A, KD09 ATAPI 5/cdrom
removable
cd0(pciide0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2
azalia0 at pci0 dev 20 

Example httpd.conf minor spelling mistake

2015-02-03 Thread Michael
Hi all,
Just noticed a minor spelling mistake in the example httpd.conf.
Regards,
Michael

diff -u /etc/examples/httpd.conf httpd.conf
--- /etc/examples/httpd.confThu Jan 22 19:03:06 2015
+++ httpd.conf  Tue Feb  3 19:07:41 2015
@@ -62,7 +62,7 @@
 server intranet.example.com {
listen on 10.0.0.1 port 80
directory { auto index, index default.htm }
-   root /htdocs/internet.example.com
+   root /htdocs/intranet.example.com
 }

 # An IPv6-based server on a non-standard port



How to optimize PF queues handling?

2015-02-03 Thread Federico Giannici
We are using an OpenBSD amd64 5.5-release as a firewall (the dmesg is at 
the end of this email).


We are using a great number of queues to limit and assign bandwidth 
(about 2500 queues for both NICs). Currently we are handling about 
500Mbps of traffic flowing the firewall but the CPU0 reaches even 70-80% 
of usage in interrupts!


Now we are about to upgrade our Internet connection to 1.000Mbps of 
bandwidth, and we are very worried that the system will not be able to 
handle that amount of traffic.


I think filter rules are very optimized, we have also used conditioned 
anchors to subdivide the amount of lines that have to be executed by 
every packet to about a tenth of the total.


I have done an experiment: I replaced in every rule the set queue XXX 
with tag XXX (XXX is always different so the PF optimizer doesn't 
collapse multiple rules in tables). In this way we found that, leaving 
the some amount of filter rules and only removing the queue, the CPU 
used in interrupts decreased from about 55% to 15% (traffic was not full 
in that moment).


So, it seems that most part (almost 3/4!) of CPU0 time is spent handling 
queues rather than executing filer rules or doing status lookups.


So, the questions is:

1) Do you measure similar values in your systems?

2) Is there something we can do to optimize queues handling?

Any other suggestions?

Thanks.



OpenBSD 5.5 (GENERIC.MP) #315: Wed Mar  5 09:37:46 MST 2014
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8530317312 (8135MB)
avail mem = 8294629376 (7910MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xec0f0 (76 entries)
bios0: vendor American Megatrends Inc. version 2.0 date 04/24/2014
bios0: Supermicro X10SLL-F
acpi0 at bios0: rev 2
acpi0: sleep states S0 S4 S5
acpi0: tables DSDT FACP APIC FPDT SSDT SSDT SSDT SSDT SSDT MCFG HPET 
SSDT SSDT SPMI DMAR EINJ ERST HEST BERT
acpi0: wakeup devices PEGP(S4) PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) 
PEG2(S4) PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) 
RP05(S4) GLAN(S4) EHC1(S4) [...]

acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(R) CPU E3-1271 v3 @ 3.60GHz, 3600.75 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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM

cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Xeon(R) CPU E3-1271 v3 @ 3.60GHz, 3600.00 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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM

cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Xeon(R) CPU E3-1271 v3 @ 3.60GHz, 3600.00 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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM

cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Xeon(R) CPU E3-1271 v3 @ 3.60GHz, 3600.00 MHz
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM

cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 8 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus 2 (RP01)
acpiprt5 at acpi0: bus 4 (RP02)
acpiec0 at acpi0: Failed to read resource settings
acpicpu0 at acpi0: C1, PSS
acpicpu1 at acpi0: C1, PSS
acpicpu2 at acpi0: C1, PSS
acpicpu3 at acpi0: C1, PSS
acpipwrres0 at acpi0: PG00, resource for PEG0
acpipwrres1 at 

iked connection stalling problem on current, maybe related to rekeying

2015-02-03 Thread Sigi Rudzio
Hello misc@,
hallo Reyk,

first of all, a big thank you to all the developers for your great
work on OpenBSD!
I'm using it for my router, my workstation, webserver, everything!

While configuring a new router for my home network I think found a problem
in iked which might be related to rekeying.
I set up IPsec between the router (5.6-stable) and my laptop (current)
with iked.
For performance testing, I created a 1 GB file and tried to transfer it via
HTTP (ftp http://ip/test)

After transfering about 430 MB, the connection stalls.
After I cancel it I can start the transfer again, until I hit around
430 MB again.
If I add lifetime 1h bytes 2G to iked.conf, I can transfer the file
successfully,
if I then try again, it stalls.

With lifetime 0 bytes 0 it works and I can transfer the file many times.

scp has the same problem, it stalls at around 430 MB.

While I found the problem between my new
router (5.6-stable) and my laptop (current), both amd64,
I decided to make a test configuration as simple as possible
and found the same problems as above.

I set up 2 V240 with the latest snapshot, pf is disabled on both systems.
System 1 is running httpd, System 2 is downloading the 1 GB file.
The following tests were done without any special lifetime configuration.
The logs below contain one rekeying which causes the connection to stall.

My uneducated guess is SAs not getting deleted after rekeying, as the
SAs on the passive side aren't getting deleted while the active
side SAs are deleted.
If I try to transfer the file once, the passive side has 4 SAs (see below),
if I try to transfer it twice, the passive side has 6 SAs, etc.

I also tried isakmpd/ipsec.conf and rekeying works without a problem there.

Configuration and logs are following below.

If it is indeed a bug instead of user error and there are any more
tests/logs needed, I'll be happy to test more.
Sorry if I forgot any important information!

Thanks for any answers in advance!

Regards,

Sigi Rudzio

Configuration:
System 1:
192.168.0.3

iked.conf
ikev2 esp from 192.168.0.3 to 192.168.0.4 psk a

System 2:
192.168.0.4

iked.conf
ikev2 active esp from 192.168.0.4 to 192.168.0.3 psk a

iked -dvv outputs:
System 1 (started first):
# iked -dvv
ca_privkey_serialize: type RSA_KEY length 1190
ca_pubkey_serialize: type RSA_KEY length 270
/etc/iked.conf: loaded 1 configuration rules
config_getpolicy: received policy
ikev2 policy1 passive esp inet from 192.168.0.3 to 192.168.0.4 local
192.168.0.3 peer 192.168.0.4 ikesa enc aes-256,aes-192,aes-128,3des
prf hmac-sha2-256,hmac-sha1,hmac-md5 auth
hmac-sha2-256,hmac-sha1,hmac-md5 group
modp2048-256,modp2048,modp1536,modp1024 childsa enc
aes-256,aes-192,aes-128 auth hmac-sha2-256,hmac-sha1 lifetime 10800
bytes 536870912 psk 0x61
config_getpfkey: received pfkey fd 3
config_getcompile: compilation done
config_getsocket: received socket fd 4
config_getsocket: received socket fd 5
config_getsocket: received socket fd 7
config_getsocket: received socket fd 8
ca_reload: local cert type RSA_KEY
config_getocsp: ocsp_url none
ikev2_dispatch_cert: updated local CERTREQ type RSA_KEY length 0
ikev2_recv: IKE_SA_INIT request from initiator 192.168.0.4:500 to
192.168.0.3:500 policy 'policy1' id 0, 520 bytes
ikev2_recv: ispi 0x3a8f96d8307a0131 rspi 0x
ikev2_policy2id: srcid FQDN/ags.local length 13
ikev2_pld_parse: header ispi 0x3a8f96d8307a0131 rspi
0x nextpayload SA version 0x20 exchange IKE_SA_INIT
flags 0x08 msgid 0 length 520 response 0
ikev2_pld_payloads: payload SA nextpayload KE critical 0x00 length 136
ikev2_pld_sa: more 0 reserved 0 length 132 proposal #1 protoid IKE
spisize 0 xforms 14 spi 0
ikev2_pld_xform: more 3 reserved 0 length 12 type ENCR id AES_CBC
ikev2_pld_attr: attribute type KEY_LENGTH length 256 total 4
ikev2_pld_xform: more 3 reserved 0 length 12 type ENCR id AES_CBC
ikev2_pld_attr: attribute type KEY_LENGTH length 192 total 4
ikev2_pld_xform: more 3 reserved 0 length 12 type ENCR id AES_CBC
ikev2_pld_attr: attribute type KEY_LENGTH length 128 total 4
ikev2_pld_xform: more 3 reserved 0 length 8 type ENCR id 3DES
ikev2_pld_xform: more 3 reserved 0 length 8 type PRF id HMAC_SHA2_256
ikev2_pld_xform: more 3 reserved 0 length 8 type PRF id HMAC_SHA1
ikev2_pld_xform: more 3 reserved 0 length 8 type PRF id HMAC_MD5
ikev2_pld_xform: more 3 reserved 0 length 8 type INTEGR id HMAC_SHA2_256_128
ikev2_pld_xform: more 3 reserved 0 length 8 type INTEGR id HMAC_SHA1_96
ikev2_pld_xform: more 3 reserved 0 length 8 type INTEGR id HMAC_MD5_96
ikev2_pld_xform: more 3 reserved 0 length 8 type DH id MODP_2048_256
ikev2_pld_xform: more 3 reserved 0 length 8 type DH id MODP_2048
ikev2_pld_xform: more 3 reserved 0 length 8 type DH id MODP_1536
ikev2_pld_xform: more 0 reserved 0 length 8 type DH id MODP_1024
ikev2_pld_payloads: payload KE nextpayload NONCE critical 0x00 length 264
ikev2_pld_ke: dh group MODP_2048_256 reserved 0
ikev2_pld_payloads: payload NONCE nextpayload NOTIFY critical 0x00 length 

Re: sudo nohup tcpdump at startup

2015-02-03 Thread Craig Skinner
On 2015-02-02 Mon 20:03 PM |, fRANz wrote:
 
 # cat /etc/rc.local
 /sbin/ifconfig pflog0 up  /sbin/pflogd -f /dev/null
 sudo nohup tcpdump -n -v -l -q -n -e -ttt -i pflog0 action block | logger -t 
 pf -p local2.info 
   ?

/etc/rc.local is run by root on boot.

Check the environment rc.local runs with
by putting in something *like* this:

#!/bin/sh
#
#   $Id$
#

tmp=$(mktemp)
print ${tmp}  ${tmp}
logname  ${tmp}
umask  ${tmp}
pwd  ${tmp}
printenv | sort  ${tmp}
cat ${tmp} | mail -s 'rc.local env' root

ifconfig pflog0 up  pflogd -f /dev/null
tcpdump -n -v -l -q -n -e -ttt -i pflog0 action block | logger -t pf -p 
local2.info 





Cheers,
-- 
Craig Skinner.
Another superb Scottish country dance by Edinburgh University:
https://twitter.com/Craig_Skinner/status/562546356926308353
http://NewScotland.Org.UK/
GUSCDC (Glasgow Uni) ball in 3 weeks time!



Re: Raspberry Pi 2 Model B

2015-02-03 Thread Jayton Garnett
If you really do want a BSD on your Pi, use FreeBSD, I've successfully
installed FreeBSD on my original Pi.
There has been a line drawn by the OpenBSD developers, for the reasons they
have stated and its a fair decision and unless someone else wants to fork
OpenBSD, we'll just have to accept it for what it is. As much as I'd like
OpenBSD, its not going to happen.
FreeBSD is a perfectly acceptable alternative to OpenBSD, although it has its
differences its still better than a Linux variant.
regards,Jayton



Re: Syslogd remote hostname

2015-02-03 Thread Bertrand Caplet
 I have a central rsyslog server and multiple rsyslog server sending him
their log. Now I have an OpenBSD server with syslogd. But syslogd doesn't send
his hostname to this central server.
 Is there a way to set hostname to send ?

 The syslogd(8) -h option may be what you are asking about.

It worked, thanks a lot :-)

Regards,
--
CHUNKZ.NET - script kiddie and computer technician
Bertrand Caplet, Flers (FR)
Feel free to send encrypted/signed messages
Key ID: FF395BD9
GPG FP: DE10 73FD 17EB 5544 A491 B385 1EDA 35DC FF39 5BD9

[demime 1.01d removed an attachment of type application/pgp-signature which had 
a name of signature.asc]



Re: IBM/Lenovo Thinkpad trackpoint support in pms(4)?

2015-02-03 Thread Peter Piwowarski

Martin Pieuchot wrote:

On 31/01/15(Sat) 12:27, Peter Piwowarski wrote:

Hello,

Recent Thinkpads have support for the trackpoint via the Synaptics
protocol supported by pms(4).


That applies only to the touchpad that's also included on most machines; 
the trackpoint seems to accept different commands (and indeed synaptics 
support is not used at all on machines without touchpads, synclient 
refuses to run, etc). If I read the IBM doc correctly, it normally 
provides PS/2 passthrough functionality for the touchpad when it exists.




Posting your dmesg would help us understand which hardware you're
talking about.


(What I think are) relevant portions (full dmesg for each machine at the 
end of the message):


# Thinkpad T60p, trackpoint + touchpad
$ grep pms  t60p-openbsd-dmesg
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
wsmouse1 at pms0 mux 0
pms0: Synaptics touchpad, firmware 6.2

# Thinkpad X61, trackpoint only
$ grep pms  x61-openbsd-dmesg
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0


Then you might want to add another protocol for your trackpoint to pms(4),
have look at pms_protocols[] :)


Thanks, I suppose I'll have to spend some quality time trying to figure 
out how that's organized.


--- full T60p (trackpoint + touchpad) dmesg 
OpenBSD 5.6-stable (GENERIC.MP) #0: Tue Jan 20 18:47:47 EST 2015
pe...@t60p-openbsd.foo:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 2129461248 (2030MB)
avail mem = 2064048128 (1968MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (68 entries)
bios0: vendor LENOVO version 79ETE7WW (2.27 ) date 03/21/2011
bios0: LENOVO 2007YS3
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET SLIC BOOT SSDT 
SSDT SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) LURT(S3) DURT(S3) EXP0(S4) 
EXP1(S4) EXP2(S4) EXP3(S4) PCI1(S4) USB0(S3) USB1(S3) USB2(S3) USB7(S3) 
HDEF(S4)

acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 CPU T7600 @ 2.33GHz, 2327.83 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF

cpu0: 4MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 166MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU T7600 @ 2.33GHz, 2327.50 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF

cpu1: 4MB 64b/line 16-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 2, remapped to apid 1
acpimcfg0 at acpi0 addr 0xf000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (AGP_)
acpiprt2 at acpi0: bus 2 (EXP0)
acpiprt3 at acpi0: bus 3 (EXP1)
acpiprt4 at acpi0: bus 4 (EXP2)
acpiprt5 at acpi0: bus 12 (EXP3)
acpiprt6 at acpi0: bus 21 (PCI1)
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpipwrres0 at acpi0: PUBS, resource for USB0, USB2, USB7
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 99 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model 42T4619 serial  8627 type LION oem SANYO
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
acpidock0 at acpi0: GDCK not docked (0)
cpu0: Enhanced SpeedStep 2327 MHz: speeds: 2333, 2000, 1667, 1333, 1000 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 Intel 82945GM Host rev 0x03
ppb0 at pci0 dev 1 function 0 Intel 82945GM PCIE rev 0x03: msi
pci1 at ppb0 bus 1
radeondrm0 at pci1 dev 0 function 0 ATI Mobility FireGL V5250 rev 0x00
drm0 at radeondrm0
radeondrm0: msi
azalia0 at pci0 dev 27 function 0 Intel 82801GB HD Audio rev 0x02: msi
azalia0: codecs: Analog Devices AD1981HD, Conexant/0x2bfa, using Analog 
Devices AD1981HD

audio0 at azalia0
ppb1 at pci0 dev 28 function 0 Intel 82801GB PCIE rev 0x02: msi
pci2 at ppb1 bus 2
em0 at pci2 dev 0 function 0 Intel 82573L rev 0x00: msi, address 
00:1a:6b:67:9c:64

ppb2 at pci0 dev 28 function 1 Intel 82801GB PCIE rev 0x02: msi
pci3 at ppb2 bus 3
wpi0 at pci3 dev 0 function 0 Intel PRO/Wireless 3945ABG rev 0x02: 
msi, MoW1, address 00:1b:77:08:ed:3e

ppb3 at pci0 dev 28 function 2 Intel 82801GB PCIE rev 0x02: msi
pci4 at ppb3 bus 4
ppb4 at pci0 dev 28 function 3 Intel 82801GB PCIE rev 0x02: msi
pci5 at ppb4 bus 12
uhci0 at pci0 dev 29 function 0 Intel 82801GB USB rev 0x02: apic 1 int 16