From: Hans-Werner Hilse <hwhilse@gmail.com>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] [PATCH v2] um: Do not rely on libc to provide modify_ldt()
Date: Mon, 27 Jul 2015 13:30:11 +0200 [thread overview]
Message-ID: <034b3bc80c078d8a8f7b2850924c033b@hilses.de> (raw)
In-Reply-To: <1435571432-21125-2-git-send-email-hwhilse@gmail.com>
Hi,
Richard, might I ping you about this one?
Reading other mails on this ML, I reckon' you're quite busy - no
problem, it's not really critical anyway. Just want to make sure the
updated patch got noticed.
Thanks,
-hwh
Am 2015-06-29 11:50, schrieb Hans-Werner Hilse:
> modify_ldt() was declared as an external symbol. Despite the man
> page for this syscall telling that there is no wrapper in glibc,
> since version 2.1 there actually is, so linking to the glibc
> works.
>
> Since modify_ldt() is not a POSIX interface, other libc
> implementations do not always provide a wrapper function.
> Even glibc headers do not provide a corresponding declaration.
>
> So go the recommended way to call this using syscall().
>
> Signed-off-by: Hans-Werner Hilse <hwhilse@gmail.com>
> ---
> arch/x86/um/ldt.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/um/ldt.c b/arch/x86/um/ldt.c
> index 9701a4f..836a1eb 100644
> --- a/arch/x86/um/ldt.c
> +++ b/arch/x86/um/ldt.c
> @@ -12,7 +12,10 @@
> #include <skas.h>
> #include <sysdep/tls.h>
>
> -extern int modify_ldt(int func, void *ptr, unsigned long bytecount);
> +static inline int modify_ldt (int func, void *ptr, unsigned long
> bytecount)
> +{
> + return syscall(__NR_modify_ldt, func, ptr, bytecount);
> +}
>
> static long write_ldt_entry(struct mm_id *mm_idp, int func,
> struct user_desc *desc, void **addr, int done)
------------------------------------------------------------------------------
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2015-07-27 11:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 8:36 [uml-devel] [PATCH] missed musl compatibility patch Hans-Werner Hilse
2015-06-26 8:36 ` [uml-devel] [PATCH] um: Do not rely on libc to provide modify_ldt() Hans-Werner Hilse
2015-06-27 18:18 ` [uml-devel] [PATCH] missed musl compatibility patch Richard Weinberger
2015-06-29 7:15 ` Hans-Werner Hilse
2015-06-29 9:50 ` [uml-devel] [PATCH v2] " Hans-Werner Hilse
2015-06-29 9:50 ` [uml-devel] [PATCH v2] um: Do not rely on libc to provide modify_ldt() Hans-Werner Hilse
2015-07-27 11:30 ` Hans-Werner Hilse [this message]
2015-07-28 21:41 ` Richard Weinberger
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=034b3bc80c078d8a8f7b2850924c033b@hilses.de \
--to=hwhilse@gmail.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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