Package: libc0.1 Version: 2.13-15 Severity: wishlist Tags: patch This patch implements the following syscall stubs:
i386_get_gsbase i386_get_fsbase i386_set_gsbase i386_set_fsbase amd64_get_gsbase amd64_get_fsbase amd64_set_gsbase amd64_set_fsbase -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: kfreebsd-amd64 (x86_64) Kernel: kFreeBSD 8.1-1-amd64 Locale: LANG=ca_AD.utf8, LC_CTYPE=ca_AD.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages libc0.1 depends on: ii libc-bin 2.13-15 Embedded GNU C Library: Binaries ii libgcc1 1:4.6.1-4 GCC support library libc0.1 recommends no packages. Versions of packages libc0.1 suggests: ii debconf [debconf-2.0] 1.5.41 Debian configuration management sy pn glibc-doc <none> (no description available) ii locales 2.13-14 Embedded GNU C Library: National L -- debconf information excluded
Index: i386/i386_get_gsbase.c =================================================================== --- i386/i386_get_gsbase.c (revision 0) +++ i386/i386_get_gsbase.c (revision 0) @@ -0,0 +1,25 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <machine/sysarch.h> + +int +i386_get_gsbase (void **addr) +{ + return __sysarch (I386_GET_GSBASE, addr); +} Index: i386/i386_set_gsbase.c =================================================================== --- i386/i386_set_gsbase.c (revision 0) +++ i386/i386_set_gsbase.c (revision 0) @@ -0,0 +1,25 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <machine/sysarch.h> + +int +i386_set_gsbase (void *addr) +{ + return __sysarch (I386_SET_GSBASE, addr); +} Index: i386/Makefile =================================================================== --- i386/Makefile (revision 3681) +++ i386/Makefile (working copy) @@ -15,5 +15,5 @@ # For <sys/vm86.h>. sysdep_routines += i386_vm86 # For <machine/sysarch.h>. -sysdep_routines += i386_get_ldt i386_set_ldt +sysdep_routines += i386_get_ldt i386_set_ldt i386_get_fsbase i386_set_fsbase i386_get_gsbase i386_set_gsbase endif Index: i386/i386_get_fsbase.c =================================================================== --- i386/i386_get_fsbase.c (revision 0) +++ i386/i386_get_fsbase.c (revision 0) @@ -0,0 +1,25 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <machine/sysarch.h> + +int +i386_get_fsbase (void **addr) +{ + return __sysarch (I386_GET_FSBASE, addr); +} Index: i386/Versions =================================================================== --- i386/Versions (revision 3681) +++ i386/Versions (working copy) @@ -4,4 +4,7 @@ ioperm; iopl; i386_get_ldt; i386_set_ldt; } + GLIBC_2.13 { + i386_get_fsbase; i386_set_fsbase; i386_get_gsbase; i386_set_gsbase; + } } Index: i386/i386_set_fsbase.c =================================================================== --- i386/i386_set_fsbase.c (revision 0) +++ i386/i386_set_fsbase.c (revision 0) @@ -0,0 +1,25 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <machine/sysarch.h> + +int +i386_set_fsbase (void *addr) +{ + return __sysarch (I386_SET_FSBASE, addr); +} Index: x86_64/amd64_set_fsbase.c =================================================================== --- x86_64/amd64_set_fsbase.c (revision 0) +++ x86_64/amd64_set_fsbase.c (revision 0) @@ -0,0 +1,25 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <machine/sysarch.h> + +int +amd64_set_fsbase (void *addr) +{ + return __sysarch (AMD64_SET_FSBASE, addr); +} Index: x86_64/Makefile =================================================================== --- x86_64/Makefile (revision 3681) +++ x86_64/Makefile (working copy) @@ -14,4 +14,6 @@ ifeq ($(subdir),misc) # For <sys/io.h> and <sys/perm.h>. sysdep_routines += iopl ioperm +# For <machine/sysarch.h>. +sysdep_routines += amd64_get_fsbase amd64_set_fsbase amd64_get_gsbase amd64_set_gsbase endif Index: x86_64/amd64_get_gsbase.c =================================================================== --- x86_64/amd64_get_gsbase.c (revision 0) +++ x86_64/amd64_get_gsbase.c (revision 0) @@ -0,0 +1,25 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <machine/sysarch.h> + +int +amd64_get_gsbase (void **addr) +{ + return __sysarch (AMD64_GET_GSBASE, addr); +} Index: x86_64/amd64_set_gsbase.c =================================================================== --- x86_64/amd64_set_gsbase.c (revision 0) +++ x86_64/amd64_set_gsbase.c (revision 0) @@ -0,0 +1,25 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <machine/sysarch.h> + +int +amd64_set_gsbase (void *addr) +{ + return __sysarch (AMD64_SET_GSBASE, addr); +} Index: x86_64/Versions =================================================================== --- x86_64/Versions (revision 3681) +++ x86_64/Versions (working copy) @@ -5,4 +5,7 @@ GLIBC_2.10 { ioperm; } + GLIBC_2.13 { + amd64_get_fsbase; amd64_set_fsbase; amd64_get_gsbase; amd64_set_gsbase; + } } Index: x86_64/amd64_get_fsbase.c =================================================================== --- x86_64/amd64_get_fsbase.c (revision 0) +++ x86_64/amd64_get_fsbase.c (revision 0) @@ -0,0 +1,25 @@ +/* Copyright (C) 2011 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <machine/sysarch.h> + +int +amd64_get_fsbase (void **addr) +{ + return __sysarch (AMD64_GET_FSBASE, addr); +}