From: Will Deacon <will.deacon@arm.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Arnd Bergmann <arnd@arndb.de>,
David Herrmann <dh.herrmann@gmail.com>
Subject: Re: [PATCH 2/2] asm-generic: add memfd_create system call to unistd.h
Date: Fri, 15 Aug 2014 14:55:20 +0100 [thread overview]
Message-ID: <20140815135520.GT27466@arm.com> (raw)
In-Reply-To: <20140812123736.GA16961@redhat.com>
On Tue, Aug 12, 2014 at 01:37:36PM +0100, Vivek Goyal wrote:
> On Tue, Aug 12, 2014 at 12:10:30PM +0100, Will Deacon wrote:
> > Hmm, so whilst I can easily wire-up the new syscall, it's pretty useless for
> > anybody other than x86 at the moment. There are a bunch of arch helpers:
> >
> > arch_kexec_kernel_image_probe
> > arch_kexec_kernel_verify_sig
> > arch_kexec_kernel_image_load
> > arch_kimage_file_post_load_cleanup
> >
> > which are only implemented for x86 (arch/x86/kernel/machine_kexec_64.c),
> > even though I don't really see what makes them arch-specific as opposed to
> > file format specific.
>
> Yes, at this point of time, this system call will work only on x86. Agreed
> that primarily it is file format details which are primarily in arch
> specific section.
>
> I think that some of the code will become arch independent as other
> arches start implementing this syscall.
>
> >
> > So this syscall will always fail with -ENOEXEC at the moment. Is it still
> > worth wiring it up?
>
> I thought that for other arches I have not even defined the syscall. So
> it probably will fail with -ENOSYS.
What I meant was, if I wire it into asm-generic/unistd.h then it will return
-ENOEXEC for architectures using that file (e.g. arm64).
Patch below, but I don't think it's very useful.
Will
--->8
commit a20104072c8faeeacb2857ce24cdb2818f51ff1a
Author: Will Deacon <will.deacon@arm.com>
Date: Mon Aug 11 14:24:47 2014 +0100
asm-generic: add kexec_file_load system call to unistd.h
Commit cb1052581e2b ("kexec: implementation of new syscall
kexec_file_load") added a new system call (kexec_file_load) but didn't
update the asm-generic unistd header.
This patch adds the new system call to the asm-generic version of
unistd.h so that it can be used by architectures such as arm64. Note
that without the arch_kexec hooks, all file formats will result in
-ENOEXEC.
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Vivek Goyal <vgoyal@redhat.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h
index 11d11bc5c78f..92ae121fa055 100644
--- a/include/uapi/asm-generic/unistd.h
+++ b/include/uapi/asm-generic/unistd.h
@@ -705,9 +705,11 @@ __SYSCALL(__NR_seccomp, sys_seccomp)
__SYSCALL(__NR_getrandom, sys_getrandom)
#define __NR_memfd_create 279
__SYSCALL(__NR_memfd_create, sys_memfd_create)
+#define __NR_kexec_file_load 280
+__SYSCALL(__NR_kexec_file_load, sys_kexec_file_load)
#undef __NR_syscalls
-#define __NR_syscalls 280
+#define __NR_syscalls 281
/*
* All syscalls below here should go away really,
next prev parent reply other threads:[~2014-08-15 13:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-11 13:37 [PATCH 1/2] arm64: compat: wire up memfd_create and getrandom syscalls for aarch32 Will Deacon
2014-08-11 13:37 ` [PATCH 2/2] asm-generic: add memfd_create system call to unistd.h Will Deacon
2014-08-11 16:54 ` David Herrmann
2014-08-11 17:15 ` Will Deacon
2014-08-11 18:57 ` Arnd Bergmann
2014-08-11 19:37 ` Geert Uytterhoeven
2014-08-12 10:27 ` Will Deacon
2014-08-12 11:10 ` Will Deacon
2014-08-12 12:37 ` Vivek Goyal
2014-08-15 13:55 ` Will Deacon [this message]
2014-08-18 17:15 ` Vivek Goyal
2014-08-18 17:40 ` Russell King - ARM Linux
2014-08-18 21:04 ` Vivek Goyal
2014-08-12 10:28 ` Will Deacon
2014-08-11 16:55 ` [PATCH 1/2] arm64: compat: wire up memfd_create and getrandom syscalls for aarch32 David Herrmann
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=20140815135520.GT27466@arm.com \
--to=will.deacon@arm.com \
--cc=arnd@arndb.de \
--cc=dh.herrmann@gmail.com \
--cc=geert@linux-m68k.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vgoyal@redhat.com \
/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