Status of ath10k?

2019-10-06 Thread Gregor Best
Hi people,

I've got a new laptop in the mail (Dell XPS 13") which has a WiFi card
in it that on Linux attaches to ath10k. It looks like there was an
effort to port that driver to FreeBSD a while ago, but I haven't been
able to find any recent information.

What's the status of that on OpenBSD? Is there a driver under way or is
this a "get comfortable with a urtwn or hack it yourself" situation?

-- 
Gregor



Re: Clarification about mfs/tmpfs on /tmp

2018-10-09 Thread Gregor Best


Hi,

>> [...]
>> The last part of my question concerns caching chromium data in /tmp.
>> I have read that the OpenBSD chromium port has been "pledged" and
>> "unveiled". Does this have any influence over whether I can run
>> chrome --disk-cache/dir=/tmp/chrome?
>> [...]

I don't know about the specifics of telling chrome to cache in
/tmp/chrome, but FWIW, I have a 2G MFS mounted to ~/.cache. It seems to
work fine that way.

> [...]
> main difference between mfs and tmpfs. mfs is a ffs mounted from memory and
> will use the memory reserved for it, while tmpfs will use memory only when 
> it's
> really used. If you give 500 MB to mfs, it will be instantly used in your
> memory, even if you have 0 file in it.
> [...]

Small correction, the mount_mfs process that backs the MFS file system
has 500MB allocated, but the pages are not immediately used. You can see
that in top (use `g` to filter for `mount_mfs`). The processes have SIZE
corrosponding to the specified file system size and RES corrosponding to
the amount of space that was actually touched by FS operations.

Solene's right though in that space once used on an MFS is only released
when the MFS is unmounted.

>
> I don't know for chromium.
>

--
Gregor



Re: sbcl vs uvm

2018-08-29 Thread Gregor Best
Hi Manuel,

> [...]
> trap [sbcl]46252/177072 type 6: sp 2f76e78b8 not inside 2f74f8000-2f76e8000
> [...]

that looks like a stack space exhaustion. I've had something similar while 
compiling
OCaml's merlin package. I solved it with the brutest of forces by adding

:stacksize=infinity:\

to the limits for `staff` in my `/etc/login.conf`. Some more fine tuned stack 
size
should do the trick just as well.

-- 
Gregor



Re: Removing FUSE would theoretically make a system more secure?

2018-01-28 Thread Gregor Best
On Sun, Jan 28, 2018 at 06:11:51PM +0100, who one wrote:
> Hello, 
> 
> "> And what are you defending against?"
> 
> there was/is a great guy that investigated the security of the BSDs, reported 
> a few bugs too: 
> 
> https://www.youtube.com/watch?v=rRg2vuwF1hY=youtu.be=1522
> 
> that lead to ex.: 
> 
> https://ftp.openbsd.org/pub/OpenBSD/patches/6.1/common/017_fuse.patch.sig
> [...]

By that logic, you've just disabled a piece of code that someone (Helg)
is actively working on and that has security issues fixed. What makes
you so sure there are no deadly bugs in, say, the FAT code? Or drivers
for rare-ish network cards? Or the ~120k lines of code that make up the
driver for Intel graphics cards?

Of course running less code means less of an attack surface. Just make
sure you're actually improving security if that's your goal, not just
diddling around on the fringes of your system and feeling secure because
Fuse is disabled while you're running Chrome which has access to your
~/.ssh/id_ed25519 or ~/.bitcoin/wallet.dat.

> [...]
> So would the mentioned method, by removing the "grep -i fuse
> /sys/conf/GENERIC" and doing re-compile would "disable FUSE"? 
> [...]

If would. But as already mentioned by other people, the barriers to Fuse
are relatively high (You need code exec as root to fiddle with
/dev/fuse0), while code you're actually running may have more of an
impact on your security situation.

-- 
Gregor



Re: how to know the state of the dd's progression

2017-08-09 Thread Gregor Best
Send a SIGINFO to dd.

-- 
Gregor



Re: Etnernal & infernal browser woes

2017-04-29 Thread Gregor Best
Hi Jyri,

would you mind sharing a dmesg with us, or at least any sort of general
info in what environment you're experiencing these kinds of problems?

Of course running a current chrome on an old iMac won't yield the same
performance as running chrome on a laptop fresh out of the box, but the
OS hardly makes any difference there...

What I've noticed is that on machines with Skylake and similarly newer
graphics hardware, you'll have to disable hardware acceleration in your
browsers. This is due to the fact that the inteldrm driver does not yet
support such devices, which yields non-working HW acceleration. With
that disabled, on my i5 box (dmesg after the signature), I can watch 4k
videos on youtube just fine using Chrome. I haven't tried LinkedIn, but
Xing seems to work very nicely as well, as do Twitter, all sorts of
JS-heavy Medium-style sites and so on.

FWIW, performance was also good (not 100% up to Linux, but definitely
not as bad as you describe) on my T400 (Low-end Core2Duo, 6GB RAM) and
on my R60i (even lower end Core2Duo, but 8GB of RAM).

-- 
Gregor


OpenBSD 6.1-current (GENERIC.MP) #20: Wed Apr 19 20:57:30 CEST 2017
g...@sputnik.unobtanium.de:/usr/obj/sys/arch/amd64/compile/GENERIC.MP
real mem = 17078013952 (16286MB)
avail mem = 16554639360 (15787MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x87ed7000 (44 entries)
bios0: vendor American Megatrends Inc. version "5.11" date 08/29/2016
bios0: Notebook N24_25JU
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT FIDT MCFG HPET SSDT SSDT DBGP DBG2 SSDT UEFI 
SSDT BGRT DMAR TPM2 ASF!
acpi0: wakeup devices PEGP(S4) PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) PEG2(S4) 
PXSX(S4) RP17(S4) PXSX(S4) RP18(S4) PXSX(S4) RP19(S4) PXSX(S4) RP20(S4) 
PXSX(S4) RP01(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) Core(TM) i5-6200U CPU @ 2.30GHz, 2400.00 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,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: TSC frequency 24 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 24MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz, 2400.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,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz, 2400.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,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 1, core 0, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz, 2400.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,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 120 pins
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpihpet0 at acpi0: 2399 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 -1 (RP17)
acpiprt5 at acpi0: bus -1 (RP18)
acpiprt6 at acpi0: bus -1 (RP19)
acpiprt7 at acpi0: bus -1 (RP20)
acpiprt8 at acpi0: bus 1 (RP01)
acpiprt9 at acpi0: bus 2 (RP02)
acpiprt10 at acpi0: bus -1 

Re: Thinkpad T460s on lastest -snapshot, no Xorg

2017-04-15 Thread Gregor Best
Hi Daniel,

I have a laptop with a similar chipset. The issue is that the
inteldrm(4) driver does not support Skylake devices at the moment.

If you boot the machine EFI mode, efifb(4) should attach to the EFI
frame buffer. This in turn allows you to use Xorg's wsfb driver with an
/etc/X11/xorg.conf which looks like this:

Section "Device"
Identifier "default device"
Driver "wsfb"
EndSection

Apart from missing suspend/resume and 3D-acceleration, such a setup
seems to work nicely for me. Chrome/Firefox need to be taught not to use
graphics acceleration, and for mpv you need to use the commandline
parameter `-vo x11` to tell it to use oldschool X11 rendering.
Brightness control can be done with

https://github.com/jcs/intel_backlight_fbsd

if you set `machdep.allowaperture` to 3. Don't mind the `fbsd` in the
name, it works on OpenBSD as well.

--
Gregor

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



Re: Using X with VESA on Skylake

2017-04-15 Thread Gregor Best
Hi Hrishikesh,

On Sat, Apr 15, 2017 at 05:26:26PM +0530, Hrishikesh Muruk wrote:
> [...]
> I installed OpenBSD 6.1 on an Intel NUC6i7KYK. It has a Skylake i7 CPU
> so I know 3D acceleration is not supported. I think vesa should still
> work - please correct me if that is not the case.
> [...]
> Just in case it makes a difference - I am not booting using UEFI
> (legacy mode only).

It does, in a way. If you boot it in EFI mode (might require creating a
system partition and installing the EFI boot loader), efifb(4) should
attach to the EFI framebuffer. This in turn allows you to use Xorg's
wsfb driver with the following /etc/X11/xorg.conf:

Section "Device"
Identifier "default device"
Driver "wsfb"
EndSection

In my experience, wsfb seems to operate a lot smoother than vesafb,
though I haven't done any benchmarks. Works for me though on my Skylake
i5 system.

I don't have a lot of experience with the VESA driver, but if you don't
get that working, EFI might be the most sensible option.

-- 
Gregor



Re: Conventional config file syntax? and IP address polling question

2017-02-25 Thread Gregor Best
Hi Mario,

On Sat, Feb 25, 2017 at 02:59:40PM -0600, Mario Campos wrote:
> [...]
> These configuration settings should probably be in a configuration file. I
> read somewhere on the interwebs that OpenBSD config files try to resemble
> each other, or rather, they try to keep to a format/style. Is this
> format/style documented anywhere? Or is there a C library that I should be
> using?
> [...]

pfctl's parse.y should be a good starting point. It's not exactly a
library but provides things like macros, string handling and file
includes for nearly free.

> [...]
> The second question I have is around polling the interface for its IP
> address. Correct me if I'm wrong, but I don't think it's possible to
> register a callback for whenever the interface changes its IP address,
> right? Instead, this daemon will have to poll it periodically?
> [...]

You could use route(4) for that. It has RTM_{NEW,DEL}ADDR messages that
seem to do what you need.

-- 
Gregor



Re: vmd: upper limit on number of vm's?

2017-02-09 Thread Gregor Best
Hi,

On Thu, Feb 09, 2017 at 11:33:19AM -0600, Eric Brown wrote:
> [...]
> # tail -4 /var/log/messages
> Feb  9 11:21:44 air vmd[73442]: parent terminating
> Feb  9 11:21:47 air vmd[73405]: config_setvm: can't open tap tap: No such 
> file or directory
> [...]

You're probably missing the device files for the taps in /dev. The
installer creates 4 by default, so you'll have to run

cd /dev; sh MAKEDEV tap4

and so on for each new tap device you need.

-- 
Gregor



Re: Encrypted data partition

2016-12-14 Thread Gregor Best
Hi Carste,

On Wed, Dec 14, 2016 at 12:49:14PM +0100, Carsten Kunze wrote:
> [...]
> Are you using EncFS on OpenBSD?  Which EncFS version?
> [...]

I just installed EncFS from ports, the version there is 1.7.4

With some short testing, it looks like it works nicely. Since the
kern.usermount option is gone, you'll have to mount the file system as
root, which means reading from and writing to the encrypted FS needs to
be done as root as well, since OpenBSD's fuse implementation doesn't yet
support the allow_* options to libfuse.

For reference, this is the commandline I used:

# encfs /home/gbe/test/enc /home/gbe/test/root

-- 
Gregor



Re: Encrypted data partition

2016-12-14 Thread Gregor Best
On Wed, Dec 14, 2016 at 10:34:53AM +0100, Jan Betlach wrote:
> Hello,
> 
> I'd like to have an encrypted Ext2 data partition, which can be shared
> between OpenBSD and Linux. LUKS probably does not work in OpenBSD. Maybe
> something like EncFS is the way to go?
> [...]

EncFS seems to be the most sensible option.

If you share an ext2 partition between Linux and OpenBSD, make sure it's
actually an ext2, not an ext[34]. While those can be mounted as ext2 by
OpenBSD (unless you create an ext4 with extents), things might become
weird if Linux writes to the partition using the journal, the power
fails and you reboot into OpenBSD.

-- 
Gregor



Re: Because in this day and age, there’s no one else doing what OpenBSD is doing?

2016-11-15 Thread Gregor Best
Hi,

On Tue, Nov 15, 2016 at 07:14:23PM -0200, SOUL_OF_ROOT 55 wrote:
> [...]
> *Because in this day and age, there???s no one else doing what OpenBSD is
> doing?*
> [...]

I'm not sure if you're aware of that but your sentence structure is
really really confusing. "Because" signifies the start of the answer to
a question that used the word "why". It's not a synonym.

> [...]
> I wonder what Theo de Raadt would say about it.
> [...]

I'd say if you want to interview Theo, misc@ isn't the best avenue.

-- 
Gregor



Re: configure ethernet and wireless

2016-09-14 Thread Gregor Best
Hi George,

On Wed, Sep 14, 2016 at 08:59:49PM +0300, George Pediaditis wrote:
> then i followed the instructions on faq to setup a trunk interface.
> [...]
> and /etc/hostname.trunk0 that contains:
> 
> "trunkproto failover trunkport bge0
> trunkport iwn0
> dhcp"
> [...]

My /etc/hostname.trunk0 has the 'trunkport' entries on separate lines.
That shouldn't make a difference though. Apart from that, it looks
similar.

> 
> Ethernet and wifi doesn't work i reboot my laptop and instead of the
> desktop i ended up in command line. ethernet and wifi  still don't
> work.
> [...]

That sounds weird. Are there error messages of any kind? X should (tm)
work even if there's no network. Is xdm in the output of 'rcctl ls on'?

> [...]
> [demime 1.01d removed an attachment of type application/octet-stream which 
> had a name of dmesg.out]
> 
> [demime 1.01d removed an attachment of type application/octet-stream which 
> had a name of dmesg2.out]
> 

The mailing list stripped your attachments. You'll have to provide them
in-line. It'd also be cool if you could provide the output of ifconfig
and /etc/netstart with your new hostname files.

-- 
Gregor



Re: DigitalOcean and OpenBSD

2016-08-24 Thread Gregor Best
On Wed, Aug 24, 2016 at 11:52:36AM -0300, R0me0 *** wrote:
> Just asked if someone already faced this issue after a simple reboot
> 
> # reboot
> 
> Do you need a draw ?
> 
> KIND Regards,
> [...]

A dmesg would be nice. And maybe a less snarky attitude.

-- 
Gregor



Re: ratble and rdomain support on dhcpd and openvpn

2016-07-12 Thread Gregor Best
Ahoy,

> [...]
> Same  for the  openVPN.  I use  privateinternetaccess  service. I  ran
> "openvpn US\ Seattle.ovpn" to start the vpn and that gives me the tun0
> with IP on it.  Then I have run the following to move  the tun0 to the
> rdomain200 manually.
> [...]
> However, when the  openvpn times out or reconnects, it  gives tun0 new
> IP  and puts  tun0 back  in the  default rdomain  (0?). So  I have  to
> manually do this all over again... So anyway to configure it, maybe by
> editing the ovpn file?
> [...]

OpenVPN has a mechanism that allows using a user supplied script to do
the device configuration instead of having OpenVPN do that by itself.
I use the following for my IPredator VPN:

# --- 8< --- SNIP --- 8< ---
script-security 2 # Allows OpenVPN to execute scripts
ifconfig-noexec
route-noexec
route-up /etc/openvpn/ipredator/up.sh
up /etc/openvpn/ipredator/up.sh
# --- 8< --- SNAP --- 8< ---

The script looks like this:
# --- 8< --- SNIP --- 8< ---
#!/bin/ksh
case "${script_type}" in
up)
/sbin/ifconfig "${dev}" "${ifconfig_local}" \
netmask "${ifconfig_netmask}" mtu "${tun_mtu}" rdomain 3
;;
route-up)
route -T3 add default ${route_vpn_gateway}
;;
*)
echo "Unknown script type ${script_type}" | logger -t up
;;
esac
# --- 8< --- SNAP --- 8< ---

-- 
Gregor



Re: encrypting fs

2016-06-29 Thread Gregor Best
On Wed, Jun 29, 2016 at 02:53:57PM -0700, Philip Guenther wrote:
> On Wed, Jun 29, 2016 at 2:47 PM, Gregor Best <g...@unobtanium.de> wrote:
> > On Wed, Jun 29, 2016 at 05:39:48PM -0300, Friedrich Locke wrote:
> >> [...]
> >> I have a doubt related to fs encryption.
> >> May i encrypt the wd0c file system partition and have the sd0 disk
> >> fully encrypted for any one partition like a, d e f  ?
> >> [...]
> >
> > OpenBSD does support Full Disk Encryption, yes. You'd create a partition
> > of type RAID on wd0c
> 
> NOO.  NEVER THE 'c' PARTITION!
> 
> 
> > [0]: https://www.openbsd.org/faq/faq14.html#softraidFDE
> 
> The directions at that link are correct...and have you create a
> partition of type RAID as the 'a' partition.
> [...]

Right, that's what I meant by 'create a partition on wd0c'. Should've
proof read that before I sent it, thanks for the clarification.

> 
> Philip Guenther
> 

-- 
Gregor
--

The problem with people who have no vices is that generally you can be
pretty sure they're going to have some pretty annoying virtues.
-- Elizabeth Taylor



Re: encrypting fs

2016-06-29 Thread Gregor Best
On Wed, Jun 29, 2016 at 05:39:48PM -0300, Friedrich Locke wrote:
> [...]
> I have a doubt related to fs encryption.
> May i encrypt the wd0c file system partition and have the sd0 disk
> fully encrypted for any one partition like a, d e f  ?
> [...]

OpenBSD does support Full Disk Encryption, yes. You'd create a partition
of type RAID on wd0c, spanning the whole disk. Then set that up as a
softraid crypto disk and install OpenBSD on the sd device that appears
after attaching the softraid. [0] has further details.

[0]: https://www.openbsd.org/faq/faq14.html#softraidFDE

-- 
Gregor



Re: Performance of Firefox and Chromium

2016-05-02 Thread Gregor Best
On Mon, May 02, 2016 at 11:55:34AM -0400, Alan Corey wrote:
> [...]
> For a one-time use program sure, but things like Python shouldn't be
> unleashed on an unsuspecting public.  Gimp 2.8 is noticeably slower
> than 2.6 I think it was in OpenBSD 5.2.  Move the cursor over the
> image and it's like it's in la-la land.  Try to sign your name with
> the mouse.  Of Inkscape and Libre Office Draw, surprisingly Libre
> Office is the faster and works better for an SVG signature.  But not
> as fast as this amazing little page:
> http://mcc.id.au/2010/signature.html
> [...]

I just tried it out on my Thinkpad T400 running a snapshots that's about
3 weeks  old and  I can't  reproduce Gimps  "la-la land".  I tried  on a
640x480 canvas,  with both the  pen and  the brush. Instant  painting in
both cases. The  Javascript thingie is almost as instant  but has a very
very tiny lag.

I'm not  sure what  hardware you guys  run OpenBSD on,  but on  my (old,
crusty,  crummy, shitty)  laptop,  it  and a  lot  of Gui-requiring  and
rumored to be "heavy" by whatever metric programs work nicely. That
includes Chromium by the way.

-- 
Gregor



Re: ifconfig inet dhcp and static alias support

2016-01-17 Thread Gregor Best
Hi Yury,

On Sun, Jan 17, 2016 at 12:21:51PM -0800, Yury Shefer wrote:
> [...]
> I was not able to find the information about ifconfig support for the IPv4
> address configuration where I have primary address assigned by DHCP
> (Comcast) and alias with static IP. My cable modem mgmt IP belongs to
> 192.168.100.0/24 subnet and to access it - I have to add an alias - but it
> always overwrite DHCP-assigned address (OpenBSD 5.8-stable (GENERIC.MP)).
> [...]

You might get somewhere by creating a bridge(4) interface, adding em0 to
that and adding a vether(4) to the bridge. dhclient would then run on
em0, adding and removing dynamically assigned IPv4-addresses, while
the vether has a static address:

# ifconfig bridge0 create
# ifconfig vether0 create inet 192.168.100.200/24 up
# ifconfig bridge0 add vether0
# ifconfig bridge0 add em0
# dhclient em0

The proper incantations in /etc/hostname.{bridge,vether,em}0 are left as
an exercise for the reader.

-- 
Gregor



Re: segfault with stripped lib, works fine when non-stripped

2016-01-04 Thread Gregor Best
Hi Jeremie,

On Mon, Jan 04, 2016 at 10:54:24PM +0100, Jeremie Le Hen wrote:
> [...]
> Has anyone of you seen such a behavior in the past?
> [...]

Haven't seen something like that but my next step would be to build it
with CFLAGS="-g -O0" and without stripping for maximum debuggability and
run it in valgrind to see if there are weird memory access patterns.

-- 
Gregor



Re: serious watchdog timeout issues with em driver

2015-12-21 Thread Gregor Best
On Mon, Dec 21, 2015 at 10:41:22AM +0200, Kapetanakis Giannis wrote:
> Hi,
> 
> Problem is still here with Dec 16 snapshot.
> 
> Dec 17 13:08:20 server /bsd: OpenBSD 5.8-current (GENERIC.MP) #1494: Wed Dec
> 16 12:13:03 MST 2015
> Dec 17 13:08:20 server /bsd:
> dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
> Dec 17 13:08:20 server /bsd: cpu0: Intel(R) Pentium(R) 4 CPU 3.00GHz
> ("GenuineIntel" 686-class) 3 GHz
> Dec 17 13:08:20 server /bsd: em0 at pci1 dev 10 function 0 "Intel 82541EI"
> rev 0x00: apic 2 int 22, address 00:30:48:72:28:58
> Dec 17 13:08:20 server /bsd: em1 at pci1 dev 11 function 0 "Intel 82541EI"
> rev 0x00: apic 2 int 23, address 00:30:48:72:28:59
> Dec 20 16:53:18 server /bsd: em0: watchdog timeout -- resetting
> Dec 21 01:54:12 server /bsd: em0: watchdog timeout -- resetting
> 
> G
> 

I'm also seeing this with a Dec 19 snapshot on i386. This is with

em0 at pci1 dev 0 function 0 "Intel 82583V" rev 0x00: msi, address 
00:03:2d:20:cf:84
em1 at pci2 dev 0 function 0 "Intel 82583V" rev 0x00: msi, address 
00:03:2d:20:cf:85
em2 at pci3 dev 0 function 0 "Intel 82583V" rev 0x00: msi, address 
00:03:2d:20:cf:86
em3 at pci4 dev 0 function 0 "Intel 82583V" rev 0x00: msi, address 
00:03:2d:20:cf:87

the timeouts  seem to be much  less frequently though and  it looks like
running  iperf doesn't  trigger them  anymore. When  running iperf,  I'm
seeing the top shows "system" nicely distributed over cores #1 to #3 and
interrupts on core #0 and throughput at around 500Mbit/sec.

A dmesg is attached after my signature.

-- 
Gregor

OpenBSD 5.8-current (GENERIC.MP) #1499: Sat Dec 19 08:24:55 MST 2015
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel(R) Atom(TM) CPU D2550 @ 1.86GHz ("GenuineIntel" 686-class) 1.87 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,SSE3,DTES64,MWAIT,DS-CPL,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF,PERF,ITSC,SENSOR,ARAT
real mem  = 2135064576 (2036MB)
avail mem = 2081611776 (1985MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: date 10/11/11, SMBIOS rev. 2.7 @ 0xe9380 (50 entries)
bios0: vendor American Megatrends Inc. version "4.6.5" date 06/21/2012
bios0: INTEL Corporation Tiger Hill
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG HPET SSDT SSDT SSDT IFEU
acpi0: wakeup devices P0P8(S4) PS2K(S3) PS2M(S3) USB0(S3) USB1(S3) USB2(S3) 
USB3(S3) USB7(S3) PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) 
PXSX(S4) RP04(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges
cpu0: apic clock running at 133MHz
cpu0: mwait min=64, max=64, C-substates=0.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Atom(TM) CPU D2550 @ 1.86GHz ("GenuineIntel" 686-class) 1.87 GHz
cpu1: 
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,SSE3,DTES64,MWAIT,DS-CPL,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF,PERF,ITSC,SENSOR,ARAT
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Atom(TM) CPU D2550 @ 1.86GHz ("GenuineIntel" 686-class) 1.87 GHz
cpu2: 
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,SSE3,DTES64,MWAIT,DS-CPL,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF,PERF,ITSC,SENSOR,ARAT
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Atom(TM) CPU D2550 @ 1.86GHz ("GenuineIntel" 686-class) 1.87 GHz
cpu3: 
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,SSE3,DTES64,MWAIT,DS-CPL,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF,PERF,ITSC,SENSOR,ARAT
ioapic0 at mainbus0: apid 4 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 5 (P0P8)
acpiprt2 at acpi0: bus 1 (RP01)
acpiprt3 at acpi0: bus 2 (RP02)
acpiprt4 at acpi0: bus 3 (RP03)
acpiprt5 at acpi0: bus 4 (RP04)
acpiec0 at acpi0: not present
acpicpu0 at acpi0: C1(@1 halt!)
acpicpu1 at acpi0: C1(@1 halt!)
acpicpu2 at acpi0: C1(@1 halt!)
acpicpu3 at acpi0: C1(@1 halt!)
acpitz0 at acpi0: critical temperature is 140 degC
acpipwrres0 at acpi0: FN00, resource for FAN0
acpitz1 at acpi0: critical temperature is 100 degC
acpibat0 at acpi0: BAT0 not present
acpibat1 at acpi0: BAT1 not present
acpibtn0 at acpi0: PWRB
acpiac0 at acpi0: AC unit offline
acpibtn1 at acpi0: SLPB
acpibtn2 at acpi0: LID0
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD02
bios0: ROM list: 0xc/0xf400! 0xcf800/0x1000 0xd0800/0x1000 0xd1800/0x1000 
0xd2800/0x1000
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 vendor 

Re: em(4) watchdog timeouts

2015-11-15 Thread Gregor Best
On Mon, Nov 16, 2015 at 12:05:12AM +1000, David Gwynne wrote:
> On Fri, Nov 13, 2015 at 10:18:51AM -0500, Sonic wrote:
> > On Wed, Nov 11, 2015 at 9:20 AM, Gregor Best <g...@unobtanium.de> wrote:
> > > I've done some further testing and I think I've narrowed it down to the
> > > "Unlocking em(4) a bit further"-patch [0].
> 
> could you try this? its not written with the wdog stuff in mind,
> but it does touch that stuff so it might help.
> [...]

Just tried it, sadly it doesn't seem to help :/

To be sure, I enabled debug on the routers em's, but apart from the watchdog 
timeout, there's nothing in there.

-- 
Gregor



Re: em(4) watchdog timeouts

2015-11-11 Thread Gregor Best
I've done some further testing and I think I've narrowed it down to the
"Unlocking em(4) a bit further"-patch [0]. With the patch reverted, I
haven't seen any watchdog timeouts yet. I'm currently running the router
with the patch reverted to make sure the timeouts don't happen again.

[0]: https://www.marc.info/?l=openbsd-tech=144347723907388=4

-- 
Gregor



Re: em(4) watchdog timeouts

2015-11-11 Thread Gregor Best
Hi Alexis,

On Wed, Nov 11, 2015 at 08:11:15PM +, Alexis VACHETTE wrote:
> [...]
> Even with heavy network load ?
> [...]

So far, yes. I've saturated the device for about 45 Minutes with
something like this (the other end is my laptop):

## on the router
$ dd if=/dev/zero bs=8k | nc 172.31.64.174 55000
## on my laptop
$ nc -l 55000 | dd of=/dev/null bs=8k

(with two or three streams in parallel). There were about 6k
interrupts per second and bandwidth was about 250Mbps, which seems
to be the maximum the tiny CPU in this router can do. No watchdog
timeouts appeared, where previously something relatively low bandwidth
(the SSDs in router and laptop suck) like this caused one every 20
or 30 seconds:

## on the router
$ pax -w /home | nc 172.31.64.174 55000

I'll keep an eye on things, but so far it looks good. Regular usage
works out so far as well. If you need me to run some special workload
for you, I'd be more than happy to do that.

-- 
Gregor



Re: em(4) watchdog timeouts

2015-11-08 Thread Gregor Best
On Sun, Nov 08, 2015 at 06:57:23PM +0100, Gregor Best wrote:
> [...]
> If it helps debugging this, I can give SSH access to the router,
> provided that reboots don't happen between 18:00 and 02:00 German time
> too often, since that's when we have larger amounts of visitors in our
> hackerspace.
> [...]

Forgot to mention, the SSH access includes a push button monkey with a
console cable at hand (me) in case something goes wrong.

-- 
Gregor



Re: em(4) watchdog timeouts

2015-11-08 Thread Gregor Best
On Mon, Nov 02, 2015 at 09:29:20PM +0100, Gregor Best wrote:
> [...]
> Looks good so far. I've run a few light tests and the usual load that
> caused the timeouts before, haven't seen any yet.
> [...]

I just checked back on the router and it seems that the patch doesn't
help after all :( The number of watchdog timeouts went down, but they
are still there, about 35 in the last two days with network (and other)
load on the router almost nonexistant.

If it helps debugging this, I can give SSH access to the router,
provided that reboots don't happen between 18:00 and 02:00 German time
too often, since that's when we have larger amounts of visitors in our
hackerspace.

-- 
Gregor



Re: em(4) watchdog timeouts

2015-11-02 Thread Gregor Best
On Mon, Nov 02, 2015 at 08:11:30PM +0100, Mark Kettenis wrote:
> Can those that are experiencing watchdog timeouts check if the diff
> below gets rid of them?
> [...]

Looks good so far. I've run a few light tests and the usual load that
caused the timeouts before, haven't seen any yet.

For the record, this is with

em0 at pci1 dev 0 function 0 "Intel 82583V" rev 0x00: msi, address 
00:03:2d:20:cf:84
em1 at pci2 dev 0 function 0 "Intel 82583V" rev 0x00: msi, address 
00:03:2d:20:cf:85
em2 at pci3 dev 0 function 0 "Intel 82583V" rev 0x00: msi, address 
00:03:2d:20:cf:86
em3 at pci4 dev 0 function 0 "Intel 82583V" rev 0x00: msi, address 
00:03:2d:20:cf:87

on i386 (GENERIC.MP).

-- 
Gregor



Watchdog timeouts with em on recent snapshots

2015-11-01 Thread Gregor Best
Hi people,

I just upgraded one of my routers to todays snapshot and I'm seeing

em0: watchdog timeout -- resetting

in the dmesg. How can I debug this properly? Full dmesg and the output
of ifconfig are below the signature.

-- 
Gregor

$ dmesg
OpenBSD 5.8-current (GENERIC.MP) #1341: Sun Nov  1 01:06:18 MDT 2015
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel(R) Atom(TM) CPU D2550 @ 1.86GHz ("GenuineIntel" 686-class) 1.87 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,SSE3,DTES64,MWAIT,DS-CPL,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF,PERF,ITSC,SENSOR,ARAT
real mem  = 2135064576 (2036MB)
avail mem = 2081611776 (1985MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: date 10/11/11, SMBIOS rev. 2.7 @ 0xe9380 (50 entries)
bios0: vendor American Megatrends Inc. version "4.6.5" date 06/21/2012
bios0: INTEL Corporation Tiger Hill
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG HPET SSDT SSDT SSDT IFEU
acpi0: wakeup devices P0P8(S4) PS2K(S3) PS2M(S3) USB0(S3) USB1(S3) USB2(S3) 
USB3(S3) USB7(S3) PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) 
PXSX(S4) RP04(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges
cpu0: apic clock running at 133MHz
cpu0: mwait min=64, max=64, C-substates=0.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Atom(TM) CPU D2550 @ 1.86GHz ("GenuineIntel" 686-class) 1.87 GHz
cpu1: 
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,SSE3,DTES64,MWAIT,DS-CPL,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF,PERF,ITSC,SENSOR,ARAT
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Atom(TM) CPU D2550 @ 1.86GHz ("GenuineIntel" 686-class) 1.87 GHz
cpu2: 
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,SSE3,DTES64,MWAIT,DS-CPL,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF,PERF,ITSC,SENSOR,ARAT
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Atom(TM) CPU D2550 @ 1.86GHz ("GenuineIntel" 686-class) 1.87 GHz
cpu3: 
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,SSE3,DTES64,MWAIT,DS-CPL,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF,PERF,ITSC,SENSOR,ARAT
ioapic0 at mainbus0: apid 4 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 5 (P0P8)
acpiprt2 at acpi0: bus 1 (RP01)
acpiprt3 at acpi0: bus 2 (RP02)
acpiprt4 at acpi0: bus 3 (RP03)
acpiprt5 at acpi0: bus 4 (RP04)
acpiec0 at acpi0: not present
acpicpu0 at acpi0: C1(@1 halt!)
acpicpu1 at acpi0: C1(@1 halt!)
acpicpu2 at acpi0: C1(@1 halt!)
acpicpu3 at acpi0: C1(@1 halt!)
acpitz0 at acpi0: critical temperature is 140 degC
acpipwrres0 at acpi0: FN00, resource for FAN0
acpitz1 at acpi0: critical temperature is 100 degC
acpibat0 at acpi0: BAT0 not present
acpibat1 at acpi0: BAT1 not present
acpibtn0 at acpi0: PWRB
acpiac0 at acpi0: AC unit offline
acpibtn1 at acpi0: SLPB
acpibtn2 at acpi0: LID0
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD02
bios0: ROM list: 0xc/0xf400! 0xcf800/0x1000 0xd0800/0x1000 0xd1800/0x1000 
0xd2800/0x1000
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 vendor "Intel", unknown product 0x0bf3 rev 0x04
vga1 at pci0 dev 2 function 0 "Intel GMA 3600" rev 0x0b
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: apic 4 int 16
pci1 at ppb0 bus 1
em0 at pci1 dev 0 function 0 "Intel 82583V" rev 0x00: msi, address 
00:03:2d:20:cf:84
ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: apic 4 int 17
pci2 at ppb1 bus 2
em1 at pci2 dev 0 function 0 "Intel 82583V" rev 0x00: msi, address 
00:03:2d:20:cf:85
ppb2 at pci0 dev 28 function 2 "Intel 82801GB PCIE" rev 0x02: apic 4 int 18
pci3 at ppb2 bus 3
em2 at pci3 dev 0 function 0 "Intel 82583V" rev 0x00: msi, address 
00:03:2d:20:cf:86
ppb3 at pci0 dev 28 function 3 "Intel 82801GB PCIE" rev 0x02: apic 4 int 19
pci4 at ppb3 bus 4
em3 at pci4 dev 0 function 0 "Intel 82583V" rev 0x00: msi, address 
00:03:2d:20:cf:87
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 4 int 23
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 4 int 19
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 4 int 18
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 4 int 16
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 4 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 

Re: pip for python3.4

2015-10-17 Thread Gregor Best
On Sat, Oct 17, 2015 at 06:58:44PM +0300, Joseph Oficre wrote:
> [...]
> How can i install pip for 3.4 python? I want to set up virtualenv and
> stuff, but in packages just 2.7 version.
> [...]

The package you're looking for is called py3-pip.

-- 
Gregor



Re: OpenBSD <> Commercial VPNs

2015-10-11 Thread Gregor Best
On Sun, Oct 11, 2015 at 12:08:00PM -0700, Danny Nguyen wrote:
> Has anyone succesfully created a VPN with OpenBSD v5.7 or 5.8?
> [...]

Yes. As of right now, I have

$ ps aux | grep openvpn | wc -l
8
$ ipsecctl -sa | wc -l
8

and a tinc tunnel. Tinc is not in ports, but there's a WIP port I sent
to ports@ a year or two ago.

It really depends on what you mean by "a vpn" because there's a lot of
technologies to do that. In my experience, openvpn is the easiest choice
if you want everything to work automagically on almost every platform
there is. Tinc is nice if you don't want a central node as a single
point of failure and IPsec is awesome on OpenBSD because it's extremely
easy to set up and in base.

> There are very few options on the market for that unfortunately.
> [...]

See above. There's also PPTP and what not.

-- 
Gregor



Re: /bsd: em0: watchdog timeout -- resetting

2015-10-02 Thread Gregor Best
Looks similar for my machine, em0 works for a short time and then
timeouts. `ifconfig em0 up` seems to hang though.

This is my em0:

em0 at pci0 dev 25 function 0 "Intel ICH9 IGP M AMT" rev 0x03: msi, address 
00:21:86:a1:1f:2b

Full dmesg:

OpenBSD 5.8-current (GENERIC.MP) #124: Wed Sep 30 23:12:11 CEST 2015
g...@hydrogen.unobtanium.de:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 6314201088 (6021MB)
avail mem = 6118715392 (5835MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (80 entries)
bios0: vendor LENOVO version "7UET94WW (3.24 )" date 10/17/2012
bios0: LENOVO 6474B84
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT APIC MCFG HPET SLIC BOOT ASF! SSDT TCPA DMAR 
SSDT SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) UART(S3) IGBE(S4) EXP0(S4) EXP1(S4) 
EXP2(S4) EXP3(S4) EXP4(S4) PCI1(S4) USB0(S3) USB3(S3) USB5(S3) EHC0(S3) 
EHC1(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 Duo CPU P8600 @ 2.40GHz, 798.14 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,NXE,LONG,LAHF,PERF,SENSOR
cpu0: 3MB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges
cpu0: apic clock running at 266MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2.1.3, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz, 798.01 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,NXE,LONG,LAHF,PERF,SENSOR
cpu1: 3MB 64b/line 8-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 0xe000, 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 -1 (EXP2)
acpiprt5 at acpi0: bus 5 (EXP3)
acpiprt6 at acpi0: bus 13 (EXP4)
acpiprt7 at acpi0: bus 21 (PCI1)
acpicpu0 at acpi0: !C3(100@162 mwait.3@0x50), !C2(500@1 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: !C3(100@162 mwait.3@0x50), !C2(500@1 mwait.1@0x10), 
C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: PUBS, resource for USB0, USB3, USB5, EHC0, EHC1
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 100 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "42T4645" serial   597 type LION oem "Panasonic"
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit offline
acpithinkpad0 at acpi0
acpidock0 at acpi0: GDCK not docked (0)
cpu0: Enhanced SpeedStep 798 MHz: speeds: 2401, 2400, 1600, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel GM45 Host" rev 0x07
vga1 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07
intagp0 at vga1
agp0 at intagp0: aperture at 0xd000, size 0x1000
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1440x900
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel GM45 Video" rev 0x07 at pci0 dev 2 function 1 not configured
"Intel GM45 HECI" rev 0x07 at pci0 dev 3 function 0 not configured
em0 at pci0 dev 25 function 0 "Intel ICH9 IGP M AMT" rev 0x03: msi, address 
00:21:86:a1:1f:2b
uhci0 at pci0 dev 26 function 0 "Intel 82801I USB" rev 0x03: apic 1 int 20
uhci1 at pci0 dev 26 function 1 "Intel 82801I USB" rev 0x03: apic 1 int 21
uhci2 at pci0 dev 26 function 2 "Intel 82801I USB" rev 0x03: apic 1 int 22
ehci0 at pci0 dev 26 function 7 "Intel 82801I USB" rev 0x03: apic 1 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 82801I HD Audio" rev 0x03: msi
azalia0: codecs: Conexant CX20561
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801I PCIE" rev 0x03: msi
pci1 at ppb0 bus 2
ppb1 at pci0 dev 28 function 1 "Intel 82801I PCIE" rev 0x03: msi
pci2 at ppb1 bus 3
iwn0 at pci2 dev 0 function 0 "Intel WiFi Link 5100" rev 0x00: msi, MIMO 1T2R, 
MoW, address 00:22:fa:d0:2f:a0
ppb2 at pci0 dev 28 function 3 "Intel 82801I PCIE" rev 0x03: msi
pci3 at ppb2 bus 5
ppb3 at pci0 dev 28 function 4 "Intel 82801I PCIE" rev 0x03: msi
pci4 at ppb3 bus 13
uhci3 at pci0 dev 29 function 0 "Intel 82801I USB" rev 0x03: apic 1 int 16
uhci4 at pci0 dev 29 function 1 "Intel 82801I USB" rev 0x03: apic 1 int 17
uhci5 at pci0 dev 29 function 2 "Intel 82801I USB" rev 0x03: apic 1 int 18
ehci1 at pci0 dev 29 

Re: OT: youtube video play in chromium - does play mode matters?

2015-09-03 Thread Gregor Best
On Wed, Sep 02, 2015 at 09:20:50PM +0300, Mihai Popescu wrote:
> Hello,
> 
> It is a little bit off topic, but this was discussed here in the past
> and I think it's nice to keep it here: some people complained about
> video playing in browsers. I have the same problems: too slow, sound
> stops, etc. I talk mostly about youtube and chromium. I use to play it
> in 240p resolution to match my hardware. Everithing greater brings
> trouble.
> [...]

I've been using chrome for a while now to play 720p videos, which mostly
work fine (some stuttering during heavy disk I/O aside). Play mode
doesn't seem to make a difference. I'm using compton (from ports) as my
compositing manager, maybe that's the key.

I'm running a snapshot from ~2 weeks ago (I think) but this has been
working for longer time. The kernel I'm using _does_ contain a few
changes, but I don't think they factor in here.

For the record, this is my dmesg:

OpenBSD 5.8-current (GENERIC.MP) #114: Tue Aug 25 20:14:17 CEST 2015
g...@hydrogen.unobtanium.de:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 6314201088 (6021MB)
avail mem = 6118944768 (5835MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (80 entries)
bios0: vendor LENOVO version "7UET94WW (3.24 )" date 10/17/2012
bios0: LENOVO 6474B84
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT APIC MCFG HPET SLIC BOOT ASF! SSDT TCPA DMAR 
SSDT SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) UART(S3) IGBE(S4) EXP0(S4) EXP1(S4) 
EXP2(S4) EXP3(S4) EXP4(S4) PCI1(S4) USB0(S3) USB3(S3) USB5(S3) EHC0(S3) 
EHC1(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 Duo CPU P8600 @ 2.40GHz, 2394.35 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,NXE,LONG,LAHF,PERF,SENSOR
cpu0: 3MB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges
cpu0: apic clock running at 266MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2.1.3, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz, 2394.01 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,NXE,LONG,LAHF,PERF,SENSOR
cpu1: 3MB 64b/line 8-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 0xe000, 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 -1 (EXP2)
acpiprt5 at acpi0: bus 5 (EXP3)
acpiprt6 at acpi0: bus 13 (EXP4)
acpiprt7 at acpi0: bus 21 (PCI1)
acpicpu0 at acpi0: !C3(100@57 mwait.3@0x30), !C2(500@1 mwait.1@0x10), C1(1000@1 
mwait.1), PSS
acpicpu1 at acpi0: !C3(100@57 mwait.3@0x30), !C2(500@1 mwait.1@0x10), C1(1000@1 
mwait.1), PSS
acpipwrres0 at acpi0: PUBS, resource for USB0, USB3, USB5, EHC0, EHC1
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 100 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "42T4645" serial   597 type LION oem "Panasonic"
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 2394 MHz: speeds: 2401, 2400, 1600, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel GM45 Host" rev 0x07
vga1 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07
intagp0 at vga1
agp0 at intagp0: aperture at 0xd000, size 0x1000
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: 1440x900
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel GM45 Video" rev 0x07 at pci0 dev 2 function 1 not configured
"Intel GM45 HECI" rev 0x07 at pci0 dev 3 function 0 not configured
em0 at pci0 dev 25 function 0 "Intel ICH9 IGP M AMT" rev 0x03: msi, address 
00:21:86:a1:1f:2b
uhci0 at pci0 dev 26 function 0 "Intel 82801I USB" rev 0x03: apic 1 int 20
uhci1 at pci0 dev 26 function 1 "Intel 82801I USB" rev 0x03: apic 1 int 21
uhci2 at pci0 dev 26 function 2 "Intel 82801I USB" rev 0x03: apic 1 int 22
ehci0 at pci0 dev 26 function 7 "Intel 82801I USB" rev 0x03: apic 1 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 82801I HD Audio" rev 0x03: msi
azalia0: codecs: Conexant CX20561
audio0 at azalia0
ppb0 at pci0 dev 28 

[RFC] dnsfoo, handling RDNSS and other DNS sources with Unbound

2015-08-03 Thread Gregor Best
Hi people,

inspired by the responses to my proposed patch to dhclient[0], I've
build a daemon that listens to IPv6 router advertisements and parses
dhclient lease files to extract DNS information.  This information is
then merged and fed to `unbound-control` to update Unbound's forward
zone. DHCPv6 support is not done yet, I'm still meditating on how to
integrate wide-dhcpv6 painlessly.

This allows me, for example, to use the IPv6-only subnet in my
hackerspace without additional set up or configuration such as DHCPv6,
since the router advertisements there already contain DNS information
via RFC6106 (RDNSS) options. It is also useful because I need special
name servers for top level domains not handled by the Internet root DNS
while still using dynamically configured DNS servers e.g. for my
home because we run a split-horizon DNS there for things like the file
server.

I'm mainly putting this out here to solicit comments on my coding style
and missing features that would make this more useful for other people.
One of the things that kind of stumps me at the moment (and which I'd be
really really grateful for any insights or thoughts on) is how to handle
the following situation:

  1. I am at home where I receive DNS information via both RDNSS and
 DHCP, both pieces of info are entered into Unbound's forward zone
  2. I suspend my laptop and resume it at university. Here I don't have
 RDNSS information available.
  3. The RDNSS information does not get replaced with more current info
 because I don't receive router advertisement that contain any info
  4. The IPv6 DNS entry from home lingers in unbounds forward zone

My only approach would be using a PF_ROUTE socket to get hey, your
default route just disappeared as a hint to drop DNS info for a
specific IP protocol. This feels like a direct path to race conditions
though.

If you have a bit of time to spare and are interested in dynamic DNS
configuration beyond use what my IPv4 DHCP gives me, I'd be grateful
if you could have a look at it.

[0]: https://marc.info/?l=openbsd-techm=143730414920578w=2
[1]: https://github.com/farhaven/dnsfoo

-- 
Gregor



Re: Show us your /etc/profile

2015-08-01 Thread Gregor Best
On Fri, Jul 31, 2015 at 05:25:49PM -0300, listas...@dna.uba.ar wrote:
 [...]
 How do you customize your environment?
 [...]

Colorful prompt with power line glyphs and SCM branch and routing table
id display [0].

 What aliases or custom functions do you use?
 [...]

My favorites are

  alias cp='rsync -Phr'
  alias ..='cd ..'

[0]: http://unobtanium.de/static/rice.png
[1]: https://github.com/farhaven/dotfiles/blob/master/kshrc

-- 
Gregor Best
--

Horse sense is the thing a horse has which keeps it from betting on
people.
-- W. C. Fields



Re: Audio problems with OpenBSD-current/amd64 on Acer C720p Chromebook

2015-07-31 Thread Gregor Best
On Fri, Jul 31, 2015 at 11:53:31AM +0300, li...@wrant.com wrote:
 [...]
 there is still stutter on disk activity on mp amd64 which is mostly in
 media players depending on gtk libs, it is embarrassing to say the
 least.
 [...]

I've seen something similar when my cvsync cronjob kicks in. I can live
with that though to be honest.

Your patch didn't apply though, you might want to resend it.

-- 
Gregor Best



Re: elementary opensmtpd setting on rental server

2015-07-22 Thread Gregor Best
On Wed, Jul 22, 2015 at 03:22:36PM +0200, Denis Fondras wrote:
 [...]
 You should re-read the manual :)
 If from is not specified, from local is assumed.
 [...]

Whoops, caught me. Thanks for the hint :)

-- 
Gregor Best



Re: elementary opensmtpd setting on rental server

2015-07-22 Thread Gregor Best
On Wed, Jul 22, 2015 at 05:31:56AM -0700, Seth wrote:
 [...]
 You might try adding this line an the end of smtpd.conf
 
 accept for any relay
 [...]

Please don't. This will allow people from the outside to send mail to
other people not on your machine using your server as a relay. This is
most certainly not what you want. Use something like

accept from local for any relay

or

listen on em0 \
tls pki mail auth \
tag AUTH
accept tagged AUTH for any relay

instead. This will require senders to either come from the local machine
or be authenticated before sending.

-- 
Gregor Best



Re: IPV6 routing issue

2015-06-26 Thread Gregor Best
On Fri, Jun 26, 2015 at 03:07:41PM +0200, Patrik Lundin wrote:
 [...]
 This would explain why you see neighbour solicitations on the outside
 interface. The upstream router is not aware that the prefix should be
 routed to you.
 [...]

I've also seen something similar. A friend of mine suggested [0], though
I haven't tried it. I circumvented my problem by using a routed /64 on a
Hurricane Electric tunnel.

Depending on your hosting provider, their setup might actually be
vulnerable to a neat little trick: If you see NDP requests for prefixes
that are not your own while tcpdump'ing your external interface, you
might be able to add an address inside one of those networks to your
external interface and have it reachable from the outside, so that in
effect you can use an IPv6 address that's outside of your prefix.

[0]: https://github.com/DanielAdolfsson/ndppd

-- 
Gregor Best



Re: Temperature

2014-11-15 Thread Gregor Best
On Fri, Nov 14, 2014 at 06:27:10PM +, Etienne wrote:
 [...]
 (93C is just a typical value, I've seen any between 92 and 98). I
 usually have just the time to log in before the system logs me out and
 shuts down. This laptop normally runs at around 80??C, and I think the
 temperature reading in OpenBSD is correct, because I get similar
 warnings
 and temperature values when I reboot immediately into another OS.
 [...]

So running on another OS for a longer time has the temperature of your
laptop staying at around 80C? That sounds awfully high. Maybe you just need
to clean out the fans and airways inside the laptop and the timing is just
a coincidence.

Just make sure the fan does not turn (by blocking it with a toothpick or
the like) when blowing compressed air through the case or vacuuming out
dustbunnies so the bearing does not get damaged.

-- 
Gregor Best



sndio: watchdog timeout when recording from internal mic on Thinkpad T400

2014-11-09 Thread Gregor Best
Hi people,

I'm trying to record audio from my Thinkpads internal microphone
on -current (-ish, but as far as I see, there are no sound related
changes missing). The audio device is:

   azalia0 at pci0 dev 27 function 0 Intel 82801I HD Audio rev 0x03: msi
   azalia0: codecs: Conexant CX20561
   audio0 at azalia0

As far as I understand it, starting sndiod with

   sndiod -d -C 2:3

should make mic2 (the internal microphone) the default. If I now
try recording without explicitly specifying an audio device, after
a few seconds, sndio prints

   snd0: watchdog timeout

and the audio device gets closed, without any of the audio making
it into the recording application. As far as I can see, the timeout
occurs during sio_open(SIO_DEVANY, SIO_REC, 0) inside the application.
Recording from the external microphone (ADC channels 0:1) works
fine.

What would be the easiest way for me to debug this?

Below is the output of mixerctl:

   inputs.dac-0:1=150,150
   inputs.dac-2:3=150,150
   inputs.beep=85
   record.adc-2:3_source=mic2
   record.adc-2:3=126,126
   record.adc-0:1_source=mic
   record.adc-0:1=126,126
   outputs.hp_source=dac-0:1
   outputs.hp_boost=off
   inputs.mic=189,189
   outputs.mic_dir=input-vr80
   outputs.spkr_source=dac-2:3
   outputs.spkr_eapd=on
   inputs.mic2=126,126
   outputs.hp_sense=unplugged
   outputs.mic_sense=unplugged
   outputs.master=151,151
   outputs.master.mute=off
   outputs.master.slaves=dac-0:1,dac-2:3
   record.volume=126,126
   record.volume.mute=off
   record.volume.slaves=adc-2:3,adc-0:1

Thanks for your help.

-- 
   Gregor Best



Re: ksh, csh same vulnerability as bash

2014-10-08 Thread Gregor Best
On Tue, Oct 07, 2014 at 10:05:57PM -0700, Jason Adams wrote:
 [...]
 So the question is, for those of us that have added the bash package,
 why is bash still vulnerable after all these weeks, when everyone else has 
 fixed
 their bash packages?
 
 Just checked for updated pkg, today, and its still vulnerable.
 [...]

I'm running current here, with bash-4.3.28 from packages. The error
seems fixed:

$ env x=() { :; }; echo fnord bash -c 'echo whee'
whee
$

Looks good to me. Are you running 5.5? Then the mtier packages are
probably a good idea.

-- 
Gregor Best



Re: Intel i354 Quad GbE network adapter failed on 5.5-RELEASE

2014-08-28 Thread Gregor Best
Hi Axel,

since you seem to be deploying a new setup, I'd simply install a
snapshot. The release of 5.6 is soon(-ish), so I doubt there will
be lots of functional changes until then, and it'd be wise to upgrade
anyway once 5.6 is out.

-- 
Gregor Best



Re: test tool to load pf rules

2014-06-14 Thread Gregor Best
I just use something like

pfctl -v -f /etc/pf.conf.new ; sleep 30; pfctl -f /etc/pf.conf

in a tmux session. That gives me 30 seconds to test what I was going to
test and then reverts to the original file.

-- 
Gregor Best
--

After I run your program, let's make love like crazed weasels, OK?



Re: Ruby, Python programs are unusually slow

2014-06-11 Thread Gregor Best
On Wed, Jun 11, 2014 at 05:52:12PM +0100, Kaashif Hymabaccus wrote:
 [...]
 I know this isn't a problem with my hardware (a ThinkPad T61) being
 slow,
 [...]

Definitely, my R61 starts a Python HTTP server almost instantly.

 Seeing as the problem
 is worst with programs that access the network, maybe the problem has
 something to do with that?
 [...]

Could be a problem with name resolution. Do you have an entry for your
hostname in /etc/hosts? How quick is name resolution in general, i.e.
via something like

host localhost
host `hostname -s`
host openbsd.org

-- 
Gregor Best



Re: OpenSMTPD exits with value 1 when clients attempd to authenticate

2014-04-13 Thread Gregor Best
On Fri, Apr 11, 2014 at 03:07:02PM +0200, Eric Faurot wrote:
 [...]
 This is a fallout due to the merging of multiple processes. It's been
 fixed in cvs two days agos.
 [...]

Wonderful. Everything is back to normal now, thanks.

-- 
Gregor Best



OpenSMTPD exits with value 1 when clients attempd to authenticate

2014-04-11 Thread Gregor Best
Hi people,

I'm running OpenSMTPD 5.4.3 from -current on my private mail server. After a
recent update, using authentication for sending mail cause smtpd to exit with
exit value 1. A (stripped down) configuration that exhibits the issue is the
following:

  pki server certificate /etc/mail/certs/server.crt
  pki server key /etc/mail/certs/server.key

  listen on egress port submission tls-require pki server auth tag AUTH
  accept tagged AUTH from local for any relay

When running smtpd with that configuration and attempting to send an email,
this is the output I get from smtpd -dv:

  [... Usual smtpd startup for OpenSMTPD 5.4.3 ...]
  debug: smtp: new client on listener: 0x768b632a000
  smtp-in: New session 5d471824a3b1c9d2 from host 
eduroam-75-222.uni-paderborn.de [131.234.75.222]
  debug: lka: looking up pki server
  debug: session_start_ssl: switching to SSL
  smtp-in: Started TLS on session 5d471824a3b1c9d2: version=TLSv1/SSLv3, 
cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256
  smtpd: session_imsg: unexpected IMSG_LKA_AUTHENTICATE imsg
  warn: lka - pony: pipe closed
  warn: parent - pony: pipe closed
  warn: mfa - pony: pipe closed
  warn: queue - pony: pipe closed
  warn: control - pony: pipe closed
  warn: scheduler - control: pipe closed
  [... After this, smtpd has exited with status 1 ...]

The client (mail/msmtp from ports) prints the following:
  msmtp: cannot read from TLS connection: a protocol violating EOF occured

The debug output from msmtp is the following:

  loaded system configuration file /etc/msmtprc
  loaded user configuration file /home/gbe/.msmtprc
  using account unobtanium from /home/gbe/.msmtprc
  host  = unobtanium.de
  port  = 587
  timeout   = off
  protocol  = smtp
  domain= localhost
  auth  = choose
  user  = gbe
  password  = *
  passwordeval  = (not set)
  ntlmdomain= (not set)
  tls   = on
  tls_starttls  = on
  tls_trust_file= (not set)
  tls_crl_file  = (not set)
  tls_fingerprint   = 
EB:8E:EA:3A:BC:3A:1D:6C:C4:80:5F:FB:A8:24:C8:EB:C8:24:71:5D
  tls_key_file  = (not set)
  tls_cert_file = (not set)
  tls_certcheck = on
  tls_force_sslv3   = off
  tls_min_dh_prime_bits = (not set)
  tls_priorities= (not set)
  auto_from = off
  maildomain= (not set)
  from  = g...@unobtanium.de
  dsn_notify= (not set)
  dsn_return= (not set)
  keepbcc   = off
  logfile   = /home/gbe/log/msmtp/log
  syslog= (not set)
  aliases   = (not set)
  reading recipients from the command line
  -- 220 neon.unobtanium.de ESMTP OpenSMTPD
  -- EHLO localhost
  -- 250-neon.unobtanium.de Hello localhost [131.234.75.222], pleased to meet 
you
  -- 250-8BITMIME
  -- 250-ENHANCEDSTATUSCODES
  -- 250-SIZE 36700160
  -- 250-DSN
  -- 250-STARTTLS
  -- 250 HELP
  -- STARTTLS
  -- 220 2.0.0: Ready to start TLS
  TLS certificate information:
  Owner:
  Common Name: gbe.ring0.de
  Issuer:
  Common Name: CAcert Class 3 Root
  Organization: CAcert Inc.
  Organizational unit: http://www.CAcert.org
  Validity:
  Activation time: Sun Jul  7 18:28:15 2013
  Expiration time: Tue Jul  7 18:28:15 2015
  Fingerprints:
  SHA1: EB:8E:EA:3A:BC:3A:1D:6C:C4:80:5F:FB:A8:24:C8:EB:C8:24:71:5D
  MD5:  69:40:AD:DD:02:63:41:C1:67:55:34:3E:63:95:06:6A
  -- EHLO localhost
  -- 250-neon.unobtanium.de Hello localhost [131.234.75.222], pleased to meet 
you
  -- 250-8BITMIME
  -- 250-ENHANCEDSTATUSCODES
  -- 250-SIZE 36700160
  -- 250-DSN
  -- 250-AUTH PLAIN LOGIN
  -- 250 HELP
  -- AUTH PLAIN AGdiZQA0bjRyY2hZXw==

Yes, the certificate is weird (common name does not match the host name), but
that should not cause the smtp daemon to exit. The setup worked before my last
update, but I can't pinpoint the previous version of OpenSMTPD because the
maillog rotated away before I noticed the issue.

What am I doing wrong here? And how can I debug this further?

-- 
Gregor Best



Re: OpenSMTPD exits with value 1 when clients attempd to authenticate

2014-04-11 Thread Gregor Best
Hi Remco,

On Fri, Apr 11, 2014 at 01:18:54PM +0200, Remco wrote:
 [...]
 Is this commit the culprit:
 http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libssl/cert.pem?rev=1.24
 [...]

I think that is quite unlikely. I still have the old version of
/etc/ssl/cert.pem because I didn't see the point of removing certificate
authorities I use myself.

Also, I don't think a missing certificate authority for the server's own
certificate would cause the smtp daemon do exit, especially since it
doesn't print out any message regarding certificate validity.

-- 
Gregor Best



Re: claws-mail

2014-04-03 Thread Gregor Best
On Thu, Apr 03, 2014 at 01:12:33PM +0200, Stefan Wollny wrote:
 [...]
 GLib-GObject:ERROR:gvaluetypes.c:455:_g_value_types_init: assertion failed: 
 (type == G_TYPE_CHAR)
 Abort trap 
 [...]

I had the same problem just a few minutes ago. On my machine the
issue was a leftover /usr/local/lib/libgobject-2.0.so.3800.0. The
update installed libgobject-2.0.so.4000.0, but that was not picked
up by programs using it. Since they were linked against the new
version and loaded the old at runtime, *BAM*.

Removing the old file fixes the problem. Note that you might have
to rebuild ports that linked against that file.

-- 
Gregor Best



Re: How to compile stuff?

2014-02-17 Thread Gregor Best
On Mon, Feb 17, 2014 at 10:36:29AM -0700, nvw6lxh2yt...@pyramidheadgroup.ca 
wrote:
 Because it was not supposed to compile anything at that time.
 [...]

But you did install it before your first post to misc@, right? If not,
you might want to boot bsd.rd and do an upgrade from there, this time
without de-selecting anything.

-- 
Gregor Best



Re: erlang : manpages : inaccessible

2014-02-05 Thread Gregor Best
On Tue, Feb 04, 2014 at 06:49:33PM -0600, Matthew Weigel wrote:
 [...]
 I believe you should be using man erlang page with that configuration.
 [...]

The correct form is for example

erl -man time

-- 
Gregor Best
--

I never met a piece of chocolate I didn't like.



Re: rdomain's overall weirdne­ss

2014-02-04 Thread Gregor Best
On Tue, Feb 04, 2014 at 02:31:37PM +0400, def wrote:
 [...]
 6. has two peers with different ASthere is filter on second peer that
 deny large portion of prefixesthe case:at initial state just after both
 sessions are UP i have full table from peer2 ~110k prefixesreal prefix number
 after filter applied ~ 23khow i see the peer with bgpctl 
 40 mins # bgpctl sh
 ip bgp sumNeighbor   ASMsgRcvdMsgSent  OutQ Up/Down
 State/PrfRcvdpeer1 ASX  58590550 0 00:40:23
 223179peer2 ASY  20152589 0 00:40:52  90426
 [...]

Uhm... Do you mind adding a tiny bit more punctuation, whitespace and
capitals at the beginning of your sentences? Your thoughts are really,
really hard to follow.

The occasional linebreak could also help.

-- 
Gregor Best



Re: Request for Funding our Electricity

2014-01-16 Thread Gregor Best
On Wed, Jan 15, 2014 at 09:55:04PM +, Franchini Fabien wrote:
 [...]
 I suggest to write a letter to theses companies who are known to using OpenBSD
 or other product-related like OpenSSH. In this letter we can explain (as the 
 first 
 post from Theo) our issue. I'm sure they can give us an hand if they know our
 problem. And in my opinion, ONLY a company can give us a long-term solution.
 [...]

Maybe to inject a further point into this discussion... One of these
companies is Apple. They replaced ipfw with pf in recent releases of
Darwin (see [0]).

Since, with Darwin being Open Source, they seem not entirely against
spending resources on Open Source Software, and they profit in no small
margin from the OpenBSD project and its satellites like OpenSSH, they
might be a good recipient for a polite letter in request of help. Not
the least because they could use their assistance in their marketing
(Look how cool we are, we are paying them their electricity!).

 [...]
 Sorry I'm not a native english-speaker and I can't help to write a letter 
 like that
 but I'm sure that's realistic solution.
 [...]

Same for me. Still, if this is not entirely off the table, I'd be
willing to draft something.

 [...]
 Another solution is to approach the *BSD community. FreeBSD are bigger
 than us and how they'll solve these kind of problem ?
 [...]

Fewer architectures, more corporate backing, I'd say.

[0]: 
https://developer.apple.com/library/mac/documentation/darwin/reference/manpages/man8/ipfw.8.html

-- 
Gregor Best



Re: Potential scripting engine to integrate into mg?

2013-12-02 Thread Gregor Best
On Mon, Dec 02, 2013 at 08:41:47PM -, Edward L. wrote:
 [...]
 Any thoughts?
 [...]

For that, tinyscheme, lua or python would have to be integrated into
base. That seems rather unlikely.

What would be nice would be to take the Lisp interpreter from xedit and
integrate it into mg. Xedit is in base, the engine is reasonably fast
(for a Lisp integrated into an editor) and the language itself is rather
nice.

-- 
Gregor Best
--

Valerie: Aww, Tom, you're going maudlin on me ...
Tom: I reserve the right to wax maudlin as I wane eloquent ...
-- Tom Chapin



Re: Are there OpenBSD users who are not IT professionals?

2013-11-19 Thread Gregor Best
On Tue, Nov 19, 2013 at 01:28:30PM -0700, eric oyen wrote:
 [...]
 ALso, I am virtually the only blind user of OpenBSD that I know of
 [...]

Which reminds me... If I recall correctly, one of your issues was the
installation procedure being targeted at sighted users. -current has
an option for automatic installation via previously prepared answers
to the questions bsd.rd asks. Did you give that a try, and if so, how
did it work out? I'd be really interested in if it can improve the
installation process for you and other visually impaired users.

-- 
Gregor Best



Adding rules to pf anchors from the commandline fails

2013-10-15 Thread Gregor Best
Hi people,

I've upgraded to my laptop to a fresh snapshots a few minutes ago. I
noticed that the way I previously changed pf anchor content from the
command line does not work any more. pfctl fails with a

pfctl: pfctl_get_ticket: assertion failed

The following pf.conf can be used to replicate the problem:

anchor test

Using

echo pass on bge0 | pfctl -a test -f -

produces the mentioned error message and does not update the anchor
content. Even passing an empty string fails.

Before the 'add new queueing stuff' patch was committed, this worked.
I added a few printfs to pfctl, and it looks like the failure path
starts at pfctl_load_queues. If there's anything I can do to help debug
this, I'd be glad to do so :)

-- 
Gregor Best



Re: Sorry OpenBSD people, been a bit busy

2013-10-07 Thread Gregor Best
On Mon, Oct 07, 2013 at 11:10:36AM +0200, mxb wrote:
 I'd turn this to police
 [...]

That might however generate a Streisand effect, where the slanderous
statements are spread even more.

 and tried to make Twitter to shut down this account.

Since it's marked as a parody account, I don't think that would be
successful. Maybe laying out the account history, with it being
marked as parody only a few days ago, might do something.

Theo: Regardless of the public opinion or annoying people on
twitter, I want to reiterate the point Rodrigo made a few messages
up.

In the few mails we exchanged a while back, I've experienced you
as a very polite and to the point engineer, contrary to what the
opinion of some people might be.

And then, it's awesome to hear about YYCIX.

-- 
Gregor Best
--



Re: Snapshots of Sep 24

2013-09-28 Thread Gregor Best
On Fri, Sep 27, 2013 at 10:44:23PM +0200, Dmitrij D. Czarkoff wrote:
 Hello!
 
 I was updating my amd64 laptop with September 24 snapshot's bsd.rd, and it
 didn't let me select etc and xetc sets - they were simply missing in the list
 of sets. Is it a glitch? Or may be I missed some news?
 [...]

Upgrades from bsd.rd don't include {,x}etc??.tgz. Use sysmerge for
those.

-- 
Gregor Best



Re: install5x.iso

2013-09-13 Thread Gregor Best
On Fri, Sep 13, 2013 at 10:06:10AM -0400, Richard Thornton wrote:
 I am curious - given that OpenBSD ships each RELEASE with X , but
 applications like Firefox will not work without installing another DE,
 [...]

That is not true. I ran Firefox and Chrome on a clean OpenBSD 4.9
installation when it was released and I have been able to since then,
and I find it hard to believe it was different before.

 [...]
 XFCE; why not ship OpenBSD with the basic X, but with the necessary
 libraries to allow FireFox to run and other applications like R to output
 graphics?  Also why not go ahead and ship with Firefox?  The disk would
 still be within the size of a standard CD.
 [...]

Installing Firefox with pkg_add adds the required libraries
automatically. If it does not, that's a bug in the port that should be
reported.

Adding Firefox to the base system would be a very bad idea. It is a huge
load of code that needs to be maintained and not everyone uses Firefox.
What if I want Chrome instead? Add that to base? What about dillo?
netsurf? Why not add OpenOffice while we are at it?

-- 
Gregor Best



Re: Modern C++ Compiler for OpenBSD

2013-09-10 Thread Gregor Best
On Tue, Sep 10, 2013 at 05:40:19PM -0400, Jeffrey Walton wrote:
 [...]
 Does anyone have a C++ compiler recommendation for OpenBSD?
 [...]

What about GCC? Clang++'s C++11 support is spotty at best, at least it
was the last time I tried.

-- 
Gregor Best



IPSec and routing of IPv6

2013-08-25 Thread Gregor Best
Hi people,

I am having a few problems getting routing of IPv6 over IPSec to work. I
have two nodes, one is a server, one is my laptop. On the server, I have
IPv6 access over a gif interface. There is a /64 routed to the server,
which I want to use on my laptop.

I have now set up an IPSec tunnel between my laptop and the server, with
the following configuration, in /etc/ipsec.conf:

# on my laptop
unobtanium_v6 = 2001:470:1f0b:1d3::/64
ike esp from any to $unobtanium_v6 peer unobtanium.de \
main auth hmac-sha1 enc aes-256 \
quick auth hmac-sha1 enc aes-256 \
psk secretkey \
tag IPSEC-UNO

# on the server
unobtanium_v6 = 2001:470:1f0b:1d3::/64

ike passive esp from $unobtanium_v6 to any \
main auth hmac-sha1 enc aes-256 \
quick auth hmac-sha1 enc aes-256 \
psk Sahpeque2quieC8e \
tag IPSEC-UNO

The link between both machines seems to be up and running. On both
machines, I have configured a bridge with the link2 flag set, which
according to the manpage causes IPSec traffic to be sent over the
bridge. The bridges each have a vether device in them, with addresses in
the subnet in the ipsec.conf.

Pinging the other side of the tunnel works fine, as does other direct
traffic, but only if it does not originate from the link-local address
of the vether device.

Using tcpdump on pflog0 with a pass log inet6 in /etc/pf.conf, does
not show anything. Shouldn't traffic at least show up in pf?

What did I miss? Using from any to any does not change the situation
at hand.

-- 
Gregor Best



Re: ifconfig(8) --frontend

2013-08-04 Thread Gregor Best
I don't use a GUI but I hacked together a little Python script that
basically calls `ifconfig wpi0 scan` to obtain a list of available
networks, filters out the known ones, sorts them by priority and signal
strength and then configures the one on the top of the list with
ifconfig and if need be, with wpa supplicant.

The priority and strength sorting is done so I can have multiple
wireless networks in the same location configured and readily available.

Then I have a script that pings the current IPv4 gateway, or, if that is
not available, IPv6 gateway, and once 5 or more packets are missed, just
calls /etc/netstart. The /etc/hostname.if file for wpi0 calls the Python
script and the /etc/hostname.if for trunk0 configures everything for
DHCP. I do this because I have a wireless + wired trunk for transparent
switchover.

If there's a demand, I can upload the scripts somewhere. There is also
some Set up VPNs if I am in an untrusted location-stuff in there but
it relies on some way to identify the network one is currently attached
to. This is currently done by a shell script that checks for things like
known wireless ESSIDs, known gateway MAC addresses and known network
topologies, for example When I'm at home, my gateway is 192.168.2.1,
there's a host named Zim and one named Gir and my public IP address
resolves back to Unity Media. That's probably unportable and needs to
be reimplemented for every user.

-- 
Gregor Best



Re: Recording from azalia does not work

2013-07-09 Thread Gregor Best
On Tue, Jun 26, 2012 at 09:46:23PM -0700, patrick keshishian wrote:
 [...]
 sleep-wake cycle test?
 

I had the problem again, and indeed, suspending the machine with zzz and
resuming it fixes audio input. Is there anything I can do to investigate
this? Dump some hardware registers before and after sleeping maybe (and
which registers would be interesting?)

-- 
Gregor Best



Re: IPv6, automatic configuration and nameservers

2013-06-23 Thread Gregor Best
On Fri, Jun 21, 2013 at 09:28:32PM -0400, Brad Smith wrote:
 [...]
 As you have already noticed our rtsold does not have support for RFC
 6106 (yet). The only option you have at the moment is using a DHCPv6
 client such as net/isc-dhcp.
 [...]

That's what I do at the moment. I have a small script that uses dhcp6c
(from net/wide-dhcpv6) in info-req mode to grab the nameserver from
DHCPv6. That means I have to set up DHCPv6 in addition to router
advertisements, but I am the administrator of all v6-only networks I
have access to so that's not to big of a deal.

While setting that up, I noticed a small bug in rtsold. When called as
rtsol it does not recognize the -O option. I will cook up a small patch
to fix that soon(ish).

-- 
Gregor Best



IPv6, automatic configuration and nameservers

2013-06-13 Thread Gregor Best
Hi list,

recently, I've been playing around a bit with IPv6, and IPv6-only
networks. While doing that, I have not found an automated way to add
nameservers announced via router advertisements.

dhclient does that for IPv4 but the rtsol in OpenBSD doesn't have FreeBSD's
-R option for adding recursive nameservers (and porting that without
also porting resolvconf seems to be less than trivial).

Is there a canonical solution with only the things in base or should I
just use something from ports?  And what's the port people use for that?

-- 
Gregor Best



Re: IPv6, automatic configuration and nameservers

2013-06-13 Thread Gregor Best
On Thu, Jun 13, 2013 at 01:53:20PM +0200, Gregor Best wrote:
 [...]
 (and porting that without also porting resolvconf seems to be less than
 trivial).
 [...]

For the record, I meant 'not trivial' instead of 'less than trivial'.

-- 
Gregor Best



Re: Can't Mount CD-ROM (Newbie)

2013-06-11 Thread Gregor Best
You might want to try /dev/cd0i instead. cd0a would be the first OpenBSD
partition inside a disklabel on cd0, which I highly doubt is there. The
error Device not configured refers to cd0a, not cd0.

-- 
Gregor Best



Re: YNT: Can't Mount CD-ROM (Newbie)

2013-06-11 Thread Gregor Best
On Tue, Jun 11, 2013 at 06:35:07PM +0300, Umut Berk Alkan wrote:
 No any changes.
 
 P.s. I'm trying to burn a ISO file, which I think I will need a mounting on
 blank dvd?
 [...]

So the disc you are trying to mount is empty? In that case, mounting
won't do anything because there's no file system on the disc. Burning
one is done with cdio(1). The `tao` option should be what you want, as
in:
cdio tao /path/to/image.iso

If a disc populated with a file system still fails, try cd0c instead of
cd0i. It's been a long while since I last used optical media.

-- 
Gregor Best



Re: Disable inteldrm

2013-06-06 Thread Gregor Best
On Wed, Jun 05, 2013 at 09:18:26AM -0300, Daniel Bolgheroni wrote:
 [...]
 http://marc.info/?l=openbsd-miscm=136688870408752w=2
 [...]

Just for the record, that URL links to a post about IPSEC. I'm quite
confident you meant another post :)

 Disabling with 'boot -c' is OK, X works, but I can't set my native
 resolution. Setting Option DRI to False in xorg.conf doesn't help
 either.
 [...]

That is because the intel driver in current Xenocara needs inteldrm for
the modesetting. If the modesetting is not available, the intel driver
fails to attach and Xenocara falls back to vesa, which only supports the
most basic resolutions.

Might I ask why you want to disable inteldrm? A bug report that leads to
an actual fix for your problem might be more useful than sidestepping
the issue.

-- 
Gregor Best



Re: How does OpenBSD do backups?

2013-04-28 Thread Gregor Best
On Sat, Apr 27, 2013 at 11:38:24PM -0700, Robert Connolly wrote:
 I am a minimalist. I strongly prefer to use what is in base to do what I
 need to do. I know Duplicity exists, but how would I reproduce what
 it does with the OpenBSD base? Set up a local CVS server, and send
 differences off site?
 
 Thanks
 

You might want to look into the manpages of dump(8) and restore(8). If
you don't want to use rsh as the means for data transport between the
two (Hint: you don't, at least not on a public network), they work fine
in an ssh pipeline like this:

dump -f - /home/gbe | ssh backuphost cat  /backups/2013-04-28.dump

Restoring is then a simple

cd /home/gbe; ssh backuphost cat /backups/2013-04-28.dump | restore 
-r -f -

You can also install rsync from ports, it can hardlink already existing
files to the target so you get a complete tree without duplicating
existing data.

-- 
Gregor Best



Re: CVS: cvs.openbsd.org: src - kms

2013-03-18 Thread Gregor Best
On Mon, Mar 18, 2013 at 02:13:20PM +0100, LEVAI Daniel wrote:
 On h, márc 18, 2013 at 06:36:52 -0600, Jonathan Gray wrote:
 [...]
  Log message:
  Significantly increase the wordlist for ddb hangman,
  and update our device independent DRM code and the Intel DRM code
  to be mostly in sync with Linux 3.8.3.  Among other things this
  brings support for kernel modesetting and enables use of
  the rings on gen6+ Intel hardware.
  [...]

Just to get this clear though, the 'gen6+ only' bit is meant for _both_ KMS and
rings, right?

-- 
Gregor Best



Re: Why to use packages?

2013-03-16 Thread Gregor Best
On Sat, Mar 16, 2013 at 03:59:59PM +0400, Alexander Nusov wrote:
 Got it, thanks!
 As far I understood one reason to use packages is bootstrapping? So
 install packages first then update all needed software from ports?
 [...]

Since packages are built from ports, that effort is nil. The only
halfway sane reason I can think of not to use packages but ports is
being to lazy to upgrade from an old -CURRENT snapshot to a newer one.
For the security-conscient, that should not be an issue, because you are
always running -CURRENT or -STABLE anyway.

-- 
Gregor Best



Re: openBSD 5.2 amd64 on lenovo x201s, part 2 apm support and overheating

2013-01-29 Thread Gregor Best
On Tue, Jan 29, 2013 at 12:07:10PM +0100, Stefan Sperling wrote:
 [...]
 Try sucking dust out of the heat vent with a hoover.
 That helped me once with a thinkpad that kept shutting down itself
 due to overheating.
 [...]

FWIW, I'd unplug the fan before doing that. The suction from the vaccum
causes the fan to rotate, and in turn generate (a small amount of) power.
That power is fed into the fan controller where the controller expects
power to go _towards_ the fan instead of coming in, maybe damaging the
controller. I don't know whether that's still an issue with modern Thinkpads
but better safe than sorry.

-- 
Gregor Best



Re: OpenBSD/iwn(4) support for WPA2/PEAP/MSCHAPv2?

2013-01-23 Thread Gregor Best
Most universities offer an unencrypted wireless lan with forced VPN
connections though. That's what I use here at UPB until maybe sometime
in the future my beloved OpenBSD supports WPA2 enterprise.

-- 
Gregor Best



Re: OpenBSD/iwn(4) support for WPA2/PEAP/MSCHAPv2?

2013-01-23 Thread Gregor Best
On Wed, Jan 23, 2013 at 06:18:09PM +0100, Erling Westenvik wrote:
 [...]
 Thanks. Then I'll just have to wait. In the meanwhile I can connect
 using the unsecured wifi network here. Just a hazzle having to log
 on through a web interface every time..
 [...]

Web interfaces can be automated... I use the following to log into the
unsecured WIFI at UPB:

curl -k -F buttonClicked=4 -F username=FOO -F password=PASS 
https://webauth/login.html;

-- 
Gregor Best



Re: how to use cpu affinity from user space

2013-01-22 Thread Gregor Best
On Tue, Jan 22, 2013 at 07:56:22PM +1000, David Diggles wrote:
 Then if the scheduler always knows what's best, the backup process will be
 completely uninhibited, on a system maxed out on all cores.
 [...]

What backup process? And why will it be uninhibited? If the system's
maxed out, all processes will neccessarily suffer.

-- 
Gregor Best



Re: How to build GNUstep programs on OpenBSD?

2013-01-21 Thread Gregor Best
On Mon, Jan 21, 2013 at 11:30:50PM +0800, Salil Wadnerkar wrote:
 [...]
 And then I run:
 make
 [...]

/usr/bin/make is BSD make. You most probably want gmake.

-- 
Gregor Best



Re: trunk limits

2013-01-03 Thread Gregor Best
On Thu, Jan 03, 2013 at 06:46:43PM -0200, Friedrich Locke wrote:
 [...]
 How many network interface may i have per trunk device ?
 [...]

trunk(4) does not have the answer but perusing net/if_trunk.h leads me
to the conclusion that the maximum number of ports on a trunk device is
32. Maybe that should be added to trunk(4).

-- 
Gregor Best



Re: Bitcoin client for OpenBSD?

2012-10-18 Thread Gregor Best
On Tue, Oct 16, 2012 at 05:03:47AM +0200, Dave U. Random wrote:
 If you can post the diff here I'll pick it up that way. Thank you.
 [...]

The diff is at http://unobtanium.de/static/bitcoin-v0.6.1-openbsd.diff
As visible from the filename, the patch is intended for the v0.6.1
source of bitcoin. It allows building the bitcoin daemon with the
regular

cd src; gmake -f makefile.unix

The patch _should_ work for current git HEAD, but I couldn't verify that
since g++ consumes an awful lot of memory when compiling (even v0.6.1)
which led to out of memory situations when compiling HEAD. YMMV.

There has been a post to ports@ a few months (IIRC) ago with a proper
port of bitcoin (not done by me), maybe that works out better for you.

-- 
Gregor Best



Re: Bitcoin client for OpenBSD?

2012-10-15 Thread Gregor Best
On Mon, Oct 15, 2012 at 07:12:35PM +, Anonymous wrote:
 Is there a bitcoin client for OpenBSD or is anyone porting one? Seems like
 OpenBSD would be a good OS to host a client considering there are viruses
 and exploits of that well known *cough* OS *cough* that too many people use.
 

The regular bitcoind compiles relatively cleanly. I have a few patches
lying around, but it mostly boils down to adding

|| __OpenBSD__

in the places gcc complains. I'll try to get the patches into a port
ASAP, but I'm kinda swamped right now, so don't hold your breath (and
maybe ports@ won't even accept the port :) If you want, I can send the
diff to you off-list though.

-- 
Gregor Best



Re: WPA2 AES on OpenBSD

2012-09-18 Thread Gregor Best
On Tue, Sep 18, 2012 at 09:26:47PM +0200, obsd, wifi wrote:
 I have an OpenBSD 5.1 i386 installed. I have no GUI/X. I googled for the
 answer but I can't find authentic one. How can I connect to a WPA2 PSK/AES
 wifi network using only the terminal? (so I don't have a network manager
 to simply select the given SSID, then enter passphare)

 Thanks for the short help, IMHO a lot of you configure wireless through
 terminal..
 [...]

I'm sure you've already read the ifconfig manpage...

--
Gregor Best

[demime 1.01d removed an attachment of type application/pgp-signature]



Re: Kernel Level Audio Next Generation

2012-08-01 Thread Gregor Best
On Wed, Aug 01, 2012 at 10:55:36PM +0200, Tobias Ulmer wrote:
 [...]
 Heh, that's by the guy who got his ass whooped by Lennart at 27c3. His
 talk made me cringe...
 [...]

Hehe, I also though wait a second... that name is familiar. I remember the
mixture
of pain (because I kinda felt sorry for the poor bastard) and pleasure
(because
he got what he deserved) when I was sitting in that audience.

 [...]

--
Gregor Best

[demime 1.01d removed an attachment of type application/pgp-signature]



Re: Help neede for 'pkgin'

2012-07-10 Thread Gregor Best
On Tue, Jul 10, 2012 at 03:00:28AM -0700, srimanta kundu wrote:
 [...]
 I have installed netBSD 5.1.2 via VMWare Player. But I cannot use
 [...]

This is an _Open_BSD mailing list. You're in the wrong place

 [...]
 can get that command in my netBSD?
 [...]

Same as above

 [...]
 After installing that I want to update the
 openSSL from 0.9.9 to 1.0.1 using pkgin. So what will be the exact command
to
 do that.
 [...]

RTFM

--
Gregor Best

[demime 1.01d removed an attachment of type application/pgp-signature]



Re: Recording from azalia does not work

2012-06-26 Thread Gregor Best
On Tue, Jun 26, 2012 at 09:16:38AM +0200, Alexandre Ratchov wrote:
 [...]
 this seems correct at first glance; could you see whether the
 recorded file is full of silence (zeros) or noise (numbers close to
 zero)?

 aucat -o /tmp/foo

 and then:

 hexdump /tmp/foo |less

 noise would mean that there's a level knob to crank, while zeros
 would suggest that something in the recording chain is disabled.
 [...]

Hmm... I may be losing my mind... I just rebooted and tried it again and
it worked. The mixer settings are the same... looks like this was just some
sort of glitch. I'll do some more checking if it stops working again.

--
Gregor Best

[demime 1.01d removed an attachment of type application/pgp-signature]



Recording from azalia does not work

2012-06-25 Thread Gregor Best
Hi people,

I'm trying to get recording from the mic input of my laptop working, but have
not have success so far. I'm using a thinkpad laptop
with an azalia device and a pretty run of the mill headset, attached to
headphone out and microphone in. The headset itself works
fine on other machines and the microphone input and headphone output of the
laptop work fine hardware-wise (i.e. tested with another
operating system). On OpenBSD however, the mic input remains silent. Files
recorded with aucat -o foo.wav remain silent for the
entire recording duration, as if the mic was somehow muted. Below is the
output of mixerctl:

outputs.spkr_source=dac-0:1
outputs.spkr_mute=on
outputs.spkr=125,125
outputs.spkr_eapd=on
outputs.hp_source=dac-0:1
outputs.hp_mute=off
outputs.hp=155,155
outputs.hp_dir=output
outputs.hp_boost=off
outputs.mic_dir=input-vr80
inputs.beep_mute=off
inputs.beep=108
inputs.mix_source=dac-0:1,mic,hp
inputs.mix_dac-0:1=125,125
inputs.mix_mic=215,215
inputs.mix_hp=125,125
record.adc-0:1_source=mic
record.adc-0:1_mute=off
record.adc-0:1=253,253
outputs.hp_sense=plugged
outputs.mic_sense=plugged
outputs.spkr_muters=hp
outputs.master=157,157
outputs.master.mute=off
outputs.master.slaves=spkr,hp
record.volume=255,255
record.volume.mute=off
record.volume.slaves=adc-0:1

As you can see, all recording related devices are at full volume and no device
is muted except for the built-in speakers. Is
recording on azalia devices simply not supported or am I missing something
really obvious here?

--
Gregor Best

[demime 1.01d removed an attachment of type application/pgp-signature]



Re: fdisk flag bootable partition during install

2012-04-25 Thread Gregor Best
On Tue, Apr 24, 2012 at 08:47:05PM -0600, Theo de Raadt wrote:
 [...]
 Undefined?

 Sorry.  But if you go look at the code, that is exactly how it works.

 Some might not like it.  But that is how it works, at this time.

 I don't know what the word undefined means in that context.
 [...]

Hence the IIRC. Apparently I did not completely remember correctly :)

--
Gregor Best

[demime 1.01d removed an attachment of type application/pgp-signature]



Re: fdisk flag bootable partition during install

2012-04-24 Thread Gregor Best
On Tue, Apr 24, 2012 at 10:52:26PM +0200, Erling Westenvik wrote:
 [...]
 1. When I used flag 1 in fdisk during install, did the installer place
 the new files in fdisk partition 1?
 [...]

IIRC, behaviour with more than one A6 partition is undefined, but
I'd say so, since it was the first A6 the kernel encountered on
that disk.

 [...]
 2. If so, does the original 5.0 installation still exists in fdisk
 partition 2?
 [...]

May be.

 [...]
 3. If so, can my original disklabel be restored?
 [...]

Your original disklabel should still be intact if my answer to your
first question turns out to be true.

I think most of your issues come from the bootloader that was
installed when you did the 5.1 install. IIRC, the offset pointing
to the A6 partition is stored directly inside the bootloader, which
means that it has to be restored to point back to the second A6.
The proper course of action would thus be:

* Boot from a bsd.rd and enter the shell * Use fdisk to change the
  partition type of your first A6 (the one that contains 5.1) to
  something else.  * Write, the leave fdisk and use disklabel -c wd0c
  to tell the kernel to re-read the disklabel (replacing wd0c with
  your disk of
  course)
* Re-install the bootloader as described in the boot(8) manpage
  (you might want to print that before doing the routine, bsd.rd does
  not contain man pages).
* Reboot and pray

--
Gregor Best

[demime 1.01d removed an attachment of type application/pgp-signature]



Re: Mounting big FAT filesystems

2011-11-28 Thread Gregor Best
On Mon, Nov 28, 2011 at 11:20:57AM +, sc...@web.de wrote:
 Well,  after reading Trouble with large files in current snapshot,
 I would like to ask something different: it is true that FAT filesystems
 of more than 120GB cannot be mounted? Will this change?
 [...]

In my experience, that is not true. I have a 250 GB disk here formatted
with FAT32 (using newfs_msdos) that can be mounted by OpenBSD and Linux
(Windows doesn't want to, but only because it can't deal with partition
tables on USB attached external disks).

--
Gregor Best

[demime 1.01d removed an attachment of type application/pgp-signature]



Re: intermittent 5.0/amd64 kernel/X hangs on Tinkpad T60

2011-11-12 Thread Gregor Best
On Fri, Nov 11, 2011 at 01:27:27PM -0500, Jonathan Thornburg wrote:
 [...]
 Questions:
 * Are other Thinkpad T60 users seeing similar problems?
 [...]

I'm using an R61i and I sometimes see that too. On my machine, it
usually happens under relatively high I/O load, such as when using rsync
to copy data from another machine to a USB disk. At one point I
suspected Firefox though (because every time the lockup happens, I have
an instance of that running and it's either doing a page load or
something else cache-intensive), so maybe the problem is somewhere in
the I/O system (such as a write blocking for all eternity and the X
server being grabbed).  The lockups never happened when I was not using
X, though that not using X-phase was only for a week or so.

My /home is also a softraid encrypted volume and /tmp is an MFS, as with
your setup.

This happens with the default GENERIC.mp kernel.

-- 
Gregor Best



Re: Softraid Encryption ?Corruption after Power Failure/Unclean Shutdown

2011-09-18 Thread Gregor Best
On Fri, Sep 16, 2011 at 05:38:59PM -0700, Tom wrote:
 [...]
 I think the problem here would be at the softraid layer. Is there anything
that
 can be done to restore the drive? I know the original passphrase,
encryption
 parameters, disklabel parameters, block size, reserved space, etc and have
 not newfs-ed the drive since creating it originally.
 [...]

I'm afraid your data is lost. When you entered a new passphrase, a new
random encryption key was created and stored (encrypted with the
passphrase) at the same location as the old one (see
/usr/src/sys/dev/softraid_crypto.c, line 571 and line 576). That means
the old encryption key has been overwritten and your disk content
reduced to bit rubbish. I just hope there wasn't too much important data
on the partition...

--
Gregor Best

[demime 1.01d removed an attachment of type application/pgp-signature]



Re: Recovery FFS formatted partition

2011-08-18 Thread Gregor Best
On Wed, Aug 17, 2011 at 11:30:05PM +0200, Pablo Velasco Fernandez wrote:
 Hi all. Its possible to recovery a FFS partition? During my last OpenBSD
 installation I format by mistake my second hard disk with all my videos,
 texts, pictures etc... Thank you for you attention.


binwalk should also do the trick, along with the other tools mentioned
around here. It is not in the ports tree, but it compiles fine from
source.

--
Gregor Best

[demime 1.01d removed an attachment of type application/pgp-signature]



Re: different nwkeys for wifi

2011-07-10 Thread Gregor Best
I use a simple AWK script which parses the available networks as
returned by ifconfig wpi0 scan and selects the first known one it finds.
It then creates an /etc/hostname.wpi0 for that network and runs
/etc/netstart wpi0. I attached it for reference, though I think it's
extremely easy to rebuild from scratch.

-- 
Gregor Best
#!/usr/bin/awk -f

BEGIN {
conf[essid0] = wpakey foobar\ndhcp;
conf[essid1] = -wpakey\ndhcp;

device = wpi0;
}

/^[[:space:]]+nwid/ {
sub(^[[:space:]]+nwid , )
sub( chan [[:digit:]]+ bssid.+, )
if ($0 in conf) {
print Using configuration for ESSID $0
print up\nnwid $0\nconf[$0] (/etc/hostname.device)
system(sh /etc/netstart device)
exit
}
}


pgpR0l9QtVop0.pgp
Description: PGP signature


Re: adding Journaled File System (JFS)

2011-07-04 Thread Gregor Best
On Mon, Jul 04, 2011 at 06:24:31PM -0300, Daniel Testa wrote:
 ok... I think I'll follow your recommendation Ted. I'll work on adding
 ext3fs support.
 [...]

If you need someone testing that, I'd be glad to get my external hd's
file system trashed by experimental journaling code.

Gregor

[demime 1.01d removed an attachment of type application/pgp-signature]