Re: RELRO: mwuauahhahaha

2016-08-07 Thread Philip Guenther
On Sun, 7 Aug 2016, Philip Guenther wrote: > I'm looking for anyone with alpha or landisk that can test relro there. > Just add "|| defined(__alpha__) || defined(__sh__)" to the #if in the > first chunk below, then: This has been done now (thanks theo!) ...and there are some padding issues for

Re: ksh, ctrl-r followed by arrow key leaves "[D" or "[C" artifacts

2016-08-07 Thread Martin Natano
On Mon, Aug 08, 2016 at 03:33:23AM +0200, Ingo Schwarze wrote: > Hi Dave, > > redirecting from misc@ to tech@ because i'm appending a patch > at the very end, lightly tested. > > This has indeed been annoying me for years, but it never occurred > to me that i might be able to figure out what's go

Re: man9/config_attach.9: incorporate config_deactivate information

2016-08-07 Thread Ian Sutton
On Sun, Aug 07, 2016 at 10:50:49PM -0600, Theo de Raadt wrote: > Your diff also contained: > > -.Fn config_detach "struct device *dev" "int flags" > +.Fn config_detach "struct device *dev" Argh! I had initially given config_deactivate() a flags parameter, realized it lacked one in the code, and m

Re: Another armv7 pmap diff

2016-08-07 Thread Marcus Glocker
On Sun, Aug 07, 2016 at 01:58:06PM +0200, Mark Kettenis wrote: > The ARMv7 ARM explicitly states that all data caches in the system are > effectively PIPT. This effectively means that there is no reason to > clean or invalidate data caches except when: > > 1. We need to synchronize the instructi

Re: man9/config_attach.9: incorporate config_deactivate information

2016-08-07 Thread Theo de Raadt
> +The > +.Fn config_deactivate > +function is called by the parent to change the child device's operational > state > +by calling the driver's activate function with a > +.Fa flags > +argument describing the targeted operational state: > +.Bd -literal > +#define DVACT_DEACTIVATE1

man9/config_attach.9: incorporate config_deactivate information

2016-08-07 Thread Ian Sutton
config_attach.9 seems to be the man page which best describes what struct cfattach members do. The following patch adds a section describing what the ca_activate function pointer within struct cfattach does via a description of the corresponding config_deactivate function as to follow config_attach

Re: RELRO: mwuauahhahaha

2016-08-07 Thread Philip Guenther
On Sun, 7 Aug 2016, Philip Guenther wrote: > On Sun, 7 Aug 2016, Mark Kettenis wrote: > ... > > Going to give this a go on hppa to see if I can spot any issues there. > > It works there just as well as before for me, with no new failures in my > "try lots of ld option combinations" test. Since i

Re: RELRO: static PIE support

2016-08-07 Thread Philip Guenther
On Sun, 7 Aug 2016, Philip Guenther wrote: > On Sun, Aug 7, 2016 at 4:45 AM, Mark Kettenis wrote: > >> Date: Sat, 6 Aug 2016 22:17:47 -0700 > >> From: Philip Guenther > >> > >> Parts of this were stolen from kettenis. > >> > >> Hey, wouldn't it be cool if static PIE executables took advantage of

Re: ksh, ctrl-r followed by arrow key leaves "[D" or "[C" artifacts

2016-08-07 Thread Ingo Schwarze
Hi Dave, redirecting from misc@ to tech@ because i'm appending a patch at the very end, lightly tested. This has indeed been annoying me for years, but it never occurred to me that i might be able to figure out what's going on. Thanks for providing your analysis, i think it's spot on. So the sol

move ufs_vinit() to ffs

2016-08-07 Thread Martin Natano
The ufs_vinit() function should really be called ffs_vinit(). The only place it is called from is ffs_vget(). And again, the FIFOOPS macro can be killed. Ok? natano Index: ufs/ffs/ffs_extern.h === RCS file: /cvs/src/sys/ufs/ffs/ffs

ext2fs_vinit() cleanup

2016-08-07 Thread Martin Natano
ext2fs has only one set of specops/fifoops, so no need to pass those to the function. This also allows to get rid of the EXT2FS_FIFOOPS define. Ok? natano Index: ufs/ext2fs/ext2fs_extern.h === RCS file: /cvs/src/sys/ufs/ext2fs/ext2

Re: Another armv7 pmap diff

2016-08-07 Thread Daniel Bolgheroni
On Sun, Aug 07, 2016 at 01:58:06PM +0200, Mark Kettenis wrote: > Further testing, especially on Cortex-A8, would be appreciated. Works for me. Tested on BeagleBone Black. Kernel compile times remains pretty much the same, though. -- db

non-cachable mappings on armv7

2016-08-07 Thread Mark Kettenis
Currently the armv7 pmap does something fairly retarded. When you ask for a non-cachable mapping of sorts, it first creates a cachable mapping, and then frobs the pte to make it uncachable. With the speculative tricks that modern ARM CPUs have up their sleeve, that is not such a good idea. The d

Re: RELRO: mwuauahhahaha

2016-08-07 Thread Philip Guenther
On Sun, 7 Aug 2016, Mark Kettenis wrote: ... > Going to give this a go on hppa to see if I can spot any issues there. It works there just as well as before for me, with no new failures in my "try lots of ld option combinations" test. Since it has an executable .plt, to make relro work will requ

Re: RELRO: static PIE support

2016-08-07 Thread Philip Guenther
On Sun, Aug 7, 2016 at 4:45 AM, Mark Kettenis wrote: >> Date: Sat, 6 Aug 2016 22:17:47 -0700 >> From: Philip Guenther >> >> Parts of this were stolen from kettenis. >> >> Hey, wouldn't it be cool if static PIE executables took advantage of the >> RELRO information too? > > Hmm. The PLT doesn't h

Re: C startup code: make crtbegin code safe for clang

2016-08-07 Thread Mark Kettenis
> Date: Sun, 7 Aug 2016 20:43:23 +0200 > From: Stefan Kempf > > Philip Guenther wrote: > > On Mon, Aug 1, 2016 at 11:45 AM, Mark Kettenis > > wrote: > > >> From: j...@wxcvbn.org (Jeremie Courreges-Anglas) > > >> Date: Mon, 01 Aug 2016 20:30:33 +0200 > > >> > > >> Stefan Kempf writes: > > >> >

Re: C startup code: make crtbegin code safe for clang

2016-08-07 Thread Stefan Kempf
Philip Guenther wrote: > On Mon, Aug 1, 2016 at 11:45 AM, Mark Kettenis > wrote: > >> From: j...@wxcvbn.org (Jeremie Courreges-Anglas) > >> Date: Mon, 01 Aug 2016 20:30:33 +0200 > >> > >> Stefan Kempf writes: > >> > >> > The constructor and destructor tables are declared as arrays with one > >>

Fix Wacom Intuos S 2 descriptor and make wsmouse work

2016-08-07 Thread Frank Groeneveld
I recently acquired a new Wacom drawing tablet: an Intuos Draw, which seems to be called an Intuos S 2 internally. I couldn't get this tablet to work in OpenBSD. One of the HID descriptors describes a mouse, so ums(4) attaches to it, but no data is ever registered. After digging around in the Linux

Re: RELRO: mwuauahhahaha

2016-08-07 Thread Mark Kettenis
> Date: Sat, 6 Aug 2016 22:10:08 -0700 > From: Philip Guenther > > Ahem. > > What I mean is that with some patching, RELRO can be enabled by default on > several archs. The first chunk below enables it on x86, arm, and sparc64. > I'm 95% positive that it would Just Work on alpha and sh (TEXT

imxesdhc(4) improvement for sdio on cubox-i

2016-08-07 Thread Mark Kettenis
Currently the dmesg on the cubox-i says something like: sdmmc0: can't enable card Turns out this is the SDIO slot and that the card doesn't respond because it hasn't been properly powered up yet. There is a special sequence involved (documented in the BCM4330 hardware documentation that's out

Re: armv7/omap: amdisplay(4)

2016-08-07 Thread Mark Kettenis
> Date: Sun, 7 Aug 2016 04:17:06 -0400 > From: Ian Sutton > > On Sat, Aug 06, 2016 at 11:34:09AM +0200, Mark Kettenis wrote: > > Note that on many platforms (including i.MX6) u-boot already sets up a > > framebuffer. So if we'd know framebuffer address and the layout of > > the framebuffer it wo

Another armv7 pmap diff

2016-08-07 Thread Mark Kettenis
The ARMv7 ARM explicitly states that all data caches in the system are effectively PIPT. This effectively means that there is no reason to clean or invalidate data caches except when: 1. We need to synchronize the instruction cache with the data cache. 2. We change a page to be non-cachable. 3.

Re: RELRO: static PIE support

2016-08-07 Thread Mark Kettenis
> Date: Sat, 6 Aug 2016 22:17:47 -0700 > From: Philip Guenther > > Parts of this were stolen from kettenis. > > Hey, wouldn't it be cool if static PIE executables took advantage of the > RELRO information too? Hmm. The PLT doesn't have to be executable for static PIE executables. So I think

Re: RELRO: don't depend on -znow

2016-08-07 Thread Mark Kettenis
> Date: Sat, 6 Aug 2016 20:34:07 -0700 > From: Philip Guenther > > We have kbind(2), so we can do RELRO process *ALWAYS*, and not just when > -znow is used to perform all relocations at load-time. > > So, teach ld to just test for -zrelro. > > ok? ok kettenis@ > Index: gnu/usr.bin/binutils-2

Re: ld -M: pay attention to constraints

2016-08-07 Thread Mark Kettenis
> Date: Sat, 6 Aug 2016 20:27:24 -0700 > From: Philip Guenther > > powerpc has two models of GOT+PLT placement: secure PLT (the new default) > and BSS PLT. ld handles the two possibilities in linker scripts by > including both locations in the script, but putting a constraint "SPECIAL" > on t

Re: armv7/omap: amdisplay(4)

2016-08-07 Thread Ian Sutton
On Sat, Aug 06, 2016 at 11:34:09AM +0200, Mark Kettenis wrote: > Note that on many platforms (including i.MX6) u-boot already sets up a > framebuffer. So if we'd know framebuffer address and the layout of > the framebuffer it would be trivial to attach a rasops-based > wsdisplay(4) to that. There