rdomain related interface configuration via hostname.if(5) broken in current

2018-02-28 Thread Andreas Bartelt
configuration of IP addresses via hostname.if(5) is currently broken for 
lo(4) in case it's an auto-created interface in the context of rdomain 
usage (i.e., putting em0 in rdomain 1 auto-creates lo1). The problem 
persists at least since Feb, 23rd and can be worked around by simply 
configuring an IP address for lo1 via ifconfig command in /etc/rc.local


Example:

# cat /etc/hostname.em0
rdomain 1
dhcp

# cat /etc/hostname.lo1
inet 192.168.1.1 255.255.255.0 NONE

This kind of config previously worked well in the following way:
- rdomain 1 was created
- em0 was put into rdomain 1
- lo1 was auto-created and put into rdomain 1
- /etc/hostname.lo1 added an IP address to the lo1 interface (which 
remained in rdomain 1)


Since the breakage, this config fails to create rdomain 1. Adding a 
(previously redundant) "rdomain 1" statement to /etc/hostname.lo1 also 
doesn't solve the problem.


Please let me know if you need further infos on my specific config.



panic i386 trapsignal kernel lock

2018-02-28 Thread Alexander Bluhm
Hi,

When executing the libc ieeefp/except regression test, the i386 kernel
panics.

root@ot2:/usr/src/regress/lib/libc/ieeefp/except# make
cc -O2 -pipe   -MD -MP  -c /usr/src/regress/lib/libc/ieeefp/except/except.c
cc   -o except except.o 
./except fltdiv

panic: kernel diagnostic assertion "_kernel_lock_held()" failed: file 
"/usr/src/sys/kern/kern_sig.c", line 759
Stopped at  db_enter+0x4:   popl%ebp
TIDPIDUID PRFLAGS PFLAGS  CPU  COMMAND
*109367   7430  0 0x3  01  except
 294693586  0 0x14000 0x42000  softclock
db_enter() at db_enter+0x4
panic() at panic+0xcc
__assert(d09d4b80,d0a4b8f7,2f7,d0bdc81f) at __assert+0x19
trapsignal(d6f5a708,8,2,3,168337af) at trapsignal+0x2b1
npxintr(f55b4f04) at npxintr+0x19d
end of kernel

OpenBSD 6.2-current (GENERIC.MP) #406: Tue Feb 27 14:55:44 MST 2018
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP

mpi@ has added the KERNEL_ASSERT_LOCKED() two days ago in kern/kern_sig.c


revision 1.216
date: 2018/02/26 13:33:25;  author: mpi;  state: Exp;  lines: +41 -34;  
commitid: Fy7O7T6htGPpvssI;
Fix a TOCTOU race that causes signals to be delivered more than once.

The race is only triggerable if one of the threads of a multi-threaded
program is in the middle of a NOLOCK syscall when a signal is received.

The problem is that `ps_sigact' is shared between threads so its access
should be serialized.  In the case of SA_RESETHAND, the handler is reset
when a signal is delivered, so delivering the signal twice would put the
process in an "impossible" state where some threads were stopped and some
were waiting for the others to die.

Serialize signal checking & processing with the KERNEL_LOCK() for now,
and introduce postsig_done() gypped from FreeBSD, to make sure the lock
is held when resetting the handler.

Bug report from espie@, ok visa@


Is there just a kernel lock missing around trapsignal() in npxintr()?
And what about psignal(), in other places it is called with kernel
lock.

bluhm

Index: arch/i386/isa/npx.c
===
RCS file: /data/mirror/openbsd/cvs/src/sys/arch/i386/isa/npx.c,v
retrieving revision 1.63
diff -u -p -r1.63 npx.c
--- arch/i386/isa/npx.c 30 Dec 2017 20:46:59 -  1.63
+++ arch/i386/isa/npx.c 28 Feb 2018 20:28:54 -
@@ -528,7 +528,9 @@ npxintr(void *arg)
else
code = x86fpflags_to_siginfo(addr->sv_87.sv_ex_sw);
sv.sival_int = frame->if_eip;
+   KERNEL_LOCK();
trapsignal(p, SIGFPE, T_ARITHTRAP, code, sv);
+   KERNEL_UNLOCK();
} else {
/*
 * Nested interrupt.  These losers occur when:
@@ -544,7 +546,9 @@ npxintr(void *arg)
 *
 * Treat them like a true async interrupt.
 */
+   KERNEL_LOCK();
psignal(p, SIGFPE);
+   KERNEL_UNLOCK();
}
 
return (1);



Touchpad (iatp) error on resume on Chromebook Pixel 2015

2018-02-28 Thread bob
Hardware is the Chromebook pixel 2015.  No response from touchpad or 
touchscreen on resume.  These errors pop up in the dmesg.  Full dmesg below.

iatp0: failed reading main memory map
iatp1: failed reading main memory map
iatp0: failed reading 540
iatp1: failed reading 680
iatp0: failed reading t44 and t5

I'm using the wsmouse touchpad xorg configuration.

- xorg.conf excerpt
Section "InputClass"
Identifier "wsmouse touchpad"
Driver "ws"
MatchIsTouchpad "on"
Option "ZAxisMapping" "5 4"
Option "acceleration factor" "3.2"
EndSection



OpenBSD 6.2-current (GENERIC.MP) #15: Tue Feb 27 22:15:26 MST 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17094049792 (16302MB)
avail mem = 16568954880 (15801MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x7ce42020 (9 entries)
bios0: vendor coreboot version "(null)" date 04/02/2015
bios0: GOOGLE Samus
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S2 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC MCFG SSDT
acpi0: wakeup devices HDEF(S3) WLAN(S3) EHCI(S3) XHCI(S3) ATPA(S3) CODC(S3) 
LID0(S5)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2394.64 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,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SENSOR,ARAT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
acpihpet0: recalibrated TSC frequency 2394461141 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2893.31 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,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SENSOR,ARAT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 3 (application processor)
cpu2: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2893.31 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,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SENSOR,ARAT,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 1, core 1, package 0
cpu3 at mainbus0: apid 2 (application processor)
cpu3: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, 2893.31 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,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SENSOR,ARAT,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 40 pins
acpimcfg0 at acpi0 addr 0xf000, bus 0-255
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (RP01)
acpiprt2 at acpi0: bus -1 (RP02)
acpiprt3 at acpi0: bus -1 (RP03)
acpiprt4 at acpi0: bus -1 (RP04)
acpiprt5 at acpi0: bus -1 (RP05)
acpiprt6 at acpi0: bus -1 (RP06)
acpiprt7 at acpi0: bus -1 (RP07)
acpiprt8 at acpi0: bus -1 (RP08)
acpiec0 at acpi0
acpicpu0 at acpi0: C3(700@148 mwait.1@0x33), C2(900@67 mwait.1@0x10), C1(1000@0 
mwait.1@0x1), PSS
acpicpu1 at acpi0: C3(700@148 mwait.1@0x33), C2(900@67 mwait.1@0x10), C1(1000@0 
mwait.1@0x1), PSS
acpicpu2 at acpi0: C3(700@148 mwait.1@0x33), C2(900@67 mwait.1@0x10), C1(1000@0 
mwait.1@0x1), PSS
acpicpu3 at acpi0: C3(700@148 mwait.1@0x33), C2(900@67 mwait.1@0x10), C1(1000@0 
mwait.1@0x1), PSS
acpitz0 at acpi0: critical temperature is 104 degC
"INT3438" at acpi0 not configured
"INT3437" at acpi0 not configured
acpiac0 at acpi0: AC unit offline
acpibat0 at acpi0: BAT0 model "3487041" serial 875640880 type LION oem 
"21484737139854675"
acpials0 at acpi0: ALS_
"GOOG0003" at acpi0 not configured
tpm0 at acpi0: TPM_ addr 

[SOLVED] Re: HDMI can't be used as primary monitor

2018-02-28 Thread Jiri Navratil
Hi Jirko,

Thank you for quick response and the URL.

I used the machine on other HDMI device and there xrandr worked fine. So
xrandr worked and I was able to use the HDMI.

Thanks Mark to pointing me to current version. The upgrade via snapshot
was smooth.

Thank you,
Jiří

On Wed, Feb 28, 2018 at 02:49:35AM -0500, Jiri B wrote:
> On Wed, Feb 28, 2018 at 07:25:03AM +0100, Jiri Navratil wrote:
> > Thank you Mark for reply.
> > 
> > I upraded to snapshot. Now the xrandr command shows properly HDMI
> > connected and possible modes, but the command
> > 
> > xrandr --output eDP-1 --auto --rotate normal --pos 0x0 --output HDMI-1 
> > --auto --rotate normal --right-of eDP-1
> > 
> > it did not make HDMI TV to wakeup and I was not able to use it
> > 
> > I see in dmesg this:
> > 
> > uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 
> > 3.00/1.00 addr 1
> > error: [drm:pid86113:i915_gem_init_hw] *ERROR* Failed to initialize GuC, 
> > error -8 (ignored)
> > uhub1 at uhub0 port 2 configuration 1 interface 0 "Generic 4-Port USB 2.0 
> > Hub" rev 2.10/1.17 addr 2
> > WARNING !wm_changed failed at /usr/src/sys/dev/pci/drm/i915/intel_pm.c:3609
> 
> tl;dr but have you checked https://marc.info/?t=15169561314=1=2 ?
> 
> Jiri


smime.p7s
Description: S/MIME cryptographic signature