Re: svn commit: r330297 - in head: lib/libc/sys sys/compat/freebsd32 sys/i386/ibcs2 sys/kern sys/sys

2018-03-02 Thread Cy Schubert
In message <20180302233343.gc83...@spindle.one-eyed-alien.net>, Brooks 
Davis wr
ites:
> 
>
> --ALfTUftag+2gvp1h
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
>
> On Fri, Mar 02, 2018 at 03:31:36PM -0800, Cy Schubert wrote:
> > In message <201803022325.w22npyiw050...@slippy.cwsent.com>, Cy Schubert=
> =20
> > writes:
> > > In message <20180302223138.ga83...@spindle.one-eyed-alien.net>, Brooks=
> =20
> > > Davis wr
> > > ites:
> > > >=20
> > > > --yrj/dFKFPuw6o+aM
> > > > Content-Type: text/plain; charset=3Dus-ascii
> > > > Content-Disposition: inline
> > > > Content-Transfer-Encoding: quoted-printable
> > > >
> > > > On Fri, Mar 02, 2018 at 10:10:49PM +, Brooks Davis wrote:
> > > > > Author: brooks
> > > > > Date: Fri Mar  2 22:10:48 2018
> > > > > New Revision: 330297
> > > > > URL: https://svnweb.freebsd.org/changeset/base/330297
> > > > >=3D20
> > > > > Log:
> > > > >   Rename kernel-only members of semid_ds and msgid_ds.
> > > > >  =3D20
> > > > >   This deliberately breaks the API in preperation for future syscall
> > > > >   revisions which will remove these nonstandard members.
> > > > >  =3D20
> > > > >   In an exp-run a single port (devel/qemu-user-static) was found to
> > > > >   use them which it did becuase it emulates system calls.  This has
> > > > >   been fixed in the ports tree.
> > > > >  =3D20
> > > > >   PR: 224443 (exp-run)
> > > > >   Reviewed by:kib, jhb (previous version)
> > > > >   Exp-run by: antoine
> > > > >   Sponsored by:   DARPA, AFRP
> > > > >   Differential Revision:  https://reviews.freebsd.org/D14490
> > > >
> > > > FYI, a __FreeBSD_version bump is coming along with a third commit.
> > >
> > > Hi Brooks,
> > >
> > > This causes ipcrm build to fail:
> > >
> > > /opt/src/svn-current/usr.bin/ipcrm/ipcrm.c:156:14: error: variable has=
> =20
> > > incomplete type 'union semun'
> > > union semun arg;
> > > ^
> > > /opt/src/svn-current/usr.bin/ipcrm/ipcrm.c:156:8: note: forward=20
> > > declaration of 'union semun'
> > > union semun arg;
> > >   ^
> > >
> > >
> > > Index: usr.bin/ipcrm/ipcrm.c
> > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > > --- usr.bin/ipcrm/ipcrm.c (revision 330299)
> > > +++ usr.bin/ipcrm/ipcrm.c (working copy)
> > > @@ -39,6 +39,7 @@
> > >  #define  _WANT_SYSVMSG_INTERNALS
> > >  #include 
> > >  #define  _WANT_SYSVSEM_INTERNALS
> > > +#define _WANT_SEMUN
> > >  #include 
> > >  #define  _WANT_SYSVSHM_INTERNALS
> > >  #include 
> > >
> > > And:
> > >
> > > /opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c:444:14:=20
> > > error: variable has incomplete type 'union semun'
> > > union semun sun;
> > > ^
> > > /opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c:444:8: note:=
> =20
> > > forward declaration of 'union semun'
> > > union semun sun;
> > >   ^
> > >
> > > Index: /opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c
> > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > > --- /opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c (revisi
> on=
> =20
> > > 330299)
> > > +++ /opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c (workin
> g=
> =20
> > > copy)
> > > @@ -49,6 +49,7 @@
> > >  #include 
> > >  #include 
> > >  #include 
> > > +#define _WANT_SEMUN
> > >  #include 
> > >  #include 
> > >  #include 
> > >
> > >
> > > I'm not sure if there are more.
> >=20
> > Sorry, this should be reported against r330299.
>
> Thanks for the reports.  Sorry about that.  Doing another buildworld
> to check for more.

Thanks for the prompt fixes.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX:     Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r330297 - in head: lib/libc/sys sys/compat/freebsd32 sys/i386/ibcs2 sys/kern sys/sys

2018-03-02 Thread Brooks Davis
On Fri, Mar 02, 2018 at 03:31:36PM -0800, Cy Schubert wrote:
> In message <201803022325.w22npyiw050...@slippy.cwsent.com>, Cy Schubert 
> writes:
> > In message <20180302223138.ga83...@spindle.one-eyed-alien.net>, Brooks 
> > Davis wr
> > ites:
> > > 
> > > --yrj/dFKFPuw6o+aM
> > > Content-Type: text/plain; charset=us-ascii
> > > Content-Disposition: inline
> > > Content-Transfer-Encoding: quoted-printable
> > >
> > > On Fri, Mar 02, 2018 at 10:10:49PM +, Brooks Davis wrote:
> > > > Author: brooks
> > > > Date: Fri Mar  2 22:10:48 2018
> > > > New Revision: 330297
> > > > URL: https://svnweb.freebsd.org/changeset/base/330297
> > > >=20
> > > > Log:
> > > >   Rename kernel-only members of semid_ds and msgid_ds.
> > > >  =20
> > > >   This deliberately breaks the API in preperation for future syscall
> > > >   revisions which will remove these nonstandard members.
> > > >  =20
> > > >   In an exp-run a single port (devel/qemu-user-static) was found to
> > > >   use them which it did becuase it emulates system calls.  This has
> > > >   been fixed in the ports tree.
> > > >  =20
> > > >   PR:   224443 (exp-run)
> > > >   Reviewed by:  kib, jhb (previous version)
> > > >   Exp-run by:   antoine
> > > >   Sponsored by: DARPA, AFRP
> > > >   Differential Revision:https://reviews.freebsd.org/D14490
> > >
> > > FYI, a __FreeBSD_version bump is coming along with a third commit.
> >
> > Hi Brooks,
> >
> > This causes ipcrm build to fail:
> >
> > /opt/src/svn-current/usr.bin/ipcrm/ipcrm.c:156:14: error: variable has 
> > incomplete type 'union semun'
> > union semun arg;
> > ^
> > /opt/src/svn-current/usr.bin/ipcrm/ipcrm.c:156:8: note: forward 
> > declaration of 'union semun'
> > union semun arg;
> >   ^
> >
> >
> > Index: usr.bin/ipcrm/ipcrm.c
> > ===
> > --- usr.bin/ipcrm/ipcrm.c   (revision 330299)
> > +++ usr.bin/ipcrm/ipcrm.c   (working copy)
> > @@ -39,6 +39,7 @@
> >  #define_WANT_SYSVMSG_INTERNALS
> >  #include 
> >  #define_WANT_SYSVSEM_INTERNALS
> > +#define _WANT_SEMUN
> >  #include 
> >  #define_WANT_SYSVSHM_INTERNALS
> >  #include 
> >
> > And:
> >
> > /opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c:444:14: 
> > error: variable has incomplete type 'union semun'
> > union semun sun;
> > ^
> > /opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c:444:8: note: 
> > forward declaration of 'union semun'
> > union semun sun;
> >   ^
> >
> > Index: /opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c
> > ===
> > --- /opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c   
> > (revision 
> > 330299)
> > +++ /opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c   
> > (working 
> > copy)
> > @@ -49,6 +49,7 @@
> >  #include 
> >  #include 
> >  #include 
> > +#define _WANT_SEMUN
> >  #include 
> >  #include 
> >  #include 
> >
> >
> > I'm not sure if there are more.
> 
> Sorry, this should be reported against r330299.

Thanks for the reports.  Sorry about that.  Doing another buildworld
to check for more.

-- Brooks


signature.asc
Description: PGP signature


Re: svn commit: r330297 - in head: lib/libc/sys sys/compat/freebsd32 sys/i386/ibcs2 sys/kern sys/sys

2018-03-02 Thread Cy Schubert
In message <201803022325.w22npyiw050...@slippy.cwsent.com>, Cy Schubert 
writes:
> In message <20180302223138.ga83...@spindle.one-eyed-alien.net>, Brooks 
> Davis wr
> ites:
> > 
> > --yrj/dFKFPuw6o+aM
> > Content-Type: text/plain; charset=us-ascii
> > Content-Disposition: inline
> > Content-Transfer-Encoding: quoted-printable
> >
> > On Fri, Mar 02, 2018 at 10:10:49PM +, Brooks Davis wrote:
> > > Author: brooks
> > > Date: Fri Mar  2 22:10:48 2018
> > > New Revision: 330297
> > > URL: https://svnweb.freebsd.org/changeset/base/330297
> > >=20
> > > Log:
> > >   Rename kernel-only members of semid_ds and msgid_ds.
> > >  =20
> > >   This deliberately breaks the API in preperation for future syscall
> > >   revisions which will remove these nonstandard members.
> > >  =20
> > >   In an exp-run a single port (devel/qemu-user-static) was found to
> > >   use them which it did becuase it emulates system calls.  This has
> > >   been fixed in the ports tree.
> > >  =20
> > >   PR: 224443 (exp-run)
> > >   Reviewed by:kib, jhb (previous version)
> > >   Exp-run by: antoine
> > >   Sponsored by:   DARPA, AFRP
> > >   Differential Revision:  https://reviews.freebsd.org/D14490
> >
> > FYI, a __FreeBSD_version bump is coming along with a third commit.
>
> Hi Brooks,
>
> This causes ipcrm build to fail:
>
> /opt/src/svn-current/usr.bin/ipcrm/ipcrm.c:156:14: error: variable has 
> incomplete type 'union semun'
> union semun arg;
> ^
> /opt/src/svn-current/usr.bin/ipcrm/ipcrm.c:156:8: note: forward 
> declaration of 'union semun'
> union semun arg;
>   ^
>
>
> Index: usr.bin/ipcrm/ipcrm.c
> ===
> --- usr.bin/ipcrm/ipcrm.c (revision 330299)
> +++ usr.bin/ipcrm/ipcrm.c (working copy)
> @@ -39,6 +39,7 @@
>  #define  _WANT_SYSVMSG_INTERNALS
>  #include 
>  #define  _WANT_SYSVSEM_INTERNALS
> +#define _WANT_SEMUN
>  #include 
>  #define  _WANT_SYSVSHM_INTERNALS
>  #include 
>
> And:
>
> /opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c:444:14: 
> error: variable has incomplete type 'union semun'
> union semun sun;
> ^
> /opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c:444:8: note: 
> forward declaration of 'union semun'
> union semun sun;
>   ^
>
> Index: /opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c
> ===
> --- /opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c (revision 
> 330299)
> +++ /opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c (working 
> copy)
> @@ -49,6 +49,7 @@
>  #include 
>  #include 
>  #include 
> +#define _WANT_SEMUN
>  #include 
>  #include 
>  #include 
>
>
> I'm not sure if there are more.

Sorry, this should be reported against r330299.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX:     Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r330297 - in head: lib/libc/sys sys/compat/freebsd32 sys/i386/ibcs2 sys/kern sys/sys

2018-03-02 Thread Cy Schubert
In message <20180302223138.ga83...@spindle.one-eyed-alien.net>, Brooks 
Davis wr
ites:
> 
> --yrj/dFKFPuw6o+aM
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
>
> On Fri, Mar 02, 2018 at 10:10:49PM +, Brooks Davis wrote:
> > Author: brooks
> > Date: Fri Mar  2 22:10:48 2018
> > New Revision: 330297
> > URL: https://svnweb.freebsd.org/changeset/base/330297
> >=20
> > Log:
> >   Rename kernel-only members of semid_ds and msgid_ds.
> >  =20
> >   This deliberately breaks the API in preperation for future syscall
> >   revisions which will remove these nonstandard members.
> >  =20
> >   In an exp-run a single port (devel/qemu-user-static) was found to
> >   use them which it did becuase it emulates system calls.  This has
> >   been fixed in the ports tree.
> >  =20
> >   PR:   224443 (exp-run)
> >   Reviewed by:  kib, jhb (previous version)
> >   Exp-run by:   antoine
> >   Sponsored by: DARPA, AFRP
> >   Differential Revision:https://reviews.freebsd.org/D14490
>
> FYI, a __FreeBSD_version bump is coming along with a third commit.

Hi Brooks,

This causes ipcrm build to fail:

/opt/src/svn-current/usr.bin/ipcrm/ipcrm.c:156:14: error: variable has 
incomplete type 'union semun'
union semun arg;
^
/opt/src/svn-current/usr.bin/ipcrm/ipcrm.c:156:8: note: forward 
declaration of 'union semun'
union semun arg;
  ^


Index: usr.bin/ipcrm/ipcrm.c
===
--- usr.bin/ipcrm/ipcrm.c   (revision 330299)
+++ usr.bin/ipcrm/ipcrm.c   (working copy)
@@ -39,6 +39,7 @@
 #define_WANT_SYSVMSG_INTERNALS
 #include 
 #define_WANT_SYSVSEM_INTERNALS
+#define _WANT_SEMUN
 #include 
 #define_WANT_SYSVSHM_INTERNALS
 #include 

And:

/opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c:444:14: 
error: variable has incomplete type 'union semun'
union semun sun;
^
/opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c:444:8: note: 
forward declaration of 'union semun'
union semun sun;
  ^

Index: /opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c
===
--- /opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c   (revision 
330299)
+++ /opt/src/svn-current/contrib/netbsd-tests/kernel/t_sysv.c   (working 
copy)
@@ -49,6 +49,7 @@
 #include 
 #include 
 #include 
+#define _WANT_SEMUN
 #include 
 #include 
 #include 


I'm not sure if there are more.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX:     Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r330297 - in head: lib/libc/sys sys/compat/freebsd32 sys/i386/ibcs2 sys/kern sys/sys

2018-03-02 Thread Brooks Davis
On Fri, Mar 02, 2018 at 10:10:49PM +, Brooks Davis wrote:
> Author: brooks
> Date: Fri Mar  2 22:10:48 2018
> New Revision: 330297
> URL: https://svnweb.freebsd.org/changeset/base/330297
> 
> Log:
>   Rename kernel-only members of semid_ds and msgid_ds.
>   
>   This deliberately breaks the API in preperation for future syscall
>   revisions which will remove these nonstandard members.
>   
>   In an exp-run a single port (devel/qemu-user-static) was found to
>   use them which it did becuase it emulates system calls.  This has
>   been fixed in the ports tree.
>   
>   PR: 224443 (exp-run)
>   Reviewed by:kib, jhb (previous version)
>   Exp-run by: antoine
>   Sponsored by:   DARPA, AFRP
>   Differential Revision:  https://reviews.freebsd.org/D14490

FYI, a __FreeBSD_version bump is coming along with a third commit.

-- Brooks


signature.asc
Description: PGP signature


svn commit: r330297 - in head: lib/libc/sys sys/compat/freebsd32 sys/i386/ibcs2 sys/kern sys/sys

2018-03-02 Thread Brooks Davis
Author: brooks
Date: Fri Mar  2 22:10:48 2018
New Revision: 330297
URL: https://svnweb.freebsd.org/changeset/base/330297

Log:
  Rename kernel-only members of semid_ds and msgid_ds.
  
  This deliberately breaks the API in preperation for future syscall
  revisions which will remove these nonstandard members.
  
  In an exp-run a single port (devel/qemu-user-static) was found to
  use them which it did becuase it emulates system calls.  This has
  been fixed in the ports tree.
  
  PR:   224443 (exp-run)
  Reviewed by:  kib, jhb (previous version)
  Exp-run by:   antoine
  Sponsored by: DARPA, AFRP
  Differential Revision:https://reviews.freebsd.org/D14490

Modified:
  head/lib/libc/sys/msgctl.2
  head/lib/libc/sys/semctl.2
  head/sys/compat/freebsd32/freebsd32_ipc.h
  head/sys/i386/ibcs2/ibcs2_ipc.c
  head/sys/kern/sysv_msg.c
  head/sys/kern/sysv_sem.c
  head/sys/sys/msg.h
  head/sys/sys/sem.h

Modified: head/lib/libc/sys/msgctl.2
==
--- head/lib/libc/sys/msgctl.2  Fri Mar  2 21:50:02 2018(r330296)
+++ head/lib/libc/sys/msgctl.2  Fri Mar  2 22:10:48 2018(r330297)
@@ -63,8 +63,8 @@ and contains (amongst others) the following members:
 .Bd -literal
 struct msqid_ds {
struct  ipc_perm msg_perm;  /* msg queue permission bits */
-   struct  msg *msg_first; /* first message in the queue */
-   struct  msg *msg_last;  /* last message in the queue */
+   struct  msg *__msg_first;   /* kernel data, don't use */
+   struct  msg *__msg_last;/* kernel data, don't use */
msglen_t msg_cbytes;/* number of bytes in use on the queue */
msgqnum_t msg_qnum; /* number of msgs in the queue */
msglen_t msg_qbytes;/* max # of bytes on the queue */

Modified: head/lib/libc/sys/semctl.2
==
--- head/lib/libc/sys/semctl.2  Fri Mar  2 21:50:02 2018(r330296)
+++ head/lib/libc/sys/semctl.2  Fri Mar  2 22:10:48 2018(r330297)
@@ -145,7 +145,7 @@ is defined as follows:
 .Bd -literal
 struct semid_ds {
 struct  ipc_perm sem_perm;  /* operation permission struct */
-struct  sem *sem_base;  /* pointer to first semaphore in set */
+struct  sem *__sem_base;  /* kernel data, don't use */
 u_short sem_nsems;  /* number of sems in set */
 time_t  sem_otime;  /* last operation time */
 time_t  sem_ctime;  /* last change time */

Modified: head/sys/compat/freebsd32/freebsd32_ipc.h
==
--- head/sys/compat/freebsd32/freebsd32_ipc.h   Fri Mar  2 21:50:02 2018
(r330296)
+++ head/sys/compat/freebsd32/freebsd32_ipc.h   Fri Mar  2 22:10:48 2018
(r330297)
@@ -43,7 +43,7 @@ struct ipc_perm32 {
 
 struct semid_ds32 {
struct ipc_perm32 sem_perm;
-   uint32_tsem_base;
+   uint32_t__sem_base;
unsigned short  sem_nsems;
int32_t sem_otime;
int32_t sem_ctime;
@@ -69,8 +69,8 @@ union semun32 {
 
 struct msqid_ds32 {
struct ipc_perm32 msg_perm;
-   uint32_tmsg_first;
-   uint32_tmsg_last;
+   uint32_t__msg_first;
+   uint32_t__msg_last;
uint32_tmsg_cbytes;
uint32_tmsg_qnum;
uint32_tmsg_qbytes;
@@ -143,7 +143,7 @@ struct ipc_perm32_old {
 
 struct semid_ds32_old {
struct ipc_perm32_old sem_perm;
-   uint32_tsem_base;
+   uint32_t__sem_base;
unsigned short  sem_nsems;
int32_t sem_otime;
int32_t sem_pad1;
@@ -154,8 +154,8 @@ struct semid_ds32_old {
 
 struct msqid_ds32_old {
struct ipc_perm32_old msg_perm;
-   uint32_tmsg_first;
-   uint32_tmsg_last;
+   uint32_t__msg_first;
+   uint32_t__msg_last;
uint32_tmsg_cbytes;
uint32_tmsg_qnum;
uint32_tmsg_qbytes;

Modified: head/sys/i386/ibcs2/ibcs2_ipc.c
==
--- head/sys/i386/ibcs2/ibcs2_ipc.c Fri Mar  2 21:50:02 2018
(r330296)
+++ head/sys/i386/ibcs2/ibcs2_ipc.c Fri Mar  2 22:10:48 2018
(r330297)
@@ -73,9 +73,8 @@ cvt_msqid2imsqid(bp, ibp)
 struct msqid_ds *bp;
 struct ibcs2_msqid_ds *ibp;
 {
+   memset(ibp, 0, sizeof(*ibp));
cvt_perm2iperm(>msg_perm, >msg_perm);
-   ibp->msg_first = bp->msg_first;
-   ibp->msg_last = bp->msg_last;
ibp->msg_cbytes = (u_short)bp->msg_cbytes;
ibp->msg_qnum = (u_short)bp->msg_qnum;
ibp->msg_qbytes = (u_short)bp->msg_qbytes;
@@ -93,8 +92,6 @@ struct ibcs2_msqid_ds *ibp;
 struct msqid_ds *bp;
 {
cvt_iperm2perm(>msg_perm, >msg_perm);
-   bp->msg_first = ibp->msg_first;
-