W^X -wxneeded backported to 6.0-stable?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

W^X -wxneeded backported to 6.0-stable?

Jack J. Woehr
As noted on the ports mailing list, after 6.0 upgrade/cvs source/build kernel/build world/pkg_add -u I am experiencing
wx violations on a single whole-disk label mounted as / wxallowed.

Solène Rapenne <[hidden email]> posted:

> On -current binaries now needs both wxallowed on their mountpoint AND have to be compiled with -wxneeded flag.
>
> Maybe this has been backported to 6.0-stable ? I don't know where to look to check that. Maybe someone have a clue ?

Any tips?

Example errors from dmesg:

seamonkey(89184): mmap W^X violation
java(79321): mprotect W^X violation

Output of mount command:

/dev/sd1a on / type ffs (local, wxallowed)

Output of dmesg command:

OpenBSD 6.0-stable (GENERIC.MP) #0: Sun Sep 18 20:37:21 MDT 2016
[hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8553762816 (8157MB)
avail mem = 8290054144 (7906MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xeb040 (17 entries)
bios0: vendor American Megatrends Inc. version "R0200V3" date 02/10/2011
bios0: Sony Corporation VPCF215FX
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC HPET SLIC MCFG SSDT SSDT ECDT SSDT
acpi0: wakeup devices PEG0(S4) B0D4(S4) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB5(S3) USB6(S3) USB7(S3) HDEF(S4) PXSX(S4)
RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz, 1995.76 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz, 1995.47 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz, 1995.47 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz, 1995.47 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
cpu4 at mainbus0: apid 1 (application processor)
cpu4: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz, 1995.47 MHz
cpu4:
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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu4: 256KB 64b/line 8-way L2 cache
cpu4: smt 1, core 0, package 0
cpu5 at mainbus0: apid 3 (application processor)
cpu5: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz, 1995.47 MHz
cpu5:
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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu5: 256KB 64b/line 8-way L2 cache
cpu5: smt 1, core 1, package 0
cpu6 at mainbus0: apid 5 (application processor)
cpu6: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz, 1995.47 MHz
cpu6:
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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu6: 256KB 64b/line 8-way L2 cache
cpu6: smt 1, core 2, package 0
cpu7 at mainbus0: apid 7 (application processor)
cpu7: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz, 1995.47 MHz
cpu7:
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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu7: 256KB 64b/line 8-way L2 cache
cpu7: smt 1, core 3, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpihpet0 at acpi0: 14318179 Hz
acpimcfg0 at acpi0 addr 0xf8000000, bus 0-63
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 2 (RP01)
acpiprt2 at acpi0: bus 3 (RP02)
acpiprt3 at acpi0: bus 4 (RP03)
acpiprt4 at acpi0: bus 5 (RP04)
acpiprt5 at acpi0: bus -1 (RP05)
acpiprt6 at acpi0: bus -1 (RP06)
acpiprt7 at acpi0: bus 1 (PEGP)
acpicpu0 at acpi0: C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C1(1000@1 mwait.1), PSS
acpicpu4 at acpi0: C1(1000@1 mwait.1), PSS
acpicpu5 at acpi0: C1(1000@1 mwait.1), PSS
acpicpu6 at acpi0: C1(1000@1 mwait.1), PSS
acpicpu7 at acpi0: C1(1000@1 mwait.1), PSS
acpitz0 at acpi0: critical temperature is 96 degC
acpitz1 at acpi0: critical temperature is 96 degC
"INT3F0D" at acpi0 not configured
"PNP0303" at acpi0 not configured
"ALP0500" at acpi0 not configured
"SNY5001" at acpi0 not configured
acpibat0 at acpi0: BAT0 type LiOn oem "Sony Corp."
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD02
cpu0: Enhanced SpeedStep 1995 MHz: speeds: 2001, 2000, 1900, 1800, 1700, 1600, 1500, 1400, 1300, 1200, 1100, 1000, 900,
800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 2G Host" rev 0x09
ppb0 at pci0 dev 1 function 0 "Intel Core 2G PCIE" rev 0x09: msi
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 vendor "NVIDIA", unknown product 0x0df4 rev 0xa1
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
azalia0 at pci1 dev 0 function 1 "NVIDIA GF108 HD Audio" rev 0xa1: msi
azalia0: no supported codecs
"Intel 6 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
ehci0 at pci0 dev 26 function 0 "Intel 6 Series USB" rev 0x04: apic 2 int 16
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia1 at pci0 dev 27 function 0 "Intel 6 Series HD Audio" rev 0x04: msi
azalia1: codecs: Realtek/0x0275
audio0 at azalia1
ppb1 at pci0 dev 28 function 0 "Intel 6 Series PCIE" rev 0xb4: msi
pci2 at ppb1 bus 2
athn0 at pci2 dev 0 function 0 "Atheros AR9287" rev 0x01: apic 2 int 16
athn0: AR9287 rev 2 (2T2R), ROM rev 4, address 4c:0f:6e:fb:89:47
ppb2 at pci0 dev 28 function 1 "Intel 6 Series PCIE" rev 0xb4: msi
pci3 at ppb2 bus 3
sdhc0 at pci3 dev 0 function 0 "Ricoh 5U823 SD/MMC" rev 0x06: apic 2 int 18
sdhc0: SDHC 3.0, 50 MHz base clock
sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed
vendor "Ricoh", unknown product 0xe232 (class system subclass miscellaneous, rev 0x06) at pci3 dev 0 function 1 not
configured
"Ricoh 5U832 Firewire" rev 0x05 at pci3 dev 0 function 3 not configured
ppb3 at pci0 dev 28 function 2 "Intel 6 Series PCIE" rev 0xb4: msi
pci4 at ppb3 bus 4
xhci0 at pci4 dev 0 function 0 "NEC xHCI" rev 0x04: msi
usb1 at xhci0: USB revision 3.0
uhub1 at usb1 "NEC xHCI root hub" rev 3.00/1.00 addr 1
ppb4 at pci0 dev 28 function 3 "Intel 6 Series PCIE" rev 0xb4: msi
pci5 at ppb4 bus 5
re0 at pci5 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E (0x2c00), msi, address f0:bf:97:0f:04:71
rgephy0 at re0 phy 7: RTL8169S/8110S/8211 PHY, rev. 4
ehci1 at pci0 dev 29 function 0 "Intel 6 Series USB" rev 0x04: apic 2 int 23
usb2 at ehci1: USB revision 2.0
uhub2 at usb2 "Intel EHCI root hub" rev 2.00/1.00 addr 1
pcib0 at pci0 dev 31 function 0 "Intel HM65 LPC" rev 0x04
ahci0 at pci0 dev 31 function 2 "Intel 6 Series AHCI" rev 0x04: msi, AHCI 1.3
ahci0: port 0: 6.0Gb/s
ahci0: port 4: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, LITEONIT LAT-256, PND9> SCSI3 0/direct fixed naa.5000000000000000
sd0: 244198MB, 512 bytes/sector, 500118192 sectors, thin
cd0 at scsibus1 targ 4 lun 0: <MATSHITA, DVD-RAM UJ890AS, 1.00> ATAPI 5/cdrom removable
ichiic0 at pci0 dev 31 function 3 "Intel 6 Series SMBus" rev 0x04: apic 2 int 18
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 4GB DDR3 SDRAM PC3-10600 SO-DIMM
spdmem1 at iic0 addr 0x52: 4GB DDR3 SDRAM PC3-12800 SO-DIMM
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
uhub3 at uhub0 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
uvideo0 at uhub3 port 2 configuration 1 interface 0 "Ricoh Company Ltd. USB2.0 Camera" rev 2.00/7.31 addr 3
video0 at uvideo0
uhidev0 at uhub1 port 3 configuration 1 interface 0 "Corsair Corsair K65 Gaming Keyboard" rev 2.00/1.01 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
uhidev1 at uhub1 port 3 configuration 1 interface 1 "Corsair Corsair K65 Gaming Keyboard" rev 2.00/1.01 addr 2
uhidev1: iclass 3/0
uhid0 at uhidev1: input=2, output=0, feature=0
uhidev2 at uhub1 port 3 configuration 1 interface 2 "Corsair Corsair K65 Gaming Keyboard" rev 2.00/1.01 addr 2
uhidev2: iclass 3/0
ukbd1 at uhidev2: 120 variable keys, 0 key codes
wskbd2 at ukbd1 mux 1
wskbd2: connecting to wsdisplay0
uhidev3 at uhub1 port 4 configuration 1 interface 0 "Logitech USB Receiver" rev 2.00/12.03 addr 3
uhidev3: iclass 3/1
ukbd2 at uhidev3: 8 variable keys, 6 key codes
wskbd3 at ukbd2 mux 1
wskbd3: connecting to wsdisplay0
uhidev4 at uhub1 port 4 configuration 1 interface 1 "Logitech USB Receiver" rev 2.00/12.03 addr 3
uhidev4: iclass 3/1, 8 report ids
ums0 at uhidev4 reportid 2: 16 buttons, Z and W dir
wsmouse1 at ums0 mux 0
uhid1 at uhidev4 reportid 3: input=4, output=0, feature=0
uhid2 at uhidev4 reportid 4: input=1, output=0, feature=0
uhid3 at uhidev4 reportid 8: input=1, output=0, feature=0
uhidev5 at uhub1 port 4 configuration 1 interface 2 "Logitech USB Receiver" rev 2.00/12.03 addr 3
uhidev5: iclass 3/0, 33 report ids
uhid4 at uhidev5 reportid 16: input=6, output=6, feature=0
uhid5 at uhidev5 reportid 17: input=19, output=19, feature=0
uhid6 at uhidev5 reportid 32: input=14, output=14, feature=0
uhid7 at uhidev5 reportid 33: input=31, output=31, feature=0
uhub4 at uhub2 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006> SCSI2 0/direct fixed
sd1: 235483MB, 512 bytes/sector, 482270772 sectors
root on sd1a (7be6becbe71d5401.a) swap on sd1b dump on sd1b


--
Jack J. Woehr     # Science is more than a body of knowledge. It's a way of
www.well.com/~jax # thinking, a way of skeptically interrogating the universe
www.softwoehr.com # with a fine understanding of human fallibility. - Carl Sagan

Reply | Threaded
Open this post in threaded view
|

Re: W^X -wxneeded backported to 6.0-stable?

Stuart Henderson
On 2016/09/21 09:49, Jack J. Woehr wrote:
> As noted on the ports mailing list, after 6.0 upgrade/cvs source/build kernel/build world/pkg_add -u I am experiencing
> wx violations on a single whole-disk label mounted as / wxallowed.

I see no changes between 6.0 and 6.0-stable in this area.


> Solène Rapenne <[hidden email]> posted:
>
> > On -current binaries now needs both wxallowed on their mountpoint AND have to be compiled with -wxneeded flag.
> >
> > Maybe this has been backported to 6.0-stable ? I don't know where to
> > look to check that. Maybe someone have a clue ?
>
> Any tips?
>
> Example errors from dmesg:
>
> seamonkey(89184): mmap W^X violation
> java(79321): mprotect W^X violation

In 6.0 the packages for these did not have WXNEEDED annotations so
they would trigger the log, however the kernel did not enforce it on
wxallowed fs. So it expected to see this in dmesg but it is not expected
for them to die for this reason.

In -current after 6.0 the kernel enforced it strictly for non-WXNEEDED
executables for a while and killed the process if it made any W|X map
requests.

In ports-land after this, many ports gained WXNEEDED annotations so
they would run normally and not print a message.

After that (and still present) this changed to failing W|X map
requests and logging, but not killing the process. In some cases they
will accept the failure and handle it gracefully; in most cases they
won't. Again those executables with WXNEEDED annotations work
normally if they are on a "wxallowed" filesystem..


> Output of mount command:
>
> /dev/sd1a on / type ffs (local, wxallowed)
>
> Output of dmesg command:
>
> OpenBSD 6.0-stable (GENERIC.MP) #0: Sun Sep 18 20:37:21 MDT 2016
> [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 8553762816 (8157MB)
> avail mem = 8290054144 (7906MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xeb040 (17 entries)
> bios0: vendor American Megatrends Inc. version "R0200V3" date 02/10/2011
> bios0: Sony Corporation VPCF215FX
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP APIC HPET SLIC MCFG SSDT SSDT ECDT SSDT
> acpi0: wakeup devices PEG0(S4) B0D4(S4) USB1(S3) USB2(S3) USB3(S3) USB4(S3)
> USB5(S3) USB6(S3) USB7(S3) HDEF(S4) PXSX(S4) RP01(S4) PXSX(S4) RP02(S4)
> PXSX(S4) RP03(S4) [...]
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz, 1995.76 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
> cpu0: 256KB 64b/line 8-way L2 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> cpu0: apic clock running at 99MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz, 1995.47 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 4 (application processor)
> cpu2: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz, 1995.47 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
> cpu2: 256KB 64b/line 8-way L2 cache
> cpu2: smt 0, core 2, package 0
> cpu3 at mainbus0: apid 6 (application processor)
> cpu3: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz, 1995.47 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
> cpu3: 256KB 64b/line 8-way L2 cache
> cpu3: smt 0, core 3, package 0
> cpu4 at mainbus0: apid 1 (application processor)
> cpu4: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz, 1995.47 MHz
> cpu4: 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
> cpu4: 256KB 64b/line 8-way L2 cache
> cpu4: smt 1, core 0, package 0
> cpu5 at mainbus0: apid 3 (application processor)
> cpu5: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz, 1995.47 MHz
> cpu5: 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
> cpu5: 256KB 64b/line 8-way L2 cache
> cpu5: smt 1, core 1, package 0
> cpu6 at mainbus0: apid 5 (application processor)
> cpu6: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz, 1995.47 MHz
> cpu6: 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
> cpu6: 256KB 64b/line 8-way L2 cache
> cpu6: smt 1, core 2, package 0
> cpu7 at mainbus0: apid 7 (application processor)
> cpu7: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz, 1995.47 MHz
> cpu7: 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,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
> cpu7: 256KB 64b/line 8-way L2 cache
> cpu7: smt 1, core 3, package 0
> ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
> acpihpet0 at acpi0: 14318179 Hz
> acpimcfg0 at acpi0 addr 0xf8000000, bus 0-63
> acpiec0 at acpi0
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus 2 (RP01)
> acpiprt2 at acpi0: bus 3 (RP02)
> acpiprt3 at acpi0: bus 4 (RP03)
> acpiprt4 at acpi0: bus 5 (RP04)
> acpiprt5 at acpi0: bus -1 (RP05)
> acpiprt6 at acpi0: bus -1 (RP06)
> acpiprt7 at acpi0: bus 1 (PEGP)
> acpicpu0 at acpi0: C1(1000@1 mwait.1), PSS
> acpicpu1 at acpi0: C1(1000@1 mwait.1), PSS
> acpicpu2 at acpi0: C1(1000@1 mwait.1), PSS
> acpicpu3 at acpi0: C1(1000@1 mwait.1), PSS
> acpicpu4 at acpi0: C1(1000@1 mwait.1), PSS
> acpicpu5 at acpi0: C1(1000@1 mwait.1), PSS
> acpicpu6 at acpi0: C1(1000@1 mwait.1), PSS
> acpicpu7 at acpi0: C1(1000@1 mwait.1), PSS
> acpitz0 at acpi0: critical temperature is 96 degC
> acpitz1 at acpi0: critical temperature is 96 degC
> "INT3F0D" at acpi0 not configured
> "PNP0303" at acpi0 not configured
> "ALP0500" at acpi0 not configured
> "SNY5001" at acpi0 not configured
> acpibat0 at acpi0: BAT0 type LiOn oem "Sony Corp."
> acpiac0 at acpi0: AC unit online
> acpibtn0 at acpi0: LID0
> acpibtn1 at acpi0: PWRB
> acpivideo0 at acpi0: GFX0
> acpivout0 at acpivideo0: DD02
> cpu0: Enhanced SpeedStep 1995 MHz: speeds: 2001, 2000, 1900, 1800, 1700,
> 1600, 1500, 1400, 1300, 1200, 1100, 1000, 900, 800 MHz
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "Intel Core 2G Host" rev 0x09
> ppb0 at pci0 dev 1 function 0 "Intel Core 2G PCIE" rev 0x09: msi
> pci1 at ppb0 bus 1
> vga1 at pci1 dev 0 function 0 vendor "NVIDIA", unknown product 0x0df4 rev 0xa1
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> azalia0 at pci1 dev 0 function 1 "NVIDIA GF108 HD Audio" rev 0xa1: msi
> azalia0: no supported codecs
> "Intel 6 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
> ehci0 at pci0 dev 26 function 0 "Intel 6 Series USB" rev 0x04: apic 2 int 16
> usb0 at ehci0: USB revision 2.0
> uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
> azalia1 at pci0 dev 27 function 0 "Intel 6 Series HD Audio" rev 0x04: msi
> azalia1: codecs: Realtek/0x0275
> audio0 at azalia1
> ppb1 at pci0 dev 28 function 0 "Intel 6 Series PCIE" rev 0xb4: msi
> pci2 at ppb1 bus 2
> athn0 at pci2 dev 0 function 0 "Atheros AR9287" rev 0x01: apic 2 int 16
> athn0: AR9287 rev 2 (2T2R), ROM rev 4, address 4c:0f:6e:fb:89:47
> ppb2 at pci0 dev 28 function 1 "Intel 6 Series PCIE" rev 0xb4: msi
> pci3 at ppb2 bus 3
> sdhc0 at pci3 dev 0 function 0 "Ricoh 5U823 SD/MMC" rev 0x06: apic 2 int 18
> sdhc0: SDHC 3.0, 50 MHz base clock
> sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed
> vendor "Ricoh", unknown product 0xe232 (class system subclass miscellaneous,
> rev 0x06) at pci3 dev 0 function 1 not configured
> "Ricoh 5U832 Firewire" rev 0x05 at pci3 dev 0 function 3 not configured
> ppb3 at pci0 dev 28 function 2 "Intel 6 Series PCIE" rev 0xb4: msi
> pci4 at ppb3 bus 4
> xhci0 at pci4 dev 0 function 0 "NEC xHCI" rev 0x04: msi
> usb1 at xhci0: USB revision 3.0
> uhub1 at usb1 "NEC xHCI root hub" rev 3.00/1.00 addr 1
> ppb4 at pci0 dev 28 function 3 "Intel 6 Series PCIE" rev 0xb4: msi
> pci5 at ppb4 bus 5
> re0 at pci5 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E (0x2c00), msi, address f0:bf:97:0f:04:71
> rgephy0 at re0 phy 7: RTL8169S/8110S/8211 PHY, rev. 4
> ehci1 at pci0 dev 29 function 0 "Intel 6 Series USB" rev 0x04: apic 2 int 23
> usb2 at ehci1: USB revision 2.0
> uhub2 at usb2 "Intel EHCI root hub" rev 2.00/1.00 addr 1
> pcib0 at pci0 dev 31 function 0 "Intel HM65 LPC" rev 0x04
> ahci0 at pci0 dev 31 function 2 "Intel 6 Series AHCI" rev 0x04: msi, AHCI 1.3
> ahci0: port 0: 6.0Gb/s
> ahci0: port 4: 1.5Gb/s
> scsibus1 at ahci0: 32 targets
> sd0 at scsibus1 targ 0 lun 0: <ATA, LITEONIT LAT-256, PND9> SCSI3 0/direct fixed naa.5000000000000000
> sd0: 244198MB, 512 bytes/sector, 500118192 sectors, thin
> cd0 at scsibus1 targ 4 lun 0: <MATSHITA, DVD-RAM UJ890AS, 1.00> ATAPI 5/cdrom removable
> ichiic0 at pci0 dev 31 function 3 "Intel 6 Series SMBus" rev 0x04: apic 2 int 18
> iic0 at ichiic0
> spdmem0 at iic0 addr 0x50: 4GB DDR3 SDRAM PC3-10600 SO-DIMM
> spdmem1 at iic0 addr 0x52: 4GB DDR3 SDRAM PC3-12800 SO-DIMM
> isa0 at pcib0
> isadma0 at isa0
> pckbc0 at isa0 port 0x60/5 irq 1 irq 12
> pckbd0 at pckbc0 (kbd slot)
> wskbd0 at pckbd0: console keyboard, using wsdisplay0
> pms0 at pckbc0 (aux slot)
> wsmouse0 at pms0 mux 0
> pcppi0 at isa0 port 0x61
> spkr0 at pcppi0
> uhub3 at uhub0 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
> uvideo0 at uhub3 port 2 configuration 1 interface 0 "Ricoh Company Ltd. USB2.0 Camera" rev 2.00/7.31 addr 3
> video0 at uvideo0
> uhidev0 at uhub1 port 3 configuration 1 interface 0 "Corsair Corsair K65 Gaming Keyboard" rev 2.00/1.01 addr 2
> uhidev0: iclass 3/1
> ukbd0 at uhidev0: 8 variable keys, 6 key codes
> wskbd1 at ukbd0 mux 1
> wskbd1: connecting to wsdisplay0
> uhidev1 at uhub1 port 3 configuration 1 interface 1 "Corsair Corsair K65 Gaming Keyboard" rev 2.00/1.01 addr 2
> uhidev1: iclass 3/0
> uhid0 at uhidev1: input=2, output=0, feature=0
> uhidev2 at uhub1 port 3 configuration 1 interface 2 "Corsair Corsair K65 Gaming Keyboard" rev 2.00/1.01 addr 2
> uhidev2: iclass 3/0
> ukbd1 at uhidev2: 120 variable keys, 0 key codes
> wskbd2 at ukbd1 mux 1
> wskbd2: connecting to wsdisplay0
> uhidev3 at uhub1 port 4 configuration 1 interface 0 "Logitech USB Receiver" rev 2.00/12.03 addr 3
> uhidev3: iclass 3/1
> ukbd2 at uhidev3: 8 variable keys, 6 key codes
> wskbd3 at ukbd2 mux 1
> wskbd3: connecting to wsdisplay0
> uhidev4 at uhub1 port 4 configuration 1 interface 1 "Logitech USB Receiver" rev 2.00/12.03 addr 3
> uhidev4: iclass 3/1, 8 report ids
> ums0 at uhidev4 reportid 2: 16 buttons, Z and W dir
> wsmouse1 at ums0 mux 0
> uhid1 at uhidev4 reportid 3: input=4, output=0, feature=0
> uhid2 at uhidev4 reportid 4: input=1, output=0, feature=0
> uhid3 at uhidev4 reportid 8: input=1, output=0, feature=0
> uhidev5 at uhub1 port 4 configuration 1 interface 2 "Logitech USB Receiver" rev 2.00/12.03 addr 3
> uhidev5: iclass 3/0, 33 report ids
> uhid4 at uhidev5 reportid 16: input=6, output=6, feature=0
> uhid5 at uhidev5 reportid 17: input=19, output=19, feature=0
> uhid6 at uhidev5 reportid 32: input=14, output=14, feature=0
> uhid7 at uhidev5 reportid 33: input=31, output=31, feature=0
> uhub4 at uhub2 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
> vscsi0 at root
> scsibus2 at vscsi0: 256 targets
> softraid0 at root
> scsibus3 at softraid0: 256 targets
> sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006> SCSI2 0/direct fixed
> sd1: 235483MB, 512 bytes/sector, 482270772 sectors
> root on sd1a (7be6becbe71d5401.a) swap on sd1b dump on sd1b
>
>
> --
> Jack J. Woehr     # Science is more than a body of knowledge. It's a way of
> www.well.com/~jax # thinking, a way of skeptically interrogating the universe
> www.softwoehr.com # with a fine understanding of human fallibility. - Carl Sagan
>

Reply | Threaded
Open this post in threaded view
|

Re: W^X -wxneeded backported to 6.0-stable?

Theo de Raadt-2
> On 2016/09/21 09:49, Jack J. Woehr wrote:
> > As noted on the ports mailing list, after 6.0 upgrade/cvs source/build =
> kernel/build world/pkg_add -u I am experiencing
> > wx violations on a single whole-disk label mounted as / wxallowed.
>
> I see no changes between 6.0 and 6.0-stable in this area.
>
>
> > Sol=E8ne Rapenne <[hidden email]> posted:
> >=20
> > > On -current binaries now needs both wxallowed on their mountpoint AND=
>  have to be compiled with -wxneeded flag.
> > >=20
> > > Maybe this has been backported to 6.0-stable ? I don't know where to
> > > look to check that. Maybe someone have a clue ?
> >=20
> > Any tips?
> >=20
> > Example errors from dmesg:
> >=20
> > seamonkey(89184): mmap W^X violation
> > java(79321): mprotect W^X violation
>
> In 6.0 the packages for these did not have WXNEEDED annotations so
> they would trigger the log, however the kernel did not enforce it on
> wxallowed fs. So it expected to see this in dmesg but it is not expected
> for them to die for this reason.
>
> In -current after 6.0 the kernel enforced it strictly for non-WXNEEDED
> executables for a while and killed the process if it made any W|X map
> requests.
>
> In ports-land after this, many ports gained WXNEEDED annotations so
> they would run normally and not print a message.
>
> After that (and still present) this changed to failing W|X map
> requests and logging, but not killing the process. In some cases they
> will accept the failure and handle it gracefully; in most cases they
> won't. Again those executables with WXNEEDED annotations work
> normally if they are on a "wxallowed" filesystem..
>
>
> > Output of mount command:
> >=20
> > /dev/sd1a on / type ffs (local, wxallowed)
> >=20
> > Output of dmesg command:
> >=20
> > OpenBSD 6.0-stable (GENERIC.MP) #0: Sun Sep 18 20:37:21 MDT 2016
> > [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP

In other words, it is pretty simple -- reinstall, and prove reproducibility.

And frankly, doing your entire system as /, should almost be an
unsupported option.  It is a ridiculous configuration for about 20
reasons.

Reply | Threaded
Open this post in threaded view
|

Re: W^X -wxneeded backported to 6.0-stable?

Jack J. Woehr
In reply to this post by Stuart Henderson
Stuart Henderson wrote:
> In 6.0 the packages for these did not have WXNEEDED annotations so
> they would trigger the log, however the kernel did not enforce it on
> wxallowed fs. So it expected to see this in dmesg but it is not expected
> for them to die for this reason

Thanks, Stuart. Some Java stuff certainly seems to behave oddly. TN5250J hangs on exit sometimes.
Some NetBeans windows behave differently than they did on 5.9. But I'm getting work done, so I'm
reasonably happy. ("What? Did you want him to be *unreasonably* happy?" - George Carlin)

--
Jack J. Woehr     # Science is more than a body of knowledge. It's a way of
www.well.com/~jax # thinking, a way of skeptically interrogating the universe
www.softwoehr.com # with a fine understanding of human fallibility. - Carl Sagan

Reply | Threaded
Open this post in threaded view
|

Re: W^X -wxneeded backported to 6.0-stable?

Jack J. Woehr
In reply to this post by Theo de Raadt-2
Theo de Raadt wrote:
> In other words, it is pretty simple -- reinstall, and prove reproducibility.

I have clients and work to do. Did this all on a Sunday night.

> And frankly, doing your entire system as /, should almost be an unsupported option. It is a ridiculous configuration
> for about 20 reasons.

Mais oui, m'sieu. Was my first try at whole-disk encryption. Next time I build a new machine, I'll do it right.

--
Jack J. Woehr     # Science is more than a body of knowledge. It's a way of
www.well.com/~jax # thinking, a way of skeptically interrogating the universe
www.softwoehr.com # with a fine understanding of human fallibility. - Carl Sagan

Reply | Threaded
Open this post in threaded view
|

Re: W^X -wxneeded backported to 6.0-stable?

Theo de Raadt-2
In reply to this post by Jack J. Woehr
>Theo de Raadt wrote:
>> In other words, it is pretty simple -- reinstall, and prove reproducibility.
>
>I have clients and work to do. Did this all on a Sunday night.
>
>> And frankly, doing your entire system as /, should almost be an unsupported option. It is a ridiculous configuration
>> for about 20 reasons.
>
>Mais oui, m'sieu. Was my first try at whole-disk encryption. Next time I build a new machine, I'll do it right.

That has nothing to do with having one / partition, via many partitions.

And secondly when it is the first try, and flaws become evident, why
keep digging a deeper hole.

Even the sorries become noise.

Reply | Threaded
Open this post in threaded view
|

Re: W^X -wxneeded backported to 6.0-stable?

Theo de Raadt-2
In reply to this post by Jack J. Woehr
>Theo de Raadt wrote:
>> In other words, it is pretty simple -- reinstall, and prove reproducibility.
>
>I have clients and work to do. Did this all on a Sunday night.

You have clients and work, so instead your spam this mailing list?

That is the problem: Selfishness.


Reply | Threaded
Open this post in threaded view
|

Re: W^X -wxneeded backported to 6.0-stable?

Jack J. Woehr
Theo de Raadt wrote:
> You have clients and work, so instead your spam this mailing list?
I thought it might be a known problem. OpenBSD is your whole world. It's a very important part
of mine, but I really can't keep up on everything that flies by on the list as I did 18 years ago.

And it's not spam. It's just a question. You're a very silly person, sometimes, Mr. de Raadt.

--
Jack J. Woehr     # Science is more than a body of knowledge. It's a way of
www.well.com/~jax # thinking, a way of skeptically interrogating the universe
www.softwoehr.com # with a fine understanding of human fallibility. - Carl Sagan