Re: [OE-core] [PATCH v2 1/1] ltp: Update to 20190115

2019-02-25 Thread Petr Vorel
Hi Richard, Khem,

> > security_flags.inc:SECURITY_STRINGFORMAT ?= "-Wformat -Wformat-security 
> > -Werror=format-security"
> > security_flags.inc:SECURITY_CFLAGS ?= "${SECURITY_STACK_PROTECTOR} 
> > ${SECURITY_PIE_CFLAGS} ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}"

> > so the reproducer should be to add "-Wformat -Wformat-security
> > -Werror=format-security" to CFLAGS when building ltp.


> I think this must be new, we are carrying patches to fix similar
> issues in other parts of ltp. Probably something to consider for
> upstreaming
> e.g.
> https://git.openembedded.org/openembedded-core/tree/meta/recipes-extended/ltp/ltp/0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch

I was testing it, but this one was ok. Found problems with setregid01.c,
to realize that it was already posted to LTP mailing list, so pushed it.

Kind regards,
Petr
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 1/1] ltp: Update to 20190115

2019-02-23 Thread Khem Raj
On Sat, Feb 23, 2019 at 8:12 AM Richard Purdie
 wrote:
>
> On Wed, 2019-01-16 at 16:28 +0100, Petr Vorel wrote:
> > Hi Richard, Khem,
> >
> > > > Thanks for looking at this. Unfortunately it failed in testing on
> > > > most
> > > > targets:
> > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/46/builds/181/steps/7/logs/step1b
> > > > (one failure given as an example).
> > > > Warnings as errors are good during development but sometimes less
> > > > useful during release due to the variety of end user
> > > > configurations.
> > > with glibc 2.29 in play
> > > http://errors.yoctoproject.org/Errors/Details/216829/
> >
> > Thanks for your reports.
> > Is there any way I could easily reproduce it?
> > Some config I can download?
> > I'm testing with default config.
> > I'm sorry for dummy question, I'm more experienced with Buildroot.
>
> Sorry for not replying sooner. We just hit this issue again:
>
> http://errors.yoctoproject.org/Errors/Latest/?filter=480efd388db578106a8a2129c0382b7e56a1ee36=commit=150
>
> This time I think I understand where the error is coming from though:
>
> http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/conf/distro/include/security_flags.inc
>
> does:
>
> security_flags.inc:SECURITY_STRINGFORMAT ?= "-Wformat -Wformat-security 
> -Werror=format-security"
> security_flags.inc:SECURITY_CFLAGS ?= "${SECURITY_STACK_PROTECTOR} 
> ${SECURITY_PIE_CFLAGS} ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}"
>
> so the reproducer should be to add "-Wformat -Wformat-security
> -Werror=format-security" to CFLAGS when building ltp.
>

I think this must be new, we are carrying patches to fix similar
issues in other parts of ltp. Probably something to consider for
upstreaming
e.g.
https://git.openembedded.org/openembedded-core/tree/meta/recipes-extended/ltp/ltp/0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch

> Cheers,
>
> Richard
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 1/1] ltp: Update to 20190115

2019-02-23 Thread Richard Purdie
On Wed, 2019-01-16 at 16:28 +0100, Petr Vorel wrote:
> Hi Richard, Khem,
> 
> > > Thanks for looking at this. Unfortunately it failed in testing on
> > > most
> > > targets:
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/46/builds/181/steps/7/logs/step1b
> > > (one failure given as an example).
> > > Warnings as errors are good during development but sometimes less
> > > useful during release due to the variety of end user
> > > configurations.
> > with glibc 2.29 in play
> > http://errors.yoctoproject.org/Errors/Details/216829/
> 
> Thanks for your reports.
> Is there any way I could easily reproduce it?
> Some config I can download?
> I'm testing with default config.
> I'm sorry for dummy question, I'm more experienced with Buildroot.

Sorry for not replying sooner. We just hit this issue again:

http://errors.yoctoproject.org/Errors/Latest/?filter=480efd388db578106a8a2129c0382b7e56a1ee36=commit=150

This time I think I understand where the error is coming from though:

http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/conf/distro/include/security_flags.inc

does:

security_flags.inc:SECURITY_STRINGFORMAT ?= "-Wformat -Wformat-security 
-Werror=format-security"
security_flags.inc:SECURITY_CFLAGS ?= "${SECURITY_STACK_PROTECTOR} 
${SECURITY_PIE_CFLAGS} ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}"

so the reproducer should be to add "-Wformat -Wformat-security
-Werror=format-security" to CFLAGS when building ltp.

Cheers,

Richard

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 1/1] ltp: Update to 20190115

2019-01-16 Thread Petr Vorel
Hi Richard, Khem,

> > Thanks for looking at this. Unfortunately it failed in testing on most
> > targets:

> > https://autobuilder.yoctoproject.org/typhoon/#/builders/46/builds/181/steps/7/logs/step1b

> > (one failure given as an example).

> > Warnings as errors are good during development but sometimes less
> > useful during release due to the variety of end user configurations.

> with glibc 2.29 in play
> http://errors.yoctoproject.org/Errors/Details/216829/

Thanks for your reports.
Is there any way I could easily reproduce it?
Some config I can download?
I'm testing with default config.
I'm sorry for dummy question, I'm more experienced with Buildroot.

Kind regards,
Petr
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 1/1] ltp: Update to 20190115

2019-01-16 Thread Khem Raj
On Wed, Jan 16, 2019 at 3:05 AM Richard Purdie
 wrote:
>
> On Wed, 2019-01-16 at 00:06 +0100, Petr Vorel wrote:
> > Updated patches
> > * 0004-build-Add-option-to-select-libc-implementation.patch
> > * 0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
> > * 0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch
> >
> > Removed patches (accepted in upstream)
> > * 0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch
> > * 0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch
> > * 0001-setrlimit05-Use-another-method-to-get-bad-address.patch
> > * 0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch
> > * 0001-statx-fix-compile-errors.patch
> > * 0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch
> > (accepted v2 version, see
> > http://lists.linux.it/pipermail/ltp/2018-October/009691.html)
> >
> > Signed-off-by: Petr Vorel 
> > ---
> > Changes v1->v2:
> > * Update SRCREV (previous version used old version)
> > * Refresh patches
>
> Thanks for looking at this. Unfortunately it failed in testing on most
> targets:
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/46/builds/181/steps/7/logs/step1b
>
> (one failure given as an example).
>
> Warnings as errors are good during development but sometimes less
> useful during release due to the variety of end user configurations.
>
with glibc 2.29 in play
http://errors.yoctoproject.org/Errors/Details/216829/


> Cheers,
>
> Richard
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 1/1] ltp: Update to 20190115

2019-01-16 Thread Richard Purdie
On Wed, 2019-01-16 at 00:06 +0100, Petr Vorel wrote:
> Updated patches
> * 0004-build-Add-option-to-select-libc-implementation.patch
> * 0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
> * 0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch
> 
> Removed patches (accepted in upstream)
> * 0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch
> * 0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch
> * 0001-setrlimit05-Use-another-method-to-get-bad-address.patch
> * 0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch
> * 0001-statx-fix-compile-errors.patch
> * 0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch
> (accepted v2 version, see 
> http://lists.linux.it/pipermail/ltp/2018-October/009691.html)
> 
> Signed-off-by: Petr Vorel 
> ---
> Changes v1->v2:
> * Update SRCREV (previous version used old version)
> * Refresh patches

Thanks for looking at this. Unfortunately it failed in testing on most
targets:

https://autobuilder.yoctoproject.org/typhoon/#/builders/46/builds/181/steps/7/logs/step1b

(one failure given as an example).

Warnings as errors are good during development but sometimes less
useful during release due to the variety of end user configurations.

Cheers,

Richard

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2 1/1] ltp: Update to 20190115

2019-01-15 Thread Petr Vorel
Updated patches
* 0004-build-Add-option-to-select-libc-implementation.patch
* 0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
* 0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch

Removed patches (accepted in upstream)
* 0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch
* 0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch
* 0001-setrlimit05-Use-another-method-to-get-bad-address.patch
* 0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch
* 0001-statx-fix-compile-errors.patch
* 0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch
(accepted v2 version, see 
http://lists.linux.it/pipermail/ltp/2018-October/009691.html)

Signed-off-by: Petr Vorel 
---
Changes v1->v2:
* Update SRCREV (previous version used old version)
* Refresh patches
---
 ...getcpu-to-avoid-conflict-with-glibc-.patch |  57 --
 ...use-ping-6-when-ping6-is-not-avaliab.patch |  45 -
 ...suite-mmap24-2-Relax-condition-a-bit.patch |   6 +-
 ...se-another-method-to-get-bad-address.patch |  61 --
 ...-recent-glibc-calls-syscall-directly.patch |  75 ---
 .../ltp/0001-statx-fix-compile-errors.patch   |  35 
 ...ake-OFD-command-use-fcntl64-syscall-.patch | 184 --
 ...option-to-select-libc-implementation.patch |   3 +-
 ...BC_PREREQ-is-defined-before-using-it.patch | 124 
 .../ltp/{ltp_20180926.bb => ltp_20190115.bb}  |   8 +-
 10 files changed, 5 insertions(+), 593 deletions(-)
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-setrlimit05-Use-another-method-to-get-bad-address.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-statx-fix-compile-errors.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch
 rename meta/recipes-extended/ltp/{ltp_20180926.bb => ltp_20190115.bb} (91%)

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch
 
b/meta/recipes-extended/ltp/ltp/0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch
deleted file mode 100644
index d0c847774d..00
--- 
a/meta/recipes-extended/ltp/ltp/0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From c9edb0eaaca83c18ac7b5ea3330faad8d47d3fd1 Mon Sep 17 00:00:00 2001
-From: Khem Raj 
-Date: Fri, 14 Dec 2018 06:44:02 -0800
-Subject: [PATCH] getcpu01: Rename getcpu to avoid conflict with glibc >= 2.29
-
-glibc has added getcpu() API starting with glibc 2.29 release, this
-makes the static function in conflict and signatures are not same as
-well.
-
-Renaming helps to keep ltp build going
-
-Upstream-Status: Submitted 
[http://lists.linux.it/pipermail/ltp/2018-December/010321.html]
-
-Signed-off-by: Khem Raj 

- testcases/kernel/syscalls/getcpu/getcpu01.c | 10 +-
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/testcases/kernel/syscalls/getcpu/getcpu01.c 
b/testcases/kernel/syscalls/getcpu/getcpu01.c
-index c927512ca..e850fe844 100644
 a/testcases/kernel/syscalls/getcpu/getcpu01.c
-+++ b/testcases/kernel/syscalls/getcpu/getcpu01.c
-@@ -82,7 +82,7 @@ int sys_support = 0;
- 
- void cleanup(void);
- void setup(void);
--static inline int getcpu(unsigned int *, unsigned int *, void *);
-+static inline int get_cpu(unsigned int *, unsigned int *, void *);
- unsigned int set_cpu_affinity(void);
- unsigned int get_nodeid(unsigned int);
- unsigned int max_cpuid(size_t, cpu_set_t *);
-@@ -124,7 +124,7 @@ int main(int ac, char **av)
- #ifdef __i386__
-   node_set = get_nodeid(cpu_set);
- #endif
--  TEST(getcpu(_id, _id, NULL));
-+  TEST(get_cpu(_id, _id, NULL));
-   if (TEST_RETURN == 0) {
-   if (cpu_id != cpu_set) {
-   tst_resm(TFAIL, "getcpu() returned wrong value"
-@@ -157,10 +157,10 @@ int main(int ac, char **av)
- }
- 
- /*
-- * getcpu() - calls the system call
-+ * get_cpu() - calls the system call
-  */
--static inline int getcpu(unsigned *cpu_id, unsigned *node_id,
--   void *cache_struct)
-+static inline int get_cpu(unsigned *cpu_id, unsigned *node_id,
-+void *cache_struct)
- {
- #if defined(__i386__)
-   return syscall(318, cpu_id, node_id, cache_struct);
--- 
-2.20.0
-
diff --git 
a/meta/recipes-extended/ltp/ltp/0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch
 
b/meta/recipes-extended/ltp/ltp/0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch
deleted file mode 100644
index 32e7a0eb25..00
---