Re: GUI Funding.

2018-11-02 Thread luca.cappelle...@positronic.ch

Il 02/11/18 19:05, Al Poole ha scritto:

To whom it concerns,

I spent two years fixing and porting EFL and E on FreeBSD
and more specifically OpenBSD.

In my spare time I work on  EFL/Tizen and Enlightenment and
others.

Some gentleman commented on one of the groups I belong to
about OpenBSD needing some "GUI love".

I'd love to work more on EFL/E and OpenBSD. However it would
really need to be funded somehow.

I think E and EFL is a good choice, it's lightweight, licensed okay, and
really beautiful (and more potential there).

If it were possible I really think I'm the right person to do this.

Thanks,

Alastair




+1
I hope this happens as soon as possible



OpenBSD on AMD Ryzen7 2700 Asrock B450 chipset

2018-11-02 Thread Denis
OpenBSD6.4amd64 first install on latest AMD Ryzen7 2700 +Asrock B450
chipset based mainboard.

Hardware is relatively new. Can test any compatibility issues/fixes on it.

I have an issue during installation from USB2 flash connected to USB3
port of the mainboard. Installation works smoothly once flashdrive
connected to USB2 controller.

...
Installing base65.tgz   66%
mass0: Invalid CSW: sig 0x43425355 should be 0x53425355
tp: Reading from file: Input/output error
gzip: stdin: Input/output error
tar: End of archive volume 1 reached

There are a lot of "unconfigured" hardware is present in dmesg:

OpenBSD 6.4 (RAMDISK_CD) #348: Thu Oct 11 13:36:16 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 34271694848 (32684MB)
avail mem = 33229246464 (31689MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0xe68e0 (23 entries)
bios0: vendor American Megatrends Inc. version "P1.10" date 06/19/2018
bios0: ASRock B450 Gaming-ITX/ac
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP APIC FPDT FIDT SSDT SSDT CRAT CDIT SSDT MCFG
AAFT HPET SSDT UEFI IVRS SSDT SSDT WSMT
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Ryzen 7 2700 Eight-Core Processor, 3194.62 MHz, 17-08-02
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA,IBPB,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu0: 64KB 64b/line 4-way I-cache, 32KB 64b/line 8-way D-cache, 512KB
64b/line 8-way L2 cache, 16MB 64b/line 16-way L3 cache
cpu0: ITLB 64 4KB entries fully associative, 64 4MB entries fully
associative
cpu0: DTLB 64 4KB entries fully associative, 64 4MB entries fully
associative
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=1.1, IBE
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 17 pa 0xfec0, version 21, 24 pins, can't remap
ioapic1 at mainbus0: apid 18 pa 0xfec01000, version 21, 32 pins, can't remap
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (GPP0)
acpiprt2 at acpi0: bus -1 (GPP1)
acpiprt3 at acpi0: bus -1 (GPP3)
acpiprt4 at acpi0: bus -1 (GPP4)
acpiprt5 at acpi0: bus -1 (GPP5)
acpiprt6 at acpi0: bus -1 (GPP6)
acpiprt7 at acpi0: bus -1 (GPP7)
acpiprt8 at acpi0: bus 38 (GPP8)
acpiprt9 at acpi0: bus -1 (GPP9)
acpiprt10 at acpi0: bus -1 (GPPA)
acpiprt11 at acpi0: bus -1 (GPPB)
acpiprt12 at acpi0: bus -1 (GPPC)
acpiprt13 at acpi0: bus -1 (GPPD)
acpiprt14 at acpi0: bus -1 (GPPE)
acpiprt15 at acpi0: bus -1 (GPPF)
acpiprt16 at acpi0: bus 42 (GP17)
acpiprt17 at acpi0: bus 43 (GP18)
acpiprt18 at acpi0: bus 3 (GPP2)
acpicpu at acpi0 not configured
"PNP0B00" at acpi0 not configured
"PNP0C0C" at acpi0 not configured
"AMDI0030" at acpi0 not configured
"AMDIF030" at acpi0 not configured
"PNP0C14" at acpi0 not configured
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "AMD AMD64 17h Root Complex" rev 0x00
"AMD AMD64 17h IOMMU" rev 0x00 at pci0 dev 0 function 2 not configured
pchb1 at pci0 dev 1 function 0 "AMD AMD64 17h PCIE" rev 0x00
ppb0 at pci0 dev 1 function 1 "AMD AMD64 17h PCIE" rev 0x00: msi
pci1 at ppb0 bus 1
nvme0 at pci1 dev 0 function 0 "Samsung SM981/PM981 NVMe" rev 0x00: msi,
NVMe 1.2
nvme0: PM981 NVMe Samsung 1024GB
scsibus0 at nvme0: 1 targets
sd0 at scsibus0 targ 0 lun 0:  SCSI4 0/direct
fixed
sd0: 976762MB, 512 bytes/sector, 2000409264 sectors
ppb1 at pci0 dev 1 function 3 "AMD AMD64 17h PCIE" rev 0x00: msi
pci2 at ppb1 bus 3
xhci0 at pci2 dev 0 function 0 vendor "AMD", unknown product 0x43d5 rev
0x01: msi, xHCI 1.16
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "AMD xHCI root hub" rev
3.00/1.00 addr 1
ahci0 at pci2 dev 0 function 1 vendor "AMD", unknown product 0x43c8 rev
0x01: msi, AHCI 1.3.1
scsibus1 at ahci0: 32 targets
ppb2 at pci2 dev 0 function 2 vendor "AMD", unknown product 0x43c6 rev 0x01
pci3 at ppb2 bus 29
ppb3 at pci3 dev 0 function 0 vendor "AMD", unknown product 0x43c7 rev
0x01: msi
pci4 at ppb3 bus 30
ppb4 at pci3 dev 1 function 0 vendor "AMD", unknown product 0x43c7 rev
0x01: msi
pci5 at ppb4 bus 31
ppb5 at pci3 dev 4 function 0 vendor "AMD", unknown product 0x43c7 rev
0x01: msi
pci6 at ppb5 bus 34
ppb6 at pci3 dev 5 function 0 vendor "AMD", unknown product 0x43c7 rev
0x01: msi
pci7 at 

httpd: fix/consistency cast for ctype function

2018-11-02 Thread Hiltjo Posthuma
Hi,

I noticed many ctype functions (such as isalpha, isdigit, tolower) are cast to
unsigned char in httpd. This patch changes it also for one remaining check.

I'm not sure the cast is neccessary on OpenBSD, but it is undefined behaviour I
think as described in the man page isalpha(3):

"CAVEATS
 The argument c must be EOF or representable as an unsigned char;
 otherwise, the result is undefined."

POSIX (http://pubs.opengroup.org/onlinepubs/9699919799/functions/isalpha.html)
also says:

"The c argument is an int, the value of which the application shall ensure is
representable as an unsigned char or equal to the value of the macro EOF. If
the argument has any other value, the behavior is undefined."

I've also tested this on other OS's. For example on NetBSD it does matter there
in the inline vs non-inlined ctype functions.

Patch below:


diff --git a/usr.sbin/httpd/server_http.c b/usr.sbin/httpd/server_http.c
index 1f1a03d06e2..b79ebd35932 100644
--- a/usr.sbin/httpd/server_http.c
+++ b/usr.sbin/httpd/server_http.c
@@ -220,7 +220,7 @@ server_read_http(struct bufferevent *bev, void *arg)
if (!clt->clt_line) {
/* Peek into the buffer to see if it looks like HTTP */
key = EVBUFFER_DATA(src);
-   if (!isalpha(*key)) {
+   if (!isalpha((unsigned char)*key)) {
server_abort_http(clt, 400,
"invalid request line");
goto abort;

-- 
Kind regards,
Hiltjo



Re: Xenocara: disable xdm-authorization-1 cleanly

2018-11-02 Thread Theo Buehler
On Thu, Nov 01, 2018 at 12:58:36PM +0100, Matthieu Herrb wrote:
> Hi,
> 
> The XDM-AUTHORIZATION-1 protocol is currenly disabled in xenocara.
> It makes sense: this auth protocol doesn't work with IPv6, is relying
> on weak DES encryption and only useful with XDMP which isn't supported
> by xenodm.
> 
> But it's currently only disabled as a side-effect of a buggy check in
> xenodm. (If written correctly the test whould enable it...).
> This buggy check is a left-over from xdm, and is useless for xenodm.
> 
> So let's remove it, and explicitely disable xdm-auth-1 in xserver.
> 
> ok ?

ok

> 
> Index: app/xenodm/configure.ac
> ===
> RCS file: /cvs/xenocara/app/xenodm/configure.ac,v
> retrieving revision 1.9
> diff -u -r1.9 configure.ac
> --- app/xenodm/configure.ac   15 Jul 2018 09:05:11 -  1.9
> +++ app/xenodm/configure.ac   1 Nov 2018 11:49:32 -
> @@ -198,8 +198,6 @@
>  XENODM_CFLAGS="$XENODM_CFLAGS $DMCP_CFLAGS $XLIB_CFLAGS $AUTH_CFLAGS 
> $STATIC_GREETER_CFLAGS"
>  XENODM_LIBS="$XENODM_LIBS $DMCP_LIBS"
>  
> -AC_CHECK_LIB(Xdmcp, XdmcpWrap, [xdmauth="yes"], [xdmauth="no"], [$DMCP_LIBS])
> -
>  AC_SUBST(XENODM_CFLAGS)
>  AC_SUBST(XENODM_LIBS)
>  
> Index: xserver/Makefile.bsd-wrapper
> ===
> RCS file: /cvs/xenocara/xserver/Makefile.bsd-wrapper,v
> retrieving revision 1.67
> diff -u -r1.67 Makefile.bsd-wrapper
> --- xserver/Makefile.bsd-wrapper  25 Oct 2018 21:55:18 -  1.67
> +++ xserver/Makefile.bsd-wrapper  1 Nov 2018 11:49:32 -
> @@ -35,7 +35,7 @@
>   --with-module-dir=${LIBDIR}/modules ${GLX_OPTION} \
>   --disable-install-setuid --enable-privsep \
>   ${KDRIVE_OPTION} \
> - --enable-xcsecurity \
> + --enable-xcsecurity --disable-xdm-auth-1 \
>   --without-fop --without-xmlto --without-xsltproc \
>   --disable-dmx ${NO_XORG_OPTION} \
>   --disable-unit-tests \
> 
> -- 
> Matthieu Herrb
> 



GUI Funding.

2018-11-02 Thread Al Poole
To whom it concerns,

I spent two years fixing and porting EFL and E on FreeBSD
and more specifically OpenBSD.

In my spare time I work on  EFL/Tizen and Enlightenment and
others.

Some gentleman commented on one of the groups I belong to
about OpenBSD needing some "GUI love".

I'd love to work more on EFL/E and OpenBSD. However it would
really need to be funded somehow.

I think E and EFL is a good choice, it's lightweight, licensed okay, and
really beautiful (and more potential there).

If it were possible I really think I'm the right person to do this.

Thanks,

Alastair



"Portsmash"

2018-11-02 Thread Theo de Raadt
https://github.com/bbbrumley/portsmash

new portsmash thing doesn't matter on openbsd 6.4 and onwards since we
disable SMT by default

Quietly in the last 6 months other systems have disabled SMT by default,
or added options to disable it where they could not do so before.



pledge xenodm

2018-11-02 Thread Ricardo Mestre
Hi,

Looking at pledging xenodm a little bit more I was able to run it with
the diff below across X restarts, with stock configuration.

Please test it, if you have special configs better since most likely
this will break it but we need to know where and why and with that maybe
trim xenodm's bloat.

DisplayManager:
rpath: open(2) /etc/X11/xenodm/xenodm-config
cpath: unlink(2) d->authFile
proc: kill(2)

Session:
rpath: open(2) /etc/fbtab
wpath/cpath: open(2) d->authFile
fattr: chmod(2) d->authFile
dns: sysctl(2) for name resolution
proc: kill(2)
exec: execve(2) /etc/X11/xenodm/TakeConsole
id: setuid(2)

Index: dm.c
===
RCS file: /cvs/xenocara/app/xenodm/xenodm/dm.c,v
retrieving revision 1.6
diff -u -p -u -r1.6 dm.c
--- dm.c11 Jul 2018 16:57:04 -  1.6
+++ dm.c31 Oct 2018 15:15:49 -
@@ -604,6 +604,10 @@ StartDisplay (struct display *d)
Debug ("pid: %d\n", pid);
d->pid = pid;
d->status = running;
+
+   if (pledge("stdio rpath cpath proc", NULL) == -1)
+   exit(OPENFAILED_DISPLAY);
+
break;
 }
 }
Index: session.c
===
RCS file: /cvs/xenocara/app/xenodm/xenodm/session.c,v
retrieving revision 1.12
diff -u -p -u -r1.12 session.c
--- session.c   11 Jul 2018 20:28:41 -  1.12
+++ session.c   31 Oct 2018 15:15:49 -
@@ -378,6 +378,10 @@ StartClient (
 default:
Debug ("StartSession, fork succeeded %d\n", pid);
*pidp = pid;
+
+   if (pledge("stdio rpath wpath cpath fattr dns proc exec id", NULL) == 
-1)
+   exit(25);
+
return 1;
 }
 }

- End forwarded message -