Re: svn commit: r304555 - head/sys/compat/cloudabi

2016-08-22 Thread Konstantin Belousov
On Mon, Aug 22, 2016 at 06:55:58PM +1000, Bruce Evans wrote: > No. PSL_AC is ignored in kernel mode. Not quite. On recent processors there is a feature called SMAP. If enabled, user mode pages accesses from kernel mode require eflags.ac set to 1. If EFLAGS.AC == 0, usermode access causes #PF

Re: svn commit: r304555 - head/sys/compat/cloudabi

2016-08-22 Thread Slawa Olhovchenkov
On Mon, Aug 22, 2016 at 06:55:58PM +1000, Bruce Evans wrote: > On Sun, 21 Aug 2016, Slawa Olhovchenkov wrote: > > > On Mon, Aug 22, 2016 at 02:49:07AM +1000, Bruce Evans wrote: > > > >> On Sun, 21 Aug 2016, Slawa Olhovchenkov wrote: > >> > >>> On Sun, Aug 21, 2016 at 11:39:02PM +1000, Bruce

Re: svn commit: r304555 - head/sys/compat/cloudabi

2016-08-22 Thread Bruce Evans
On Sun, 21 Aug 2016, Slawa Olhovchenkov wrote: On Mon, Aug 22, 2016 at 02:49:07AM +1000, Bruce Evans wrote: On Sun, 21 Aug 2016, Slawa Olhovchenkov wrote: On Sun, Aug 21, 2016 at 11:39:02PM +1000, Bruce Evans wrote: On Sun, 21 Aug 2016, Slawa Olhovchenkov wrote: I am remeber about

Re: svn commit: r304555 - head/sys/compat/cloudabi

2016-08-21 Thread Slawa Olhovchenkov
On Mon, Aug 22, 2016 at 02:49:07AM +1000, Bruce Evans wrote: > On Sun, 21 Aug 2016, Slawa Olhovchenkov wrote: > > > On Sun, Aug 21, 2016 at 11:39:02PM +1000, Bruce Evans wrote: > > > >> On Sun, 21 Aug 2016, Slawa Olhovchenkov wrote: > >>> I am remeber about platforms with missaligment trap when

Re: svn commit: r304555 - head/sys/compat/cloudabi

2016-08-21 Thread Bruce Evans
On Sun, 21 Aug 2016, Slawa Olhovchenkov wrote: On Sun, Aug 21, 2016 at 11:39:02PM +1000, Bruce Evans wrote: On Sun, 21 Aug 2016, Slawa Olhovchenkov wrote: I am remeber about platforms with missaligment trap when accessing int16 by odd address. Now platforms like this do not exist anymore?

Re: svn commit: r304555 - head/sys/compat/cloudabi

2016-08-21 Thread Slawa Olhovchenkov
On Sun, Aug 21, 2016 at 11:39:02PM +1000, Bruce Evans wrote: > On Sun, 21 Aug 2016, Slawa Olhovchenkov wrote: > > > On Sun, Aug 21, 2016 at 11:00:24PM +1000, Bruce Evans wrote: > > > >> On Sun, 21 Aug 2016, Slawa Olhovchenkov wrote: > >> > >>> On Sun, Aug 21, 2016 at 09:32:35PM +1000, Bruce

Re: svn commit: r304555 - head/sys/compat/cloudabi

2016-08-21 Thread Bruce Evans
On Sun, 21 Aug 2016, Slawa Olhovchenkov wrote: On Sun, Aug 21, 2016 at 11:00:24PM +1000, Bruce Evans wrote: On Sun, 21 Aug 2016, Slawa Olhovchenkov wrote: On Sun, Aug 21, 2016 at 09:32:35PM +1000, Bruce Evans wrote: ... *(foo_t *)asks for alignment bugs. We have already fixed lots of

Re: svn commit: r304555 - head/sys/compat/cloudabi

2016-08-21 Thread Bruce Evans
On Sun, 21 Aug 2016, Slawa Olhovchenkov wrote: On Sun, Aug 21, 2016 at 09:32:35PM +1000, Bruce Evans wrote: ... *(foo_t *)asks for alignment bugs. We have already fixed lots of these bugs for copying struct timevals in places like ping.c. Compilers warn about misalignment when certain

Re: svn commit: r304555 - head/sys/compat/cloudabi

2016-08-21 Thread Slawa Olhovchenkov
On Sun, Aug 21, 2016 at 11:00:24PM +1000, Bruce Evans wrote: > On Sun, 21 Aug 2016, Slawa Olhovchenkov wrote: > > > On Sun, Aug 21, 2016 at 09:32:35PM +1000, Bruce Evans wrote: > >... > >> *(foo_t *)asks for alignment bugs. We have already fixed lots of these > >> bugs for copying struct

Re: svn commit: r304555 - head/sys/compat/cloudabi

2016-08-21 Thread Slawa Olhovchenkov
On Sun, Aug 21, 2016 at 09:32:35PM +1000, Bruce Evans wrote: > On Sun, 21 Aug 2016, Slawa Olhovchenkov wrote: > > > On Sun, Aug 21, 2016 at 07:41:11AM +, Ed Schouten wrote: > >> ... > >> Log: > >> Use memcpy() to copy 64-bit timestamps into the syscall return values. > >> > >> On 32-bit

Re: svn commit: r304555 - head/sys/compat/cloudabi

2016-08-21 Thread Bruce Evans
On Sun, 21 Aug 2016, Slawa Olhovchenkov wrote: On Sun, Aug 21, 2016 at 07:41:11AM +, Ed Schouten wrote: ... Log: Use memcpy() to copy 64-bit timestamps into the syscall return values. On 32-bit platforms, our 64-bit timestamps need to be split up across two registers. A simple

Re: svn commit: r304555 - head/sys/compat/cloudabi

2016-08-21 Thread Slawa Olhovchenkov
On Sun, Aug 21, 2016 at 07:41:11AM +, Ed Schouten wrote: > Author: ed > Date: Sun Aug 21 07:41:11 2016 > New Revision: 304555 > URL: https://svnweb.freebsd.org/changeset/base/304555 > > Log: > Use memcpy() to copy 64-bit timestamps into the syscall return values. > > On 32-bit

svn commit: r304555 - head/sys/compat/cloudabi

2016-08-21 Thread Ed Schouten
Author: ed Date: Sun Aug 21 07:41:11 2016 New Revision: 304555 URL: https://svnweb.freebsd.org/changeset/base/304555 Log: Use memcpy() to copy 64-bit timestamps into the syscall return values. On 32-bit platforms, our 64-bit timestamps need to be split up across two registers. A simple