From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Kai Kang <kai.kang@windriver.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 3/3] util-linux-native: Remove SYS_setns system call in linux kernel 2.6.x
Date: Tue, 01 Apr 2014 11:15:02 +0100 [thread overview]
Message-ID: <1396347302.14790.103.camel@ted> (raw)
In-Reply-To: <af0d72274577463847f43551a9caf743314be414.1396343261.git.kai.kang@windriver.com>
On Tue, 2014-04-01 at 17:09 +0800, Kai Kang wrote:
> From: "yanjun.zhu" <yanjun.zhu@windriver.com>
>
> __NR_setns is not defined in linux kernel 2.6.x. To linux kernel 3.0,
> this variable is defined. It has been shown that no native tools use
> this syscall, so it is safe to make this substitution
>
> Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
> meta/recipes-core/util-linux/util-linux.inc | 6 ++++++
> 1 file changed, 6 insertions(+)
This is horrible. Firstly "no native tools use this syscall" - how did
you check that? I suspect you perhaps mean "no native tools in OE-Core
at this time"? How would we know when one is added?
Secondly, this should not be done as a sed, it should be a patch with a
description. This means when we upgrade util-linux, it doesn't silently
stop working or do something unintended.
Cheers,
Richard
> diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
> index ad7aac7..0f065b4 100644
> --- a/meta/recipes-core/util-linux/util-linux.inc
> +++ b/meta/recipes-core/util-linux/util-linux.inc
> @@ -112,6 +112,12 @@ RPROVIDES_${PN}-dev = "util-linux-libblkid-dev util-linux-libmount-dev util-linu
> SYSTEMD_PACKAGES = "${PN}-uuidd"
> SYSTEMD_SERVICE_${PN}-uuidd = "uuidd.service"
>
> +do_compile_prepend_class-native() {
> + if [ `uname -r | grep "2.6."` ]; then
> + sed -i 's:return syscall(SYS_setns:fprintf(stderr,"Kernel does not support setns");\n\treturn 1;\n//return syscall(:g' ${S}/include/namespace.h
> + fi
> +}
> +
> do_compile () {
> set -e
> install ${WORKDIR}/MCONFIG ${S}/MCONFIG
> --
> 1.8.1.2
>
prev parent reply other threads:[~2014-04-01 10:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-01 9:09 [PATCH 0/3] miscellaneous patches Kai Kang
2014-04-01 9:09 ` [PATCH 1/3] xorg: Fix for CVE-2013-6424 Kai Kang
2014-04-01 9:09 ` [PATCH 2/3] cmake: follow ptest output format Kai Kang
2014-04-01 10:49 ` Richard Purdie
2014-04-01 22:33 ` Otavio Salvador
2014-04-02 1:24 ` Kang Kai
2014-04-01 9:09 ` [PATCH 3/3] util-linux-native: Remove SYS_setns system call in linux kernel 2.6.x Kai Kang
2014-04-01 10:15 ` Richard Purdie [this message]
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=1396347302.14790.103.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=kai.kang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/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