search for: __nr_

Displaying 20 results from an estimated 49 matches for "__nr_".

Did you mean: __nr
2014 Jun 10
4
[LLVMdev] use of undeclared identifier '__NR_*' error while building clang
Hi guys, I am following this[1] tutorial to install clang. However, I have made a small change in the configure command, and I am running it with '--enable-optimized' option to avoid the debug build. I am getting the errors (given at the end) related to *undeclared identifiers '__NR_*'*. Can someone please provide some input about how to tackle this issue? On my other machine, I followed the same guide[1] (without the --enable-optimized option), and everything built successfully. [1] http://clang.llvm.org/get_started.html ==================== warning: clang_darwin.mk: dr...
2006 Jul 07
0
[patch] s390: fix six parameter handling in sysstub.ph
..."${outputdir}/${fname}.S"); - print OUT "#include <asm/unistd.h>\n"; - print OUT "\n"; - print OUT "\t.type ${fname},\@function\n"; - print OUT "\t.globl ${fname}\n"; - print OUT "${fname}:\n"; - print OUT ".if __NR_${sname} < 256\n"; - print OUT "\tsvc __NR_${sname}\n"; - print OUT ".else\n"; - print OUT "\tla %r1,__NR_${sname}\n"; - print OUT "\tsvc 0\n"; - print OUT ".endif\n"; - - print OUT "#ifndef __s390x__\n"; - - pr...
2013 Oct 15
2
Mailing list fixed
It seems the mailing list has been broken for several days. It should now be temporarily fixed, but because the fix is temporary I can't promise it won't happen again until the permanent fix is available. Sorry for that. -hpa
2013 Oct 16
2
Unsupported system calls
On 10/16/2013 12:42 AM, Anil Singhar wrote: > Hi HPA, > > Regarding the architecture un-supported system calls, I wrapped them with > #ifndef __NR_<foo> .. #endif /* __NR_<foo> */ switches. I have already done > that. But you also mentioned that in SYSCALLS.def all these calls should be > present and marked with '?'.. Is that right..? Could you please give little > more detail about the change you want. > It...
2006 Jun 26
0
[klibc 37/43] x86_64 support for klibc
...t */ + +#undef _syscall0 +#undef _syscall1 +#undef _syscall2 +#undef _syscall3 +#undef _syscall4 +#undef _syscall5 +#undef _syscall6 + +#define _syscall0(type,name) \ +type name (void) \ +{ \ +long __res; \ +__asm__ volatile (__syscall \ + : "=a" (__res) \ + : "0" (__NR_##name) \ + : __syscall_clobber); \ +__syscall_return(type,__res); \ +} + +#define _syscall1(type,name,type1,arg1) \ +type name (type1 arg1) \ +{ \ +long __res; \ +__asm__ volatile (__syscall \ + : "=a" (__res) \ + : "0" (__NR_##name),"D" (arg1) \ +...
2017 Feb 13
2
[PATCH] Enable specific ioctl calls for ICA crypto card (s390)
...+#define LO_ARG(idx) offsetof(struct seccomp_data, args[(idx)]) +#elif __BYTE_ORDER == __BIG_ENDIAN +#define LO_ARG(idx) offsetof(struct seccomp_data, args[(idx)]) + sizeof(_u32) +#else +#error "Unknown endianness" +#endif #define SC_DENY(_nr, _errno) \ BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_ ## _nr, 0, 1), \ BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ERRNO|(_errno)) @@ -82,9 +94,8 @@ BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW) #define SC_ALLOW_ARG(_nr, _arg_nr, _arg_val) \ BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_ ## _nr, 0, 4), \ - /* load first syscall argument */ \ - BPF_STMT(BPF_LD+BPF_...
2006 May 11
0
[patch] klibc: merge s390 and s390x
...%b1\n" \ - " lr %0,2" \ + " la %0,2" \ : "=d" (__res) \ : "i" (__NR_##name), \ "d" (__argp) \ diff -purN a/usr/include/arch/s390x/klibc/archconfig.h b/usr/include/arch/s390x/klibc/archconfig.h --- a/usr/include/arch/s390x/klibc/archconfig.h 2006-05-11 08:09:08.000000000 +0200 +++ b/usr/include/arch/s390x/k...
2006 May 24
1
[patch] klibc: merge s390/s390x 2nd try
...%b1\n" \ - " lr %0,2" \ + " la %0,2" \ : "=d" (__res) \ : "i" (__NR_##name), \ "d" (__argp) \ diff -purN a/usr/include/arch/s390x/klibc/archconfig.h b/usr/include/arch/s390x/klibc/archconfig.h --- a/usr/include/arch/s390x/klibc/archconfig.h 2006-05-24 15:19:12.000000000 +0200 +++ b/usr/include/arch/s390x/k...
2006 Jun 26
0
[klibc 25/43] ia64 support for klibc
...\ +{ \ + register long _r8 asm ("r8"); \ + register long _r10 asm ("r10"); \ + register long _r15 asm ("r15") = __NR_##name; \ + long _retval; \ + __asm __volatile (__IA64_BREAK \ + : "=r" (_r8), "=r" (_r10), "=r" (_r15) \ +...
2017 Apr 24
2
seccomp filter for ppc64le in FIPS mode
Hello all, OpenSSL is using socket() calls (in FIPS mode) when handling ECDSA keys in privsep child. The socket() syscall is already denied in the seccomp filter, but in ppc64le kernel, it is implemented using socketcall() syscall, which is not denied yet (only SYS_SHUTDOWN is allowed) and therefore fails hard. See attached patch with proposed patch (deny is intentionally after allowing the
2013 Oct 16
0
Mailing list fixed
Hi HPA, Regarding the architecture un-supported system calls, I wrapped them with #ifndef __NR_<foo> .. #endif /* __NR_<foo> */ switches. I have already done that. But you also mentioned that in SYSCALLS.def all these calls should be present and marked with '?'.. Is that right..? Could you please give little more detail about the change you want. Thanks and Regards, Anil...
2013 Oct 16
0
Unsupported system calls
...tecture, right..? Thanks and Regards, Anil On 16 October 2013 13:14, H. Peter Anvin <hpa at zytor.com> wrote: > On 10/16/2013 12:42 AM, Anil Singhar wrote: > > Hi HPA, > > > > Regarding the architecture un-supported system calls, I wrapped them with > > #ifndef __NR_<foo> .. #endif /* __NR_<foo> */ switches. I have already > done > > that. But you also mentioned that in SYSCALLS.def all these calls should > be > > present and marked with '?'.. Is that right..? Could you please give > little > > more detail about th...
2006 Jun 26
0
[klibc 33/43] s390 support for klibc
..._volatile__ ( \ + " svc %b1\n" \ + " la %0,2" \ + : "=d" (__res) \ + : "i" (__NR_##name), \ + "d" (__argp) \ + : _svc_clobber); \ + __syscall_return(type, __res); \ +} + +#endif /* _syscall6() missing */ + +#endif /* _KLIBC_ARCHSYS_H */ diff --git a/usr/klibc/arch/s390/MCONFIG b/usr/klibc/arch/s390/M...
2007 Apr 02
3
Problem with gettid() on CentOS 5/gcc 4.1.1
...ething missing in CentOS 5. The issue is that the _syscall0 macro is not defined anywhere. If I copy and paste the following definition for _syscall0 from a CentOS 4.4 system into the test program, it works just fine: #define _syscall0(type,name) \ type name(void) \ {\ return syscall(__NR_##name);\ } Has anyone else run into this problem? Alfred #include <stdio.h> #include <sys/types.h> #include <linux/unistd.h> #include <errno.h> _syscall0(pid_t, gettid) int main(int argc, char *argv[]) { printf("My tid is 0x%08x\n", gettid()); }
2010 Mar 14
1
klibc sparc sockets foo
...jeremy at sunny:~$ /usr/lib/klibc/bin/ipconfig lo ipconfig: lo: socket(AF_INET): Function not implemented /usr/lib/klibc/bin/ipconfig: no devices to configure Looking at the source code, it seems there is 2 call mechanisms: - if the kernel header files (asm/unistd.h) defines __NR_socket (and so on), the makefiles uses the syscall interface ; - otherwise, the makefiles uses the socketcall interface, which wraps the call into a common syscall (named socketcall). See the <src>/usr/klibc/syscalls.pl and <src>/usr/klibc/socketcalls.pl for details....
2006 Jun 26
0
[klibc 34/43] sh support for klibc
...uot;,\"ax\"\n"; + print OUT "\t.type\t${fname},\#function\n"; + print OUT "\t.globl\t${fname}\n"; + print OUT "\t.align\t2\n"; + print OUT "${fname}:\n"; + print OUT "\tbra\t__syscall_common\n"; + print OUT "#if __NR_${sname} >= 128\n"; + print OUT "\t mov.l\t1f, r3\n"; + print OUT "#else\n"; + print OUT "\t mov\t# __NR_${sname}, r3\n"; + print OUT "#endif\n"; + print OUT "\t.size ${fname},.-${fname}\n"; + print OUT "\n"; +...
2016 Jan 06
0
[klibc:master] Add accept4(), handle fallback from accept () to accept4()
.../usr/klibc/accept.c b/usr/klibc/accept.c new file mode 100644 index 0000000..3ae7bcd --- /dev/null +++ b/usr/klibc/accept.c @@ -0,0 +1,16 @@ +/* + * pread.c + * + * Some architectures need to wrap the system call + */ + +#include <sys/socket.h> + +#if !_KLIBC_SYS_SOCKETCALL && defined(__NR_accept4) && !defined(__NR_accept) + +int accept(int socket, struct sockaddr *address, socklen_t *addr_len) +{ + return accept4(socket, address, addr_len, 0); +} + +#endif diff --git a/usr/klibc/socketcalls.pl b/usr/klibc/socketcalls.pl index 9df5949..70ded0b 100644 --- a/usr/klibc/socketcall...
2016 Jan 06
0
[klibc:master] i386: remove special handling of socketcall
...i3.o libgcc/__negdi2.o diff --git a/usr/klibc/arch/i386/socketcall.S b/usr/klibc/arch/i386/socketcall.S deleted file mode 100644 index 44e2004..0000000 --- a/usr/klibc/arch/i386/socketcall.S +++ /dev/null @@ -1,55 +0,0 @@ -# -# socketcall.S -# -# Socketcalls use the following convention: -# %eax = __NR_socketcall -# %ebx = socketcall number -# %ecx = pointer to arguments (up to 6) -# - -#include <asm/unistd.h> - -#ifdef __i386__ - - .text - .align 4 - .globl __socketcall_common - .type __socketcall_common, @function - -__socketcall_common: - xchgl %ebx,(%esp) # The stub passes the socketcall...
2013 Dec 03
0
[klibc:master] ppc64: Add ppc64le support
...;${fname}:\n"; - print OUT "\t.quad .${fname},.TOC.\@tocbase,0\n"; - print OUT "\t.text\n"; - print OUT "\t.type .${fname},\@function\n"; - print OUT "\t.globl .${fname}\n"; - print OUT ".${fname}:\n"; - print OUT "\tli 0,__NR_${sname}\n"; - print OUT "\tsc\n"; - print OUT "\tbnslr\n"; - print OUT "\tb .__syscall_error\n"; - print OUT "\t.size .${fname},.-.${fname}\n"; + print OUT <<EOF; +#include <asm/unistd.h> + + .text + .balign 4 + .globl ${fname}...
2013 Dec 03
2
[PATCH 1/2] ppc64: Add ppc64le support
...;${fname}:\n"; - print OUT "\t.quad .${fname},.TOC.\@tocbase,0\n"; - print OUT "\t.text\n"; - print OUT "\t.type .${fname},\@function\n"; - print OUT "\t.globl .${fname}\n"; - print OUT ".${fname}:\n"; - print OUT "\tli 0,__NR_${sname}\n"; - print OUT "\tsc\n"; - print OUT "\tbnslr\n"; - print OUT "\tb .__syscall_error\n"; - print OUT "\t.size .${fname},.-.${fname}\n"; + print OUT <<EOF; +#include <asm/unistd.h> + + .text + .balign 4 + .globl ${fname}...