Re: [chrony-dev] Patches for s390/s390x and ppc64le support

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Wed, Mar 23, 2016 at 01:43:11AM -0600, Mark Post wrote:
> I ran into a few problems compiling chrony on architectures other than x86 and x86_64 when including syscall filtering.  The attached patches allowed the builds to complete for s390/s390x and ppc64le.  If there's a way to submit patches that is preferred over email, please let me know.

The preferred way to submit patches is to send git commits against
current HEAD as emails.

> --- chrony-2.3/sys_linux.c	2016-02-16 08:25:38.000000000 -0500
> +++ chrony-2.3/sys_linux.c	2016-03-18 14:37:37.860400626 -0400
> @@ -456,7 +456,9 @@
>    const int syscalls[] = {
>      /* Clock */
>      SCMP_SYS(adjtimex), SCMP_SYS(gettimeofday), SCMP_SYS(settimeofday),
> +#ifndef __s390x__
>      SCMP_SYS(time),
> +#endif

My understanding is that seccomp.h is supposed to define all syscalls,
even those that are not implemented on that particular architecture,
so I'd suggest to fix this in libseccomp. If libseccomp applications
had to track which syscall is where, it would be a mess.

> --- chrony-2.3/sys_linux.c	2016-02-16 08:25:38.000000000 -0500
> +++ chrony-2.3/sys_linux.c	2016-03-18 13:03:27.510166230 -0400
> @@ -33,6 +33,10 @@
>  
>  #include <sys/utsname.h>
>  
> +#if defined(__powerpc64__)
> +#  include <termios.h>
> +#endif

Is this needed always or just when the seccomp support is enabled? If
only with seccomp, it should be in the FEAT_SCFILTER #ifdef. Also, I'd
rather avoid adding any arch-specific code and include the header even
on archs where it's not needed. I'm wondering if that isn't a bug in
the libc headers.

-- 
Miroslav Lichvar

-- 
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/