missed musl compatibility patch
Subsystems (2)
PATCH 1/1 missed musl compatibility patch
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(-)
Signature · 13 lines
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 [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
PATCH 1/1 um: Do not rely on libc to provide modify_ldt()
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().
--- arch/x86/um/ldt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
arch/x86/um/ldt.c +7 -1
@@ -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)
Signature · 13 lines
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 [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 3 lines · Hans-Werner Hilse
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.
Signature · 13 lines
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 [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Hi,
Am 2015-06-27 20:18, schrieb Richard Weinberger:
Quoted 7 lines
Quoted 3 lines · Hans-Werner Hilse
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 [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
PATCH v2 1/1 missed musl compatibility patch
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(-)
Signature · 13 lines
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 [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
PATCH v2 1/1 um: Do not rely on libc to provide modify_ldt()
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().
--- arch/x86/um/ldt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/x86/um/ldt.c +4 -1
@@ -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)
Signature · 13 lines
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 [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: [uml-devel] [PATCH v2] um: Do not rely on libc to provide modify_ldt()
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:
Quoted 32 lines
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 <[email protected]>--- arch/x86/um/ldt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)arch/x86/um/ldt.c +4
-1@@ -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,
Quoted 1 line
struct
user_desc*desc, void **addr, int done)
------------------------------------------------------------------------------
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: [uml-devel] [PATCH v2] um: Do not rely on libc to provide modify_ldt()
Quoted 7 lines · Hans-Werner Hilse
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).
Signature · 8 lines
Thanks, //richard ------------------------------------------------------------------------------ _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel