public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/3] lib: Add personality fallback and SAFE macro
Date: Thu, 20 Jul 2017 17:01:44 +0200	[thread overview]
Message-ID: <20170720150144.GD11392@rei.lan> (raw)
In-Reply-To: <87y3rjp4c5.fsf@our.domain.is.not.set>

Hi!
> > +#include "config.h"
> > +
> > +#if defined(HAVE_SYS_PERSONALITY_H)
> > +#include <sys/personality.h>
> > +#elif defined(HAVE_LINUX_PERSONALITY_H)
> > +#include <linux/personality.h>
> > +#endif
> > +
> > +#ifndef HAVE_SYS_PERSONALITY_H
> > +#include "linux_syscall_numbers.h"
> > +
> > +static int personality(unsigned long persona)
> > +{
> > +	return tst_syscall(__NR_personality, persona);
> > +}
> > +#endif
> > +
> 
> Oops, linux_syscall_numbers.h is not available to the LTP library. I am
> wondering if we can just add it to the include path?

I was wondering the same. But we would have to tweek the build
system.

See include/mk/testcases.mk that makes every test depend on the header.

We also have special rule to make lib/ first if we start the build from
the top level Makefile.

And lastly but not least recenlty we started to run the regen.sh script
from the configure script to avoid races on parallel build.

If code in lib/ makes use of that header we have to make sure that the
header is create before we start building the lib.

And given that the header is not removed on make clean we may as well
remove all the dependencies from makefiles and depend on configure
script to create it. And possibly move the whole thing somewhere into
include/lapi/ so that we can drop one of the -I directives and maybe
rename the hader to something shorther, maybe lapi/syscalls.h or
something.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2017-07-20 15:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-19  9:08 [LTP] [PATCH v2 1/3] lib: Add personality fallback and SAFE macro Richard Palethorpe
2017-07-19  9:08 ` [LTP] [PATCH v2 2/3] CVE-2012-0957: Use SAFE_PERSONALITY Richard Palethorpe
2017-07-19  9:08 ` [LTP] [PATCH v2 3/3] Test for CVE-2016-10044 mark AIO pseudo-fs noexec Richard Palethorpe
2017-07-20 14:31 ` [LTP] [PATCH v2 1/3] lib: Add personality fallback and SAFE macro Richard Palethorpe
2017-07-20 15:01   ` Cyril Hrubis [this message]
     [not found] <20170724153846.18840-1-rpalethorpe@suse.com>
2017-07-24 15:38 ` [LTP] [RFC PATCH 2/3] Rename linux_syscall_numbers.h to lapi/syscalls.h Richard Palethorpe
2017-07-27 11:04   ` Cyril Hrubis
2017-07-27 11:50     ` Richard Palethorpe
2017-07-24 15:38 ` [LTP] [RFC PATCH 3/3] Remove linux_syscall_numbers.h Makefile Richard Palethorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170720150144.GD11392@rei.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox