* [uml-devel] [PATCH] missed musl compatibility patch @ 2015-06-26 8:36 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 0 siblings, 2 replies; 8+ messages in thread From: Hans-Werner Hilse @ 2015-06-26 8:36 UTC (permalink / raw) To: user-mode-linux-devel I'm sorry but one patch that is necessary for compilation against musl libc was still missing in the series I sent earlier. (Thank you very much for applying!) This is a bit awkward: It looked so nice and clean to just call "modify_ldt()" before. The external declaration is a hint that not all was well. Looking at modify_ldt(2), making the syscall via syscall() ourselves is actually the recommended way, so I hope it isn't too troublesome a patch. Hans-Werner Hilse (1): um: Do not rely on libc to provide modify_ldt() arch/x86/um/ldt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 2.4.3 ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
* [uml-devel] [PATCH] um: Do not rely on libc to provide modify_ldt() 2015-06-26 8:36 [uml-devel] [PATCH] missed musl compatibility patch Hans-Werner Hilse @ 2015-06-26 8:36 ` Hans-Werner Hilse 2015-06-27 18:18 ` [uml-devel] [PATCH] missed musl compatibility patch Richard Weinberger 1 sibling, 0 replies; 8+ messages in thread From: Hans-Werner Hilse @ 2015-06-26 8:36 UTC (permalink / raw) To: user-mode-linux-devel 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 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/um/ldt.c b/arch/x86/um/ldt.c index 9701a4f..6e57c22 100644 --- a/arch/x86/um/ldt.c +++ b/arch/x86/um/ldt.c @@ -11,8 +11,14 @@ #include <os.h> #include <skas.h> #include <sysdep/tls.h> +#include <unistd.h> +#include <sys/syscall.h> + +static inline int modify_ldt (int func, void *ptr, unsigned long bytecount) +{ + return syscall(SYS_modify_ldt, func, ptr, bytecount); +} -extern int modify_ldt(int func, void *ptr, unsigned long bytecount); static long write_ldt_entry(struct mm_id *mm_idp, int func, struct user_desc *desc, void **addr, int done) -- 2.4.3 ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [uml-devel] [PATCH] missed musl compatibility patch 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 ` Richard Weinberger 2015-06-29 7:15 ` Hans-Werner Hilse 1 sibling, 1 reply; 8+ messages in thread From: Richard Weinberger @ 2015-06-27 18:18 UTC (permalink / raw) To: Hans-Werner Hilse; +Cc: user-mode-linux-devel On Fri, Jun 26, 2015 at 10:36 AM, Hans-Werner Hilse <hwhilse@gmail.com> wrote: > I'm sorry but one patch that is necessary for compilation against > musl libc was still missing in the series I sent earlier. > (Thank you very much for applying!) Okay. We can merge it for -rc2. -- Thanks, //richard ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [uml-devel] [PATCH] missed musl compatibility patch 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 0 siblings, 1 reply; 8+ messages in thread From: Hans-Werner Hilse @ 2015-06-29 7:15 UTC (permalink / raw) To: User-mode-linux Devel Hi, Am 2015-06-27 20:18, schrieb Richard Weinberger: > On Fri, Jun 26, 2015 at 10:36 AM, Hans-Werner Hilse <hwhilse@gmail.com> > wrote: >> I'm sorry but one patch that is necessary for compilation against >> musl libc was still missing in the series I sent earlier. >> (Thank you very much for applying!) > > Okay. We can merge it for -rc2. Please ignore for now, I need to fix this patch, unfortunately. As it is, it breaks compilation on a much more important target - glibc. I'll send a v2 once I got this right. -hwh ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
* [uml-devel] [PATCH v2] missed musl compatibility patch 2015-06-29 7:15 ` Hans-Werner Hilse @ 2015-06-29 9:50 ` 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 0 siblings, 1 reply; 8+ messages in thread From: Hans-Werner Hilse @ 2015-06-29 9:50 UTC (permalink / raw) To: user-mode-linux-devel Updated patch to provide our own mofify_ldt() wrapper. The earlier version did not take into account that outside the "os-Linux" directories the host API is not accessible. However, an according syscall() definition is in os.h, which is already included. The syscall number can be taken from the kernel space definition as __NR_modify_ldt. Hans-Werner Hilse (1): um: Do not rely on libc to provide modify_ldt() arch/x86/um/ldt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.4.3 ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
* [uml-devel] [PATCH v2] um: Do not rely on libc to provide modify_ldt() 2015-06-29 9:50 ` [uml-devel] [PATCH v2] " Hans-Werner Hilse @ 2015-06-29 9:50 ` Hans-Werner Hilse 2015-07-27 11:30 ` Hans-Werner Hilse 0 siblings, 1 reply; 8+ messages in thread From: Hans-Werner Hilse @ 2015-06-29 9:50 UTC (permalink / raw) To: user-mode-linux-devel 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) -- 2.4.3 ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [uml-devel] [PATCH v2] um: Do not rely on libc to provide modify_ldt() 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 2015-07-28 21:41 ` Richard Weinberger 0 siblings, 1 reply; 8+ messages in thread From: Hans-Werner Hilse @ 2015-07-27 11:30 UTC (permalink / raw) To: user-mode-linux-devel 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [uml-devel] [PATCH v2] um: Do not rely on libc to provide modify_ldt() 2015-07-27 11:30 ` Hans-Werner Hilse @ 2015-07-28 21:41 ` Richard Weinberger 0 siblings, 0 replies; 8+ messages in thread From: Richard Weinberger @ 2015-07-28 21:41 UTC (permalink / raw) To: Hans-Werner Hilse; +Cc: user-mode-linux-devel On Mon, Jul 27, 2015 at 1:30 PM, Hans-Werner Hilse <hwhilse@gmail.com> wrote: > 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 for the heads up! Your patch looks good, it will be part if the next pull request (target -rc5). -- Thanks, //richard ------------------------------------------------------------------------------ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-07-28 21:41 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 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 2015-07-28 21:41 ` Richard Weinberger
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.