Re: How to create "paranoid" cipher list in httpd.conf

2015-09-01 Thread Kent Fritz
On Tue, Sep 1, 2015 at 6:14 AM, Andreas Thulin 
wrote:

> Hi misc readers!
>
> 

> My current httpd.conf contains a line saying
>
> tls ciphers "STRONG:ECDHE:!aNULL:!SSLv3:@STRENGTH"
>
> which renders out "Configuration OK" with '# /usr/sbin/httpd -n'.
>

A really stupid question:  Did you restart httpd?  e.g. "/etc/rc.d/httpd
restart"?  Using your list, works here (though with an Aug 10 snapshot).



> However, when running a
> server test
> (https://www.ssllabs.com/ssltest/analyze.html?d=andreasthulin.se),
> there's a much longer list of ciphers, including both non-FS and medium
> strength ciphers.
>

> I'm thinking that either
>
>1. my assumption that my httpd.conf is all dandy is wrong (highly
>probable),
>2. SSL Labs is lying to me (improbable), or
>3. there's some sort of bug in httpd (improbable).
>
> Does anyone have any pointers?
>

I find the following tool invaluable in checking my setup locally.
https://github.com/jvehent/cipherscan
You can also use nmap, which is in ports:
$ nmap -sT -p443 -script ssl-enum-ciphers 

Hope this helps.

Kent.



Re: Unable to do putty/SSH into fresh openBSD 5.6-install

2015-04-19 Thread Kent Fritz
You need to look at debug.  From console:
# /etc/rc.d/sshd stop
sshd(ok)
# /usr/sbin/sshd -d

Now try to log in and see if you can get any clues from the output.

On Sun, Apr 19, 2015 at 10:11 AM, Jon S jonsjost...@gmail.com wrote:

 Updated PuTTY from 0,63 to 0,64, but no improvement.


 Any other ideas?

 2015-04-19 18:22 GMT+02:00 Mike. the.li...@mgm51.com:

  On 4/19/2015 at 5:09 PM Jon S wrote:
 
  |Hi all!
  |
  |I just installed a fresh OpenBSD 5.6 on a new machine (booting from
  a
  |USB-stick and running bsd.rd, installing from ftp.eu.openbsd.org =
  |networking is fine). All sets are installed.
  |
  |Now i cant ssh(using putty) into the new machine. authlog says
  fatal:
  |Timeout before authentication ip. My attempt to ssh is from a
  local
  |network. I can se a forked SSHD-process when i try to putty/ssh into
  the
  |new machine.
  |
  |ssh out from the new 5.6-machine to a different OpenBSD 4.9-machine
  works
  |fine. ssh back from the 4.9-machine to the new 5.6-machine works
  too.
  |
  |doing putty into the 4.9-machine also work
  |
  |Any ideas as to what can cause this? As far as I can remeber the
  |4.9-machine uses the default SSH-settings, just as the 5.6-machine
   =
 
 
  Are you using a current version of putty?
 
  When I had similar symptoms, I found out I was using an older version
  of putty.  Once I downloaded and installed the current version, all
  was happiness
 
 
 
 


 --
 
 Jon Sjöstedt
 Gamla Björboholmsvägen 2
 443 72 GRÅBO

 Mobil 0735 - 029 557

 jonsjost...@gmail.com jonsjost...@hotmail.com



httpd core dump

2015-03-29 Thread Kent Fritz
Running March 26 snapshot, amd64, and built-from-source for getting
backtrace.  Simple httpd.conf.  Note that tls config is before non-tls --
it works fine the other way:
http_ip=192.168.1.131

server default {
listen on $http_ip tls port 443
listen on $http_ip port 80
root /var/www/htdocs
}


# httpd -d -vvv
startup
server_tls_load_keypair: using certificate /etc/ssl/server.crt
server_tls_load_keypair: using private key /etc/ssl/private/server.key
server_privinit: adding server default
server_privinit: adding server default
socket_rlimit: max open files 1024
socket_rlimit: max open files 1024
socket_rlimit: max open files 1024
logger exiting, pid 8995
Segmentation fault (core dumped)
# server exiting, pid 12675
server exiting, pid 259
server exiting, pid 6301


(gdb) bt
#0  0x0549dc2cf150 in memcpy (dst0=0x549c54112d8, src0=Variable src0
is not available.
)
at /usr/src/lib/libc/string/memcpy.c:94
#1  0x05497ebd4c6c in ibuf_add (buf=0x5493f7ecfc0, data=0x0, len=1338)
at /usr/src/lib/libutil/imsg-buffer.c:97
#2  0x05497ebd40dc in imsg_add (msg=0x5493f7ecfc0, data=Variable data
is not available.
)
at /usr/src/lib/libutil/imsg.c:240
#3  0x05497ebd421e in imsg_composev (ibuf=0x5494ff11000, type=Variable
type is not available.
)
at /usr/src/lib/libutil/imsg.c:198
#4  0x054738a10720 in imsg_composev_event ()
   from /usr/src/usr.sbin/httpd/httpd
#5  0x054738a107cf in proc_composev_imsg ()
   from /usr/src/usr.sbin/httpd/httpd
#6  0x054738a0aef3 in config_setserver ()
   from /usr/src/usr.sbin/httpd/httpd
#7  0x054738a0e774 in parent_configure ()
   from /usr/src/usr.sbin/httpd/httpd
#8  0x054738a0eff5 in main () from /usr/src/usr.sbin/httpd/httpd

OpenBSD 5.7-current (GENERIC) #838: Thu Mar 26 14:51:16 MDT 2015
t...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 519958528 (495MB)
avail mem = 500436992 (477MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0x1d80 (12 entries)
bios0: vendor SeaBIOS version 
rel-1.7.5-0-ge51488c-20140602_164612-nilsson.home.kraxel.org date
04/01/2014
bios0: QEMU Standard PC (i440FX + PIIX, 1996)
acpi0 at bios0: rev 0
acpi0: sleep states S3 S4 S5
acpi0: tables DSDT FACP SSDT APIC HPET
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: QEMU Virtual CPU version 2.1.2, 3311.45 MHz
cpu0:
FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,CX16,x2APIC,POPCNT,HV,NXE,LONG,LAHF,SVM,ABM,SSE4A
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
64b/line 16-way L2 cache
cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 999MHz
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 0 pa 0xfec0, version 11, 24 pins
acpihpet0 at acpi0: 1 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 Intel 82441FX rev 0x02
pcib0 at pci0 dev 1 function 0 Intel 82371SB ISA rev 0x00
pciide0 at pci0 dev 1 function 1 Intel 82371SB IDE rev 0x00: DMA, channel
0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: QEMU HARDDISK
wd0: 16-sector PIO, LBA48, 20480MB, 41943040 sectors
wd0(pciide0:0:0): using PIO mode 4, DMA mode 2
atapiscsi0 at pciide0 channel 1 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: QEMU, QEMU DVD-ROM, 2.1. ATAPI 5/cdrom
removable
cd0(pciide0:1:0): using PIO mode 4, DMA mode 2
piixpm0 at pci0 dev 1 function 3 Intel 82371AB Power rev 0x03: apic 0 int
9
iic0 at piixpm0
vga1 at pci0 dev 2 function 0 Cirrus Logic CL-GD5446 rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
virtio0 at pci0 dev 3 function 0 Qumranet Virtio Network rev 0x00: Virtio
Network Device
vio0 at virtio0: address de:ad:be:ef:00:20
virtio0: apic 0 int 11
isa0 at pcib0
isadma0 at isa0
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 1: density unknown
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
nvram: invalid checksum
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on wd0a (1869a5e37afd7f1f.a) swap on wd0b dump on wd0b
clock: unknown CMOS layout



Re: OpenBSD and disk slowliness

2015-01-09 Thread Kent Fritz
Hopefully this is not too bad advice...

I've found the performance with cache=none to be unacceptable as well.
I'm using cache=writeback.  Of course you'll get much better
performance if you remove Linux/KVM.  :)

On Thu, Jan 8, 2015 at 3:21 PM, Jorge Gabriel Lopez Paramount
jorge.lopez.paramo...@googlemail.com wrote:
 Hi all,

 A few months ago I tried to install OpenBSD 5.5 in a KVM virtual machine
 running Linux in an amd64 computer. First tried to install the i386 version
 since my Linux virtual machines are i686 and was painfully slow, so much
 that I almost decided to not use OpenBSD. Then I tried with the amd64
 version and ran blazingly fast, was so impressed that I'm here.

 Time passed and installed some i386 virtual machines running in atom chips
 without issues and so far have been running fine so I forgot the issue, but
 last week started to upgrade them to 5.6 and was again painfully slow, one
 hour to upgrade each one. And since the slow part of upgrading was at
 untarring and the LED of the disk was blinking like crazy I supposed it was
 some issue with the virtual hard disk.

 Now that I know more about OpenBSD tried again to install the same 5.5
 version in the same amd64 computer, but this time using the virtio drivers,
 and in less than 5 minutes installed a new OpenBSD server with no issues at
 all. As reference this is the kvm command I used:

 kvm -vnc :15 -m 256 -name openbsd -pidfile /qemu/OpenBSD/OpenBSD.pid -k es
 -net nic,macaddr=52:54:00:12:34:84,model=virtio -net tap,ifname=tap17 -drive
 file=/dev/eliseos/qemu-004,cache=none,if=virtio -cdrom
 /software/OpenBSD/5.5/i386/install55.iso -boot d -daemonize

 I would like to share this because I have read in many places about hard
 disk slowliness with OpenBSD, verly likely dissapointing new users when in
 fact OpenBSD is very good.

 --
 Best regards,
 Jorge Lopez.





 
 This message was sent using IMP, the Internet Messaging Program.



My USB KVM seems to work 100% now

2014-07-16 Thread Kent Fritz
http://marc.info/?t=13604368593r=1w=2

This seems to be fixed in the July 13 snapshot.  I no longer have to
insert/remove my USB stick to get the keyboard working.

THANKS!

Kent.



Sysmerge problem with xetc56.tgz on July 16 amd64 snapshot

2014-07-16 Thread Kent Fritz
# sysmerge -x xetc56.tgz
=== Fetching file:///root/xetc56.tgz
=== Fetching file:///root/SHA256.sig
=== Verifying xetc56.tgz against /etc/signify/openbsd-56-base.pub
=== Populating temporary root under /var/tmp/sysmerge.CJzwPVyHXg/temproot
tar: WARNING! These patterns were not matched:
./usr/share/sysmerge/xetcsum
 ERROR: xetc56.tgz: badly formed xetc set, lacks
./usr/share/sysmerge/xetcsum

Indeed, there's no /usr at all in the tarball.  Clue-stick welcome if
I missed some key warning...

Thanks,

Kent.



Current snapshot (7/14) has mismatched libc

2014-07-15 Thread Kent Fritz
xbase55 is linked against libc.so.77.0, but base55 (dated 7/13) only
has libc.so.76.0.  Best to wait until base55 gets updated again.

Kent.



Re: ssh-add: June 26 snap cannot read an id_rsa file

2014-06-27 Thread Kent Fritz
On Fri, Jun 27, 2014 at 4:29 AM, Christian Weisgerber
na...@mips.inka.de wrote:
 On 2014-06-27, Josh Grosse j...@jggimi.homeip.net wrote:

 I just updated from a June 17 to June 26 snapshot.  The ssh-add utility
 now fails immediately: [...]

 Between these two snapshots there was a major bump for libcrypto from 28.0
 to 29.0, but that may not be relevant.

 It's most likely fallout from the ssh changes on June 23:

   New key API: refactor key-related functions to be more library-like,
   existing API is offered as a set of wrappers.

 --
 Christian naddy Weisgerber  na...@mips.inka.de

Seeing the same here.  I tested re-creating my keys, and the problem
seems to be with password.  With password, it fails; without, it
works.



Re: ssh-add: June 26 snap cannot read an id_rsa file

2014-06-27 Thread Kent Fritz
On Fri, Jun 27, 2014 at 6:12 AM, Josh Grosse j...@jggimi.homeip.net wrote:
 On 2014-06-27 08:21, Kent Fritz wrote:
 Seeing the same here.  I tested re-creating my keys, and the problem
 seems to be with password.  With password, it fails; without, it
 works.


 If I didn't have passphrases, I wouldn't use ssh-add. :)

Yes, obviously!

ssh-keygen -p seems to have a problem, but works regardlesss:

$ ssh-keygen -p
Enter file in which the key is (/home/kent/.ssh/id_rsa):
key_load_private: invalid format
Enter old passphrase:
Key has comment 'rsa w/o comment'
Enter new passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved with the new passphrase.



2014/07/13 - changes to minherit(2) and new getentropy(2)

2014-06-13 Thread Kent Fritz
Future change, or 1-bit error?

http://www.openbsd.org/faq/current.html

Kent.



Re: jun 12 snapshot freeze on boot.

2014-06-13 Thread Kent Fritz
Just a data-point: works here on a more modern qemu-kvm 1.6.1:

OpenBSD 5.5-current (GENERIC) #186: Thu Jun 12 21:59:00 MDT 2014
...
cpu0: QEMU Virtual CPU version 1.6.1, 3311.47 MHz
...

On Thu, Jun 12, 2014 at 4:31 PM, Rodrigo Mosconi open...@mosconi.mat.br wrote:
 Follow bsd.rd dmesg:

 Copyright (c) 1982, 1986, 1989, 1991, 1993
 The Regents of the University of California.  All rights reserved.
 Copyright (c) 1995-2014 OpenBSD. All rights reserved.
 http://www.OpenBSD.org

 OpenBSD 5.5-current (RAMDISK_CD) #182: Thu Jun 12 13:02:18 MDT 2014
 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
 real mem = 1056944128 (1007MB)
 avail mem = 1023508480 (976MB)
 mainbus0 at root
 bios0 at mainbus0: SMBIOS rev. 2.4 @ 0x3ef0 (10 entries)
 bios0: vendor Bochs version Bochs date 01/01/2007
 bios0: Bochs Bochs
 acpi0 at bios0: rev 0
 acpi0: sleep states S3 S4 S5
 acpi0: tables DSDT FACP SSDT APIC HPET
 acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
 cpu0 at mainbus0: apid 0 (boot processor)
 cpu0: QEMU Virtual CPU version 0.12.3, 2600.50 MHz
 cpu0:
 FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,CX16,POPCNT,NXE,LONG,LAHF,ABM,SSE4A,PERF
 cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
 64b/line 16-way L2 cache
 cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
 cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
 cpu0: apic clock running at 1000MHz
 ioapic0 at mainbus0: apid 1 pa 0xfec0, version 11, 24 pins
 ioapic0: misconfigured as apic 0, remapped to apid 1
 acpiprt0 at acpi0: bus 0 (PCI0)
 pci0 at mainbus0 bus 0
 pchb0 at pci0 dev 0 function 0 Intel 82441FX rev 0x02
 Intel 82371SB ISA rev 0x00 at pci0 dev 1 function 0 not configured
 pciide0 at pci0 dev 1 function 1 Intel 82371SB IDE rev 0x00: DMA, channel
 0 wired to compatibility, channel 1 wired to compatibility
 wd0 at pciide0 channel 0 drive 0: QEMU HARDDISK
 wd0: 16-sector PIO, LBA48, 20480MB, 41943040 sectors
 atapiscsi0 at pciide0 channel 0 drive 1
 scsibus0 at atapiscsi0: 2 targets
 cd0 at scsibus0 targ 0 lun 0: QEMU, QEMU DVD-ROM, 0.12 ATAPI 5/cdrom
 removable
 wd0(pciide0:0:0): using PIO mode 0, DMA mode 2
 cd0(pciide0:0:1): using PIO mode 0
 atapiscsi1 at pciide0 channel 1 drive 0
 scsibus1 at atapiscsi1: 2 targets
 cd1 at scsibus1 targ 0 lun 0: QEMU, QEMU DVD-ROM, 0.12 ATAPI 5/cdrom
 removable
 cd1(pciide0:1:0): using PIO mode 0
 uhci0 at pci0 dev 1 function 2 Intel 82371SB USB rev 0x01: apic 1 int 11
 Intel 82371AB Power rev 0x03 at pci0 dev 1 function 3 not configured
 vga1 at pci0 dev 2 function 0 Cirrus Logic CL-GD5446 rev 0x00
 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
 em0 at pci0 dev 3 function 0 Intel 82540EM rev 0x03: apic 1 int 11,
 address 52:54:00:27:29:09
 usb0 at uhci0: USB revision 1.0
 uhub0 at usb0 Intel UHCI root hub rev 1.00/1.00 addr 1
 isa0 at mainbus0
 com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
 com0: console
 pckbc0 at isa0 port 0x60/5
 pckbd0 at pckbc0 (kbd slot)
 pckbc0: using irq 1 for kbd slot
 wskbd0 at pckbd0: console keyboard, using wsdisplay0
 softraid0 at root
 scsibus2 at softraid0: 256 targets
 root on rd0a swap on rd0b dump on rd0b



 2014-06-12 20:29 GMT-03:00 Rodrigo Mosconi open...@mosconi.mat.br:

 Hi,

 I update a machine from May 10 snapshot to a Jun 12 snapshots, and the
 system freezes.
 It is a virtual machine (hosted-KVM, so I don`t now the versions).  The
 bsd.rd boots fine.

 Anyone has any clue?

 Follow dmesg

 Copyright (c) 1982, 1986, 1989, 1991, 1993
 The Regents of the University of California.  All rights reserved.
 Copyright (c) 1995-2014 OpenBSD. All rights reserved.
 http://www.OpenBSD.org

 OpenBSD 5.5-current (GENERIC) #183: Thu Jun 12 12:51:28 MDT 2014
 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
 real mem = 1056944128 (1007MB)
 avail mem = 1020133376 (972MB)
 mpath0 at root
 scsibus0 at mpath0: 256 targets
 mainbus0 at root
 bios0 at mainbus0: SMBIOS rev. 2.4 @ 0x3ef0 (10 entries)
 bios0: vendor Bochs version Bochs date 01/01/2007
 bios0: Bochs Bochs
 acpi0 at bios0: rev 0
 acpi0: sleep states S3 S4 S5
 acpi0: tables DSDT FACP SSDT APIC HPET
 acpi0: wakeup devices
 acpitimer0 at acpi0: 3579545 Hz, 24 bits
 acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
 cpu0 at mainbus0: apid 0 (boot processor)
 cpu0: QEMU Virtual CPU version 0.12.3, 2600.51 MHz
 cpu0:
 FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,CX16,POPCNT,NXE,LONG,LAHF,ABM,SSE4A,PERF
 cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
 64b/line 16-way L2 cache
 cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
 cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
 mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
 cpu0: apic clock running at 1000MHz
 ioapic0 at mainbus0: apid 1 pa 0xfec0, 

Re: Question regarding hearbleed patch (002) for OpenBSD 5.5...

2014-05-09 Thread Kent Fritz
I found a few hidden statically linked instances of OpenSSL (on other
platforms) using strings.

e.g.:
strings /usr/bin/ftp | grep OpenSSL



Re: DTMF tones over IP

2014-03-25 Thread Kent Fritz
Not sure about playing remotely, but if you add the sox package, you
get tools to generate files or directly to audio out.  The following
play the tones to your audio output:

DTMF 1:
play -n synth 0.5 sine 697 sine 1209 channels 1
DTMF 0:
play -n synth 0.5 sine 941 sine 1336 channels 1



On Tue, Mar 25, 2014 at 3:24 PM, Byron Klippert byronklipp...@ml1.net wrote:
 Hello,


 Is there a way to generate DTMF tones using the tools in base?


 I am trying to open a live audio path over IP from one node to
 another. The audio path is fed into a controlling device which
 interfaces with a VHF radio. In order to key-up the radio, the
 controlling device needs to see a DTMF code (1 to key, 0 to unkey). Any
 audio sent to the device between keying and unkeying, is sent to the
 radio and over air.


 I'm guessing an ssh-tunnel will server as the path, just not sure
 which framework can be used to record and play audio, let alone generate
 DTMF.


 Any pointers?



 --
 Byron Klippert
   byronklipp...@ml1.net
   c. 867-336-1306



sysmerge error

2014-03-21 Thread Kent Fritz
I get the following after upgrading to the latest snapshot.  Am I doing
something wrong?

Thanks,

Kent.

# pwd   
/root
# ls -l
total 18812
-rw-r--r--  1 root  wheel   22 Jul 30  2013 .Xdefaults
drwx--  3 root  wheel  512 Feb 27 11:39 .cache
-rw-r--r--  1 root  wheel  578 Jul 30  2013 .cshrc
-rw-r--r--  1 root  wheel   94 Jul 30  2013 .cvsrc
-rw-r--r--  1 root  wheel5 Jan  2 07:56 .forward
-rw---  1 root  wheel  125 Jul 30  2013 .klogin
-rw-r--r--  1 root  wheel  328 Jul 30  2013 .login
-rw-r--r--  1 root  wheel  740 Mar  8 00:55 .profile
drwx--  2 root  wheel  512 Mar  7 09:55 .ssh
-rw-r--r--  1 root  wheel 1899 Mar 21  2014 SHA256
-rw-r--r--  1 root  wheel 2062 Mar 21  2014 SHA256.sig
-rw-r--r--  1 root  wheel  9182228 Mar 21  2014 bsd.rd
-rw-r--r--  1 root  wheel   295586 Mar 21  2014 etc55.tgz
-rw-r--r--  1 root  wheel64906 Mar 21  2014 xetc55.tgz
# signify -C -p /etc/signify/openbsd-55-base.pub -x SHA256.sig etc55.tgz 
xetc55.tgz  
Signature Verified
etc55.tgz: OK
xetc55.tgz: OK
# sysmerge -s etc55.tgz -x xetc55.tgz   
  
=== Fetching from file:///root
etc55.tgz100% 
||
   288 KB00:00
=== Verifying against /etc/signify/openbsd-55-base.pub
SHA256.sig   100% 
||
  2062   00:00
 ERROR: xetc55.tgz: no such file



Re: Trouble with connect to www.aeroflot.ru

2014-03-19 Thread Kent Fritz
Odd.  Just tried it. Works on Linux, doesn't on OpenBSD.

Not related to user agent; it seems to not respond to SYN.  Perhaps
their running PF and filtering us!



Re: I haven't heard of anyone else with this screen problem

2014-03-09 Thread Kent Fritz
On Fri, Mar 7, 2014 at 11:20 PM, Jan Stary h...@stare.cz wrote:
 On Mar 05 15:53:06, glis...@witworx.com wrote:
 When booting and the screen goes to its 34 line 85 column mode, the
 text mode fits into 30cm wide and 22cm high at the top left corner of a 38cm
 wide 30cm high screen.

 With current/amd64 on an Intel Pineview video (full dmesg below)
 my text console becomes 36 rows x 106 columns, which takes up
 the whole width of the screen, but leaves about ten more rows
 that could fit to the height, like this:

 ++
 ||
 ||
 | text console   |
 ||
 ||
 ||
 ++
 ||
 |unused  |
 ++

 This does not happen on e.g. current/amd64 running on a Thinkpad T400.
 Is this about the Intel Pineview gfx? What can I do to help debug it?

 Jan


This sounded vaguely familiar to me, so I dug around in my pile of
nettop boxes and found the one below.  Text is 34x106 for me, not
36x106.  BTW, this is not a regression, it was this way in 5.4 as
well.

Kent.

OpenBSD 5.5 (GENERIC.MP) #315: Wed Mar  5 09:37:46 MST 2014
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 2120876032 (2022MB)
avail mem = 2055864320 (1960MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xfbaa0 (22 entries)
bios0: vendor American Megatrends Inc. version P02 date 01/28/2011
bios0: FOXCONN nT435/nT535
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB HPET GSCI
acpi0: wakeup devices P0P1(S4) P0P4(S4) P0P5(S4) P0P6(S4) P0P7(S4)
P0P8(S4) P0P9(S4) USB0(S1) USB1(S1) USB2(S1) USB3(S1) EUSB(S1)
SLPB(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) Atom(TM) CPU D525 @ 1.80GHz, 2160.33 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,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF
cpu0: 512KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu0: mwait min=64, max=64, C-substates=0.1.0.0.0, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Atom(TM) CPU D525 @ 1.80GHz, 1800.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,DTES64,MWAIT,DS-CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF
cpu1: 512KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Atom(TM) CPU D525 @ 1.80GHz, 1800.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,DTES64,MWAIT,DS-CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF
cpu2: 512KB 64b/line 8-way L2 cache
cpu2: smt 1, core 0, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Atom(TM) CPU D525 @ 1.80GHz, 1800.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,DTES64,MWAIT,DS-CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF
cpu3: 512KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 4 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 1, remapped to apid 4
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 5 (P0P1)
acpiprt2 at acpi0: bus 1 (P0P4)
acpiprt3 at acpi0: bus 2 (P0P5)
acpiprt4 at acpi0: bus 3 (P0P6)
acpiprt5 at acpi0: bus 4 (P0P7)
acpiprt6 at acpi0: bus -1 (P0P8)
acpiprt7 at acpi0: bus -1 (P0P9)
acpicpu0 at acpi0
acpicpu1 at acpi0
acpicpu2 at acpi0
acpicpu3 at acpi0
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: PWRB
pci0 at mainbus0 bus 0
0:31:2: mem address conflict 0xfc00/0x400
pchb0 at pci0 dev 0 function 0 Intel Pineview DMI rev 0x02
vga1 at pci0 dev 2 function 0 Intel Pineview Video rev 0x02
intagp0 at vga1
agp0 at intagp0: aperture at 0xd000, size 0x1000
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: 1280x768
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
Intel Pineview Video rev 0x02 at pci0 dev 2 function 1 not configured
azalia0 at pci0 dev 27 function 0 Intel 82801GB HD Audio rev 0x02: msi
azalia0: codecs: Realtek ALC888
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 Intel 82801GB PCIE rev 0x02: msi
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 1 Intel 82801GB PCIE rev 0x02: msi
pci2 at ppb1 bus 2
vendor Realtek, unknown product 0x8171 (class network subclass
miscellaneous, rev 0x10) at pci2 dev 0 function 0 

Latest amd64 snapshot installer problem

2014-03-03 Thread Kent Fritz
Just downloaded install55.iso, and extracted the files for an upgrade.
 The installer seems to be looking for
/etc/signify/openbsd-55-base.pub, but only /etc/signify/55base.pub
exists.  I didn't proceed from there.

Kent.



Re: checksums and installer

2014-02-21 Thread Kent Fritz
On Fri, Feb 21, 2014 at 2:24 AM, frantisek holop min...@obiit.org wrote:
 i have just installed the feb 20 snapshot
 on a personal netbook (not server).
 to install snapshots, i normally download the iso,
 copy the files from it to my home, and boot up bsd.rd
 and then select the sets from an already mounted
 partition.

 i feel the latest incarnation of the installer is a
 bit hysterical about the checksum verification and
 i had to enter yes 12x, for every single set.

 this is quite annoying and perhaps it could be reverted
 back to the previous method where a single yes was
 enough to convince the installer that i am ok with
 non-verified sets.

 -f
 --
 that'll be all for now, other than to say hi to Wonko if he's watching.


I had the same experience on i386.  The SHA256 file on the
install55.iso is wrong.  The correct one appears to be on the ftp
site, though.



Re: Is my 5.4 CD ok?

2014-01-16 Thread Kent Fritz
Only a small subset of the packages fit on the CD.  Emacs is not on the CD
afaik.  You can set multiple sources in your PKG_PATH variable (colon
deliminated), so set the second one to be a mirror.  See man pkg_add.



On Thu, Jan 16, 2014 at 5:28 PM, Mario mario@videotron.ca wrote:

 Hi list.

 I know you are all busy discussing electricity issues but maybe one of you
 can take a moment to answer this.

 Browsing my new CDs for first time ever, I am a little confused and I am
 seeking clarification.  Is the following normal?  Because when I think
 about it, can really over 14,000  packages (amd64 + hppa) fit on a CD.  I
 am puzzled.

 marst:349$ pwd
 /mnt/5.4/packages/amd64
 marst:350$ ls -l
 total 25238
 -r--r--r--  1 root  wheel  539 Aug  5 17:25 TRANS.TBL
 -r--r--r--  1 root  wheel   125468 Jul 29 13:26 bzip2-1.0.6p0.tgz
 -r--r--r--  1 root  wheel   674979 Jul 29 13:26 curl-7.26.0p3.tgz
 -r--r--r--  1 root  wheel  7556487 Jul 29 13:26 gettext-0.18.2p3.tgz
 -r--r--r--  1 root  wheel  2012934 Jul 29 13:26 gnupg-1.4.13p0.tgz
 -r--r--r--  1 root  wheel  159 Aug  5 17:22 index.txt
 -r--r--r--  1 root  wheel  1521545 Jul 29 13:26 libiconv-1.14p0.tgz
 -r--r--r--  1 root  wheel   264257 Jul 29 13:26 libidn-1.27.tgz
 -r--r--r--  1 root  wheel   280021 Jul 29 13:26 rsync-3.0.9p3.tgz
 -r--r--r--  1 root  wheel   165840 Jul 29 13:26 unzip-6.0p2.tgz
 -r--r--r--  1 root  wheel   322276 Jul 29 13:26 xz-5.0.5.tgz
 marst:351$

 I guess the question is are all the binaries supposed to be on CD because
 if I follow instructions as per booklet:

 % su
 Password : root password
 # mount /dev/cd0a /mnt
 # /mnt/5.4/packages/amd64
 # pkg_add emacs-21.4p23.tgz

 That's not working.  Well it worked when my $PKG_PATH was still set on ftp
 but I suppose PKG_PATH is supposed to be set to the CD path.

 Also nowhere on CD2 I can find the soundtrack.  I suppose that should be
 easy.  I would really need a song at the moment.

 --
 Mario



Re: Accept two vlans

2013-08-07 Thread Kent Fritz
On Wed, Aug 7, 2013 at 1:55 AM, lilit-aibolit lilit-aibo...@mail.ru wrote:
 Hello misc.
 I'd like to setup guest Wi-Fi in my LAN to prevent access to local
 resources.
 I have OpenBSD gateway with em NIC connected to LAN.
 LAN based on switches with VLAN support.
 Suppose I have created two VLANs and added ports from my network
 to vlan1 and wi-fi AP to vlan2.
 What should I do on gateway to accept network from both vlans?
 Should there be a different subnets in vlan1/2 or it can be the same?

You'll need to configure your switch to forward tagged vlan2 traffic
to the port where your em NIC is connected, and create a vlan
interface for it.  man vlan.

Keep it simple; have them on separate subnets.



vic driver problem with TSO and VLAN

2013-06-14 Thread Kent Fritz
I've run into a problem with data corruption, and I'm not sure if it's
in the vic driver or the VMware VMXNET2 code.  If someone can nudge me
in the right direction, it would be appreciated.

I have 2 VM's on VMware ESXi 5.1.0.  First VM is Debian 7, with eth1
connected to a vswitch in a Virtual Machine Port Group with VLAN ID
100.  Second VM is OpenBSD 5.3 amd64 with vic1 connected to port
group with VLAN ID: All (4095) as a parent to a vlan100 interface on
the same subnet as the Debian VM.

By default, TCP Segmentation Offload (TSO) is on in the Debian VM.  When
I send a large blob of TCP data from Debian to OpenBSD, the data is
corrupted.  If the data gets segmented into 2 segments, all is OK, but
if it gets segmented into 3 or more, it gets corrupted.

If I turn off TSO on Debian, it works fine.  If I switch to em driver on
OpenBSD, it works fine.  If I jack OpenBSD into same port group as
Debian (i.e. without VLAN tagging) it works fine.

The commands that simply reproduce the problem are included below, along
with the obligatory dmesg.  Thanks for looking!

Kent.

### On Debian VM ###
kent@debian:~$ su -
Password:
root@debian:~# ifconfig eth1 172.16.22.4
root@debian:~# exit
logout
kent@debian:~$ for i in {1..66}; do echo All work and no play makes
Jack a dull boy.; done  jack66.txt
kent@debian:~$ md5sum jack66.txt
79313a46028bc3b196f82a9271eaf700  jack66.txt
kent@debian:~$ cat jack66.txt | nc -q 0 172.16.22.5 
kent@debian:~$ for i in {1..65}; do echo All work and no play makes
Jack a dull boy.; done  jack65.txt
kent@debian:~$ md5sum jack65.txt
065ed7ddb39ffa4c35a98e0d7ee5ee0f  jack65.txt
kent@debian:~$ cat jack65.txt | nc -q 0 172.16.22.5 
kent@debian:~$

### On OpenBSD VM ###
$ su -
Password:
# ifconfig vic1 up
# ifconfig vlan100 vlandev vic1 172.16.22.5
# exit
$ nc -l  | md5
148267608402e931d2af7adc319e9e85
$ nc -l  | md5
065ed7ddb39ffa4c35a98e0d7ee5ee0f
$

### dmesg ###
OpenBSD 5.3 (GENERIC) #53: Tue Mar 12 18:15:44 MDT 2013
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 535756800 (510MB)
avail mem = 499089408 (475MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (364 entries)
bios0: vendor Phoenix Technologies LTD version 6.00 date 06/22/2012
bios0: VMware, Inc. VMware Virtual Platform
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP BOOT APIC MCFG SRAT HPET WAET
acpi0: wakeup devices PCI0(S3) USB_(S1) P2P0(S3) S1F0(S3) S2F0(S3)
S3F0(S3) S4F0(S3) S5F0(S3) S6F0(S3) S7F0(S3) S8F0(S3) S9F0(S3)
S10F(S3) S11F(S3) S12F(S3) S13F(S3) S14F(S3) S15F(S3) S16F(S3)
S17F(S3) S18F(S3) S19F(S3) S20F(S3) S21F(S3) S22F(S3) S23F(S3)
S24F(S3) S25F(S3) S26F(S3) S27F(S3) S28F(S3) S29F(S3) S30F(S3)
S31F(S3) S32F(S3) P2P1(S3) S1F0(S3) S2F0(S3) S3F0(S3) S4F0(S3)
S5F0(S3) S6F0(S3) S7F0(S3) S8F0(S3) S9F0(S3) S10F(S3) S11F(S3)
S12F(S3) S13F(S3) S14F(S3) S15F(S3) S16F(S3) S17F(S3) S18F(S3)
S19F(S3) S20F(S3) S21F(S3) S22F(S3) S23F(S3) S24F(S3) S25F(S3)
S26F(S3) S27F(S3) S28F(S3) S29F(S3) S30F(S3) S31F(S3) S32F(S3)
P2P2(S3) S1F0(S3) S2F0(S3) S3F0(S3) S4F0(S3) S5F0(S3) S6F0(S3)
S7F0(S3) S8F0(S3) S9F0(S3) S10F(S3) S11F(S3) S12F(S3) S13F(S3)
S14F(S3) S15F(S3) S16F(S3) S17F(S3) S18F(S3) S19F(S3) S20F(S3)
S21F(S3) S22F(S3) S23F(S3) S24F(S3) S25F(S3) S26F(S3) S27F(S3)
S28F(S3) S29F(S3) S30F(S3) S31F(S3) S32F(S3) P2P3(S3) S1F0(S3)
S2F0(S3) S3F0(S3) S4F0(S3) S5F0(S3) S6F0(S3) S7F0(S3) S8F0(S3)
S9F0(S3) S10F(S3) S11F(S3) S12F(S3) S13F(S3) S14F(S3) S15F(S3)
S16F(S3) S17F(S3) S18F(S3) S19F(S3) S20F(S3) S21F(S3) S22F(S3)
S23F(S3) S24F(S3) S25F(S3) S26F(S3) S27F(S3) S28F(S3) S29F(S3)
S30F(S3) S31F(S3) S32F(S3) PE40(S3) S1F0(S3) PE50(S3) S1F0(S3)
PE60(S3) S1F0(S3) PE70(S3) S1F0(S3) PE80(S3) S1F0(S3) PE90(S3)
S1F0(S3) PEA0(S3) S1F0(S3) PEB0(S3) S1F0(S3) PEC0(S3) S1F0(S3)
PED0(S3) S1F0(S3) PEE0(S3) S1F0(S3) PE41(S3) S1F0(S3) PE42(S3)
S1F0(S3) PE43(S3) S1F0(S3) PE44(S3) S1F0(S3) PE45(S3) S1F0(S3)
PE46(S3) S1F0(S3) PE47(S3) S1F0(S3) PE51(S3) S1F0(S3) PE52(S3)
S1F0(S3) PE53(S3) S1F0(S3) PE54(S3) S1F0(S3) PE55(S3) S1F0(S3)
PE56(S3) S1F0(S3) PE57(S3) S1F0(S3) PE61(S3) S1F0(S3) PE62(S3)
S1F0(S3) PE63(S3) S1F0(S3) PE64(S3) S1F0(S3) PE65(S3) S1F0(S3)
PE66(S3) S1F0(S3) PE67(S3) S1F0(S3) PE71(S3) S1F0(S3) PE72(S3)
S1F0(S3) PE73(S3) S1F0(S3) PE74(S3) S1F0(S3) PE75(S3) S1F0(S3)
PE76(S3) S1F0(S3) PE77(S3) S1F0(S3) PE81(S3) S1F0(S3) PE82(S3)
S1F0(S3) PE83(S3) S1F0(S3) PE84(S3) S1F0(S3) PE85(S3) S1F0(S3)
PE86(S3) S1F0(S3) PE87(S3) S1F0(S3) PE91(S3) S1F0(S3) PE92(S3)
S1F0(S3) PE93(S3) S1F0(S3) PE94(S3) S1F0(S3) PE95(S3) S1F0(S3)
PE96(S3) S1F0(S3) PE97(S3) S1F0(S3) PEA1(S3) S1F0(S3) PEA2(S3)
S1F0(S3) PEA3(S3) S1F0(S3) PEA4(S3) S1F0(S3) PEA5(S3) S1F0(S3)
PEA6(S3) S1F0(S3) PEA7(S3) S1F0(S3) PEB1(S3) S1F0(S3) PEB2(S3)
S1F0(S3) PEB3(S3) S1F0(S3) PEB4(S3) S1F0(S3) PEB5(S3) S1F0(S3)
PEB6(S3) S1F0(S3) PEB7(S3) S1F0(S3) SLPB(S4) LID_(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: 

Re: Foxconn NanoPC nT-i1250 fails to boot after install

2013-02-14 Thread Kent Fritz
This works for me.  I just installed the latest snapshot, synced the
source, applied your patch, built and installed and it works just
fine.

Hate Gmail for patches, though.

Thanks.  Hope I replied in time to make the 5.3 cut.  :)

Kent.

On Mon, Feb 11, 2013 at 2:34 AM, Martin Pieuchot mpieuc...@nolizard.org wrote:
 Hi Kent,

 On 14/01/13(Mon) 10:05, Kent Fritz wrote:
 On Fri, Jan 11, 2013 at 5:29 PM, Stefan Sperling s...@openbsd.org wrote:
  I see. So this is happening during pms_probe() which runs before the
  protocol is selected. Maybe fix it like this? I think the code should
  cope with hardware that returns unrecognizable garbage. But I don't
  know very much about PS/2.
 
  Thanks for pinning down the problem!
 
  Index: pckbc.c
  ===
  RCS file: /cvs/src/sys/dev/ic/pckbc.c,v
  retrieving revision 1.31
  diff -u -p -r1.31 pckbc.c
  --- pckbc.c 17 Oct 2012 19:16:10 -  1.31
  +++ pckbc.c 12 Jan 2013 01:25:41 -
  @@ -620,6 +620,11 @@ pckbc_poll_cmd1(struct pckbc_internal *t
   #ifdef PCKBCDEBUG
  printf(pckbc_cmd: lost 0x%x\n, c);
   #endif
  +   /* Don't retry cmd forever. */
  +   if (cmd-retries++ = 5) {
  +   cmd-status = EIO;
  +   return;
  +   }
  }
 
  while (cmd-responseidx  cmd-responselen) {

 That patch works fine.  Tested on i386 on nT-i1250.  Thanks for
 pointing me in the right direction!

 Could you try the diff below and tell me if it also fix your problem? I
 believe it's better to handle the bat failure core (0xfc) like we
 already do with the bat completion code rather than exiting for any
 value..

 M.

 Index: pckbc.c
 ===
 RCS file: /home/ncvs/src/sys/dev/ic/pckbc.c,v
 retrieving revision 1.31
 diff -u -p -r1.31 pckbc.c
 --- pckbc.c 17 Oct 2012 19:16:10 -  1.31
 +++ pckbc.c 11 Feb 2013 10:24:49 -
 @@ -48,6 +48,12 @@
  #include dev/pckbc/pckbdvar.h
  #endif

 +#ifdef PCKBCDEBUG
 +#define DPRINTF(x...)  do { printf(x); } while (0);
 +#else
 +#define DPRINTF(x...)
 +#endif
 +
  /* descriptor for one device command */
  struct pckbc_devcmd {
 TAILQ_ENTRY(pckbc_devcmd) next;
 @@ -102,9 +108,10 @@ int pckbcintr_internal(struct pckbc_inte

  const char *pckbc_slot_names[] = { kbd, aux };

 -#define KBC_DEVCMD_ACK 0xfa
 -#define KBC_DEVCMD_RESEND 0xfe
 -#define KBC_DEVCMD_BAT 0xaa
 +#define KBC_DEVCMD_ACK 0xfa
 +#define KBC_DEVCMD_RESEND  0xfe
 +#define KBC_DEVCMD_BAT_DONE0xaa
 +#define KBC_DEVCMD_BAT_FAIL0xfc

  #defineKBD_DELAY   DELAY(8)

 @@ -587,39 +594,32 @@ pckbc_poll_cmd1(struct pckbc_internal *t
 break;
 }

 -   if (c == KBC_DEVCMD_ACK) {
 +   switch (c) {
 +   case KBC_DEVCMD_ACK:
 cmd-cmdidx++;
 continue;
 -   }
 /*
  * Some legacy free PCs keep returning Basic Assurance Test
  * (BAT) instead of something usable, so fail gracefully.
  */
 -   if (c == KBC_DEVCMD_RESEND || c == KBC_DEVCMD_BAT) {
 -#ifdef PCKBCDEBUG
 -   printf(pckbc_cmd: %s\n,
 +   case KBC_DEVCMD_RESEND:
 +   case KBC_DEVCMD_BAT_DONE:
 +   case KBC_DEVCMD_BAT_FAIL:
 +   DPRINTF(pckbc_cmd: %s\n,
 c == KBC_DEVCMD_RESEND ? RESEND: BAT);
 -#endif
 if (cmd-retries++  5)
 continue;
 -   else {
 -#ifdef PCKBCDEBUG
 -   printf(pckbc: cmd failed\n);
 -#endif
 -   cmd-status = ENXIO;
 -   return;
 -   }
 -   }
 -   if (c == -1) {
 -#ifdef PCKBCDEBUG
 -   printf(pckbc_cmd: timeout\n);
 -#endif
 +
 +   DPRINTF(pckbc_cmd: cmd failed\n);
 +   cmd-status = ENXIO;
 +   return;
 +   case -1:
 +   DPRINTF(pckbc_cmd: timeout\n);
 cmd-status = EIO;
 return;
 +   default:
 +   DPRINTF(pckbc_cmd: lost 0x%x\n, c);
 }
 -#ifdef PCKBCDEBUG
 -   printf(pckbc_cmd: lost 0x%x\n, c);
 -#endif
 }

 while (cmd-responseidx  cmd-responselen) {



Re: KVM switch - keyboard

2013-02-10 Thread Kent Fritz
Just a data point...one of the boxes I've tried (can't remember which
of Foxconn nt535, nt-i1250, nt-i2847) had a similar/same problem.
About 30%-50% of the time when I switched to it, no kernel messages on
the screen, no keyboard.  I found that plugging in a USB flash drive
caused both the flash drive and the keyboard to be detected -- so that
was my workaround.

I've not seen the problem on other HW using the same cheap KVM.

On Sat, Feb 9, 2013 at 11:58 AM, Bastien Durel bast...@durel.org wrote:
 Quoting Francois Pussault fpussa...@contactoffice.fr:

 Hi, many hardware cannot manage USB keyboards without it present at boot.
 because bios or equiv doesn't enable the port so the OS (whatever it is)
 cannot use it.

 [...]

 a solution could be to have an usb-test device connected to garantee usb
 is enable
 even if kvm is on another device.

 Hello,

 But KVM *is* connected at boot time, as you can see here :

 uhidev1 at uhub4 port 1 configuration 1 interface 1 CHESEN USB Keyboard
 rev 1.10/1.10 addr 3

 It's the diconnection-reconnection which is not managed.

 Regards,

 --
 Bastien
 --
 Bastien



Re: Foxconn NanoPC nT-i1250 fails to boot after install

2013-01-14 Thread Kent Fritz
On Fri, Jan 11, 2013 at 5:29 PM, Stefan Sperling s...@openbsd.org wrote:
 I see. So this is happening during pms_probe() which runs before the
 protocol is selected. Maybe fix it like this? I think the code should
 cope with hardware that returns unrecognizable garbage. But I don't
 know very much about PS/2.

 Thanks for pinning down the problem!

 Index: pckbc.c
 ===
 RCS file: /cvs/src/sys/dev/ic/pckbc.c,v
 retrieving revision 1.31
 diff -u -p -r1.31 pckbc.c
 --- pckbc.c 17 Oct 2012 19:16:10 -  1.31
 +++ pckbc.c 12 Jan 2013 01:25:41 -
 @@ -620,6 +620,11 @@ pckbc_poll_cmd1(struct pckbc_internal *t
  #ifdef PCKBCDEBUG
 printf(pckbc_cmd: lost 0x%x\n, c);
  #endif
 +   /* Don't retry cmd forever. */
 +   if (cmd-retries++ = 5) {
 +   cmd-status = EIO;
 +   return;
 +   }
 }

 while (cmd-responseidx  cmd-responselen) {

That patch works fine.  Tested on i386 on nT-i1250.  Thanks for
pointing me in the right direction!



Re: Foxconn NanoPC nT-i1250 fails to boot after install

2013-01-11 Thread Kent Fritz
I dug a little deeper, and defined PCKBCDEBUG in
/usr/src/sys/dev/ic/pckbc.c, and it spews:
pckbc_cmd: lost 0xfc

Looking at pckbc_poll_cmd1, it looks like there's an infinite loop if
it doesn't get back a response it expects.  What's best: specifically
handling 0xfc, or erroring out on any unexpected response with
cmd-status = ENXIO; return;?  (I did the former and it works for
me.)



Re: Foxconn NanoPC nT-i1250 fails to boot after install

2013-01-10 Thread Kent Fritz
On Wed, Jan 9, 2013 at 5:34 PM, Stefan Sperling s...@openbsd.org wrote:
 Shot in the dark: Does it not hang if you disable the pms driver
 via boot -c? See the boot_config(8) man page.

 The RAMDISK_CD kernel doesn't have pms compiled in, and it might be
 the next thing pckbd0 is trying to initialise in the GENERIC kernel.

You must have night-vision goggles -- that did the trick.  If there's
anything I can do to help debug this further, let me know.  Otherwise,
I'm happy with the workaround.



Re: Foxconn NanoPC nT-i1250 fails to boot after install

2013-01-10 Thread Kent Fritz
On Thu, Jan 10, 2013 at 9:26 AM, Stefan Sperling s...@openbsd.org wrote:
 Can you please try to find out which protocol probe routine is
 responsible for hanging the machine?

None of them.  I tried as you suggested, then just #if'd  out every
entry in that structure.  No change in behavior.

(BTW: First time compiling my own kernel.  The FAQ rocks!)



Foxconn NanoPC nT-i1250 fails to boot after install

2013-01-09 Thread Kent Fritz
Install works fine, but consistently stops after printing:
wskbd0 at pckbd0: console keyboard, using wsdisplay0

Same behavior for 5.2 release, current, amd64 and i386, and another
model nT-i2847.  Any hints where to poke next?

dmesg from booting bsd.rd follows.  Thanks.

Kent

OpenBSD 5.2-current (RAMDISK_CD) #14: Tue Jan  8 14:28:01 MST 2013
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/RAMDISK_CD
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,LONG,SSE3,DTES64,MWAIT,DS-CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,LAHF,PERF,ITSC
real mem  = 2132189184 (2033MB)
avail mem = 2089598976 (1992MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 05/09/11, SMBIOS rev. 2.7 @
0x7f002010 (46 entries)
bios0: vendor American Megatrends Inc. version 4.6.5 date 03/14/2012
bios0: Foxconn nT-i1000 Series
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG SSDT SSDT SSDT IFEU
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 133MHz
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 4 pa 0xfec0, version 20, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 3 (P0P8)
acpiprt2 at acpi0: bus 1 (RP01)
acpiprt3 at acpi0: bus 2 (RP02)
acpiprt4 at acpi0: bus -1 (RP03)
acpiprt5 at acpi0: bus -1 (RP04)
bios0: ROM list: 0xc/0xf400! 0xcf800/0x1000
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 vendor Intel, unknown product 0x0bf3 rev 0x03
vga1 at pci0 dev 2 function 0 vendor Intel, unknown product 0x0be2 rev 0x09
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
ppb0 at pci0 dev 28 function 0 Intel 82801GB PCIE rev 0x02: apic 4 int 16
pci1 at ppb0 bus 1
vendor Intel, unknown product 0x0890 (class network subclass
miscellaneous, rev 0xc4) at pci1 dev 0 function 0 not configured
ppb1 at pci0 dev 28 function 1 Intel 82801GB PCIE rev 0x02: apic 4 int 17
pci2 at ppb1 bus 2
re0 at pci2 dev 0 function 0 Realtek 8168 rev 0x07:
RTL8168E/8111E-VL (0x2c80), apic 4 int 17, address d0:27:88:d5:72:6e
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 5
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 Intel EHCI root hub rev 2.00/1.00 addr 1
ppb2 at pci0 dev 30 function 0 Intel 82801BAM Hub-to-PCI rev 0xe2
pci3 at ppb2 bus 3
pcib0 at pci0 dev 31 function 0 Intel NM10 LPC rev 0x02
ahci0 at pci0 dev 31 function 2 Intel 82801GR AHCI rev 0x02: msi, AHCI 1.1
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0: ATA, WDC WD1600BEVT-0, 01.0 SCSI3
0/direct fixed naa.50014ee657159cc7
sd0: 152627MB, 512 bytes/sector, 312581808 sectors
Intel 82801GB SMBus rev 0x02 at pci0 dev 31 function 3 not configured
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 Intel UHCI root hub rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 Intel UHCI root hub rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 Intel UHCI root hub rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 Intel UHCI root hub rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
umass0 at uhub0 port 6 configuration 1 interface 0  CENTON USB rev
2.00/11.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: CENTON, , 1100 SCSI2 0/direct
removable serial.090c10002196
sd1: 30600MB, 512 bytes/sector, 62668800 sectors
umass1 at uhub0 port 7 configuration 1 interface 0 Generic
USB2.0-CRW rev 2.00/38.82 addr 3
umass1: using SCSI over Bulk-Only
scsibus2 at umass1: 2 targets, initiator 0
sd2 at scsibus2 targ 1 lun 0: Generic-, Multi-Card, 1.00 SCSI0
0/direct removable serial.0bda013851638820
uhub5 at uhub0 port 8 vendor 0x105b product 0x0d7d rev 2.00/77.64 addr 4
uhub6 at uhub3 port 1 ALCOR Generic USB Hub rev 1.10/3.12 addr 2
uhidev0 at uhub6 port 1 configuration 1 interface 0 Dell Dell USB
Keyboard rev 1.10/3.01 addr 3
uhidev0: iclass 3/1
ukbd0 at uhidev0
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
uhidev1 at uhub6 port 2 configuration 1 interface 0 vendor 0x0461 USB
Optical Mouse rev 2.00/2.00 addr 4
uhidev1: iclass 3/1
uhid at uhidev1 not configured
uhidev2 at uhub6 port 3 configuration 1 interface 0 No brand 4