clarify the purpose of this project
[nyanglibc.git] / sunrpc / compat-key_call.shared.s
blob0292c918749f257a89d9c4ba2d75ae87f95f14f5
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .symver __EI_key_setsecret, key_setsecret@GLIBC_2.2.5
7 .symver __EI_key_encryptsession, key_encryptsession@GLIBC_2.2.5
8 .symver __EI_key_decryptsession, key_decryptsession@GLIBC_2.2.5
9 .symver __EI_key_encryptsession_pk, key_encryptsession_pk@GLIBC_2.2.5
10 .symver __EI_key_decryptsession_pk, key_decryptsession_pk@GLIBC_2.2.5
11 .symver __EI_key_setnet, key_setnet@GLIBC_2.2.5
12 .symver __EI_key_get_conv, key_get_conv@GLIBC_2.2.5
13 .section .rodata.str1.1,"aMS",@progbits,1
14 .LC0:
15 .string ""
16 .LC1:
17 .string "unix"
18 .LC2:
19 .string "/var/run/keyservsock"
20 #NO_APP
21 .text
22 .p2align 4,,15
23 .type getkeyserv_handle, @function
24 getkeyserv_handle:
25 .LFB73:
26 pushq %rbp
27 pushq %rbx
28 subq $168, %rsp
29 movl %edi, 12(%rsp)
30 call __rpc_thread_variables
31 movq 200(%rax), %rbx
32 movl $110, 28(%rsp)
33 testq %rbx, %rbx
34 je .L28
35 cmpq $0, (%rbx)
36 je .L6
37 movl 8(%rbx), %ebp
38 call __GI___getpid
39 cmpl %eax, %ebp
40 je .L7
41 .L24:
42 movq (%rbx), %rax
43 movq (%rax), %rdi
44 movq 56(%rdi), %rax
45 call *32(%rax)
46 movq (%rbx), %rdi
47 movq 8(%rdi), %rax
48 call *32(%rax)
49 movq $0, (%rbx)
50 .L6:
51 movslq 12(%rsp), %rdx
52 leaq .LC1(%rip), %rcx
53 leaq .LC2(%rip), %rdi
54 movl $100029, %esi
55 call __GI_clnt_create
56 testq %rax, %rax
57 movq %rax, (%rbx)
58 je .L25
59 call __geteuid
60 movl %eax, 12(%rbx)
61 call __GI___getpid
62 movl 12(%rbx), %esi
63 leaq .LC0(%rip), %rdi
64 xorl %r8d, %r8d
65 xorl %ecx, %ecx
66 xorl %edx, %edx
67 movl %eax, 8(%rbx)
68 movq (%rbx), %rbp
69 call __GI_authunix_create
70 movq (%rbx), %rdi
71 movq %rax, 0(%rbp)
72 cmpq $0, (%rdi)
73 je .L26
74 movq 8(%rdi), %rax
75 leaq 32(%rsp), %rdx
76 movl $4, %esi
77 movq $6, 32(%rsp)
78 movq $0, 40(%rsp)
79 call *40(%rax)
80 movq (%rbx), %rdi
81 leaq 24(%rsp), %rdx
82 movl $6, %esi
83 movq 8(%rdi), %rax
84 call *40(%rax)
85 testl %eax, %eax
86 jne .L29
87 .L13:
88 movq (%rbx), %rax
89 .L1:
90 addq $168, %rsp
91 popq %rbx
92 popq %rbp
93 ret
94 .p2align 4,,10
95 .p2align 3
96 .L29:
97 movl 24(%rsp), %edi
98 movl $1, %edx
99 movl $2, %esi
100 xorl %eax, %eax
101 call __GI___fcntl
102 jmp .L13
103 .p2align 4,,10
104 .p2align 3
105 .L30:
106 call __geteuid
107 movl %eax, 12(%rbx)
108 movq (%rbx), %rax
109 movq (%rax), %rdi
110 movq 56(%rdi), %rax
111 call *32(%rax)
112 movl 12(%rbx), %esi
113 leaq .LC0(%rip), %rdi
114 xorl %r8d, %r8d
115 xorl %ecx, %ecx
116 xorl %edx, %edx
117 movq (%rbx), %rbp
118 call __GI_authunix_create
119 movq (%rbx), %rdi
120 movq %rax, 0(%rbp)
121 cmpq $0, (%rdi)
122 jne .L10
123 .L26:
124 movq 8(%rdi), %rax
125 call *32(%rax)
126 movq $0, (%rbx)
127 .L25:
128 xorl %eax, %eax
129 jmp .L1
130 .p2align 4,,10
131 .p2align 3
132 .L28:
133 movl $16, %edi
134 movq %rax, %rbp
135 call malloc@PLT
136 testq %rax, %rax
137 movq %rax, %rbx
138 je .L25
139 movq %rax, 200(%rbp)
140 movq $0, (%rax)
141 jmp .L6
142 .p2align 4,,10
143 .p2align 3
144 .L7:
145 movq (%rbx), %rdi
146 testq %rdi, %rdi
147 je .L6
148 movq 8(%rdi), %rax
149 leaq 24(%rsp), %rdx
150 movl $6, %esi
151 call *40(%rax)
152 movl 24(%rsp), %edi
153 leaq 48(%rsp), %rsi
154 leaq 28(%rsp), %rdx
155 call __getpeername
156 cmpl $-1, %eax
157 je .L24
158 cmpq $0, (%rbx)
159 je .L6
160 movl 12(%rbx), %ebp
161 call __geteuid
162 cmpl %eax, %ebp
163 jne .L30
164 movq (%rbx), %rdi
165 .L10:
166 movq 8(%rdi), %rax
167 leaq 12(%rsp), %rdx
168 movl $13, %esi
169 call *40(%rax)
170 movq (%rbx), %rax
171 addq $168, %rsp
172 popq %rbx
173 popq %rbp
175 .LFE73:
176 .size getkeyserv_handle, .-getkeyserv_handle
177 .p2align 4,,15
178 .type key_call_socket, @function
179 key_call_socket:
180 .LFB74:
181 pushq %r14
182 movq %r8, %r14
183 pushq %r13
184 movq %rcx, %r13
185 pushq %r12
186 movq %rdx, %r12
187 pushq %rbp
188 movq %rsi, %rbp
189 pushq %rbx
190 movq %rdi, %rbx
191 #APP
192 # 497 "key_call.c" 1
193 movl %fs:24,%eax
194 # 0 "" 2
195 #NO_APP
196 testl %eax, %eax
197 jne .L32
198 movl $1, %edx
199 #APP
200 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
201 cmpxchgl %edx, keycall_lock(%rip)
202 # 0 "" 2
203 #NO_APP
204 .L33:
205 leaq -6(%rbx), %rax
206 cmpq $4, %rax
207 jbe .L34
208 movl $1, %edi
209 call getkeyserv_handle
210 .L35:
211 testq %rax, %rax
212 je .L39
213 movq 8(%rax), %r10
214 movq %r13, %r8
215 pushq $0
216 movq %r12, %rcx
217 pushq $30
218 movq %rbp, %rdx
219 movq %r14, %r9
220 movq %rbx, %rsi
221 movq %rax, %rdi
222 call *(%r10)
223 popq %rdx
224 popq %rcx
225 xorl %r8d, %r8d
226 testl %eax, %eax
227 sete %r8b
228 .L36:
229 #APP
230 # 515 "key_call.c" 1
231 movl %fs:24,%eax
232 # 0 "" 2
233 #NO_APP
234 testl %eax, %eax
235 jne .L37
236 subl $1, keycall_lock(%rip)
237 .L31:
238 popq %rbx
239 movl %r8d, %eax
240 popq %rbp
241 popq %r12
242 popq %r13
243 popq %r14
245 .p2align 4,,10
246 .p2align 3
247 .L34:
248 movl $2, %edi
249 call getkeyserv_handle
250 jmp .L35
251 .p2align 4,,10
252 .p2align 3
253 .L32:
254 xorl %eax, %eax
255 movl $1, %edx
256 lock cmpxchgl %edx, keycall_lock(%rip)
257 je .L33
258 leaq keycall_lock(%rip), %rdi
259 call __lll_lock_wait_private
260 jmp .L33
261 .p2align 4,,10
262 .p2align 3
263 .L37:
264 xorl %eax, %eax
265 #APP
266 # 515 "key_call.c" 1
267 xchgl %eax, keycall_lock(%rip)
268 # 0 "" 2
269 #NO_APP
270 cmpl $1, %eax
271 jle .L31
272 xorl %r10d, %r10d
273 movl $1, %edx
274 movl $129, %esi
275 leaq keycall_lock(%rip), %rdi
276 movl $202, %eax
277 #APP
278 # 515 "key_call.c" 1
279 syscall
281 # 0 "" 2
282 #NO_APP
283 jmp .L31
284 .p2align 4,,10
285 .p2align 3
286 .L39:
287 xorl %r8d, %r8d
288 jmp .L36
289 .LFE74:
290 .size key_call_socket, .-key_call_socket
291 .p2align 4,,15
292 .globl __GI_key_setsecret
293 .hidden __GI_key_setsecret
294 .type __GI_key_setsecret, @function
295 __GI_key_setsecret:
296 .LFB64:
297 subq $24, %rsp
298 leaq __GI_xdr_keystatus(%rip), %rcx
299 leaq __GI_xdr_keybuf(%rip), %rsi
300 leaq 12(%rsp), %r8
301 movq %rdi, %rdx
302 movl $1, %edi
303 call key_call_socket
304 testl %eax, %eax
305 je .L43
306 movl 12(%rsp), %edx
307 xorl %eax, %eax
308 testl %edx, %edx
309 setne %al
310 negl %eax
311 .L41:
312 addq $24, %rsp
314 .p2align 4,,10
315 .p2align 3
316 .L43:
317 movl $-1, %eax
318 jmp .L41
319 .LFE64:
320 .size __GI_key_setsecret, .-__GI_key_setsecret
321 .globl __EI_key_setsecret
322 .set __EI_key_setsecret,__GI_key_setsecret
323 .p2align 4,,15
324 .globl __GI_key_secretkey_is_set
325 .hidden __GI_key_secretkey_is_set
326 .type __GI_key_secretkey_is_set, @function
327 __GI_key_secretkey_is_set:
328 .LFB65:
329 subq $120, %rsp
330 xorl %eax, %eax
331 movl $14, %ecx
332 movq %rsp, %r8
333 leaq __GI_xdr_void(%rip), %rsi
334 xorl %edx, %edx
335 movq %r8, %rdi
336 rep stosq
337 leaq __GI_xdr_key_netstres(%rip), %rcx
338 movl $9, %edi
339 call key_call_socket
340 testl %eax, %eax
341 je .L45
342 movl (%rsp), %edx
343 xorl %eax, %eax
344 testl %edx, %edx
345 jne .L45
346 xorl %eax, %eax
347 cmpb $0, 8(%rsp)
348 setne %al
349 .L45:
350 addq $120, %rsp
352 .LFE65:
353 .size __GI_key_secretkey_is_set, .-__GI_key_secretkey_is_set
354 .globl key_secretkey_is_set
355 .set key_secretkey_is_set,__GI_key_secretkey_is_set
356 .p2align 4,,15
357 .globl __GI_key_encryptsession
358 .hidden __GI_key_encryptsession
359 .type __GI_key_encryptsession, @function
360 __GI_key_encryptsession:
361 .LFB66:
362 pushq %rbx
363 leaq __GI_xdr_cryptkeyres(%rip), %rcx
364 movq %rsi, %rbx
365 subq $32, %rsp
366 movq (%rsi), %rax
367 leaq __GI_xdr_cryptkeyarg(%rip), %rsi
368 leaq 16(%rsp), %rdx
369 leaq 4(%rsp), %r8
370 movq %rdi, 16(%rsp)
371 movl $2, %edi
372 movq %rax, 24(%rsp)
373 call key_call_socket
374 testl %eax, %eax
375 je .L55
376 movl 4(%rsp), %eax
377 testl %eax, %eax
378 jne .L55
379 movq 8(%rsp), %rax
380 movq %rax, (%rbx)
381 xorl %eax, %eax
382 .L52:
383 addq $32, %rsp
384 popq %rbx
386 .p2align 4,,10
387 .p2align 3
388 .L55:
389 movl $-1, %eax
390 jmp .L52
391 .LFE66:
392 .size __GI_key_encryptsession, .-__GI_key_encryptsession
393 .globl __EI_key_encryptsession
394 .set __EI_key_encryptsession,__GI_key_encryptsession
395 .p2align 4,,15
396 .globl __GI_key_decryptsession
397 .hidden __GI_key_decryptsession
398 .type __GI_key_decryptsession, @function
399 __GI_key_decryptsession:
400 .LFB67:
401 pushq %rbx
402 leaq __GI_xdr_cryptkeyres(%rip), %rcx
403 movq %rsi, %rbx
404 subq $32, %rsp
405 movq (%rsi), %rax
406 leaq __GI_xdr_cryptkeyarg(%rip), %rsi
407 leaq 16(%rsp), %rdx
408 leaq 4(%rsp), %r8
409 movq %rdi, 16(%rsp)
410 movl $3, %edi
411 movq %rax, 24(%rsp)
412 call key_call_socket
413 testl %eax, %eax
414 je .L60
415 movl 4(%rsp), %eax
416 testl %eax, %eax
417 jne .L60
418 movq 8(%rsp), %rax
419 movq %rax, (%rbx)
420 xorl %eax, %eax
421 .L57:
422 addq $32, %rsp
423 popq %rbx
425 .p2align 4,,10
426 .p2align 3
427 .L60:
428 movl $-1, %eax
429 jmp .L57
430 .LFE67:
431 .size __GI_key_decryptsession, .-__GI_key_decryptsession
432 .globl __EI_key_decryptsession
433 .set __EI_key_decryptsession,__GI_key_decryptsession
434 .p2align 4,,15
435 .globl __GI_key_encryptsession_pk
436 .hidden __GI_key_encryptsession_pk
437 .type __GI_key_encryptsession_pk, @function
438 __GI_key_encryptsession_pk:
439 .LFB68:
440 pushq %rbp
441 pushq %rbx
442 movq %rdx, %rbx
443 subq $56, %rsp
444 movq (%rdx), %rax
445 movdqu (%rsi), %xmm0
446 movq %rdi, 16(%rsp)
447 movq %rax, 40(%rsp)
448 movq __key_encryptsession_pk_LOCAL@GOTPCREL(%rip), %rax
449 movups %xmm0, 24(%rsp)
450 movq (%rax), %rbp
451 testq %rbp, %rbp
452 jne .L68
453 leaq 16(%rsp), %rdx
454 leaq 4(%rsp), %r8
455 leaq __GI_xdr_cryptkeyres(%rip), %rcx
456 leaq __GI_xdr_cryptkeyarg2(%rip), %rsi
457 movl $6, %edi
458 call key_call_socket
459 testl %eax, %eax
460 jne .L64
461 .L66:
462 addq $56, %rsp
463 movl $-1, %eax
464 popq %rbx
465 popq %rbp
467 .p2align 4,,10
468 .p2align 3
469 .L68:
470 call __geteuid
471 leaq 16(%rsp), %rsi
472 movl %eax, %edi
473 call *%rbp
474 movq (%rax), %rdx
475 movq %rdx, 4(%rsp)
476 movl 8(%rax), %eax
477 movl %eax, 12(%rsp)
478 .L64:
479 movl 4(%rsp), %eax
480 testl %eax, %eax
481 jne .L66
482 movq 8(%rsp), %rax
483 movq %rax, (%rbx)
484 addq $56, %rsp
485 xorl %eax, %eax
486 popq %rbx
487 popq %rbp
489 .LFE68:
490 .size __GI_key_encryptsession_pk, .-__GI_key_encryptsession_pk
491 .globl __EI_key_encryptsession_pk
492 .set __EI_key_encryptsession_pk,__GI_key_encryptsession_pk
493 .p2align 4,,15
494 .globl __GI_key_decryptsession_pk
495 .hidden __GI_key_decryptsession_pk
496 .type __GI_key_decryptsession_pk, @function
497 __GI_key_decryptsession_pk:
498 .LFB69:
499 pushq %rbp
500 pushq %rbx
501 movq %rdx, %rbx
502 subq $56, %rsp
503 movq (%rdx), %rax
504 movdqu (%rsi), %xmm0
505 movq %rdi, 16(%rsp)
506 movq %rax, 40(%rsp)
507 movq __key_decryptsession_pk_LOCAL@GOTPCREL(%rip), %rax
508 movups %xmm0, 24(%rsp)
509 movq (%rax), %rbp
510 testq %rbp, %rbp
511 jne .L75
512 leaq 16(%rsp), %rdx
513 leaq 4(%rsp), %r8
514 leaq __GI_xdr_cryptkeyres(%rip), %rcx
515 leaq __GI_xdr_cryptkeyarg2(%rip), %rsi
516 movl $7, %edi
517 call key_call_socket
518 testl %eax, %eax
519 jne .L71
520 .L73:
521 addq $56, %rsp
522 movl $-1, %eax
523 popq %rbx
524 popq %rbp
526 .p2align 4,,10
527 .p2align 3
528 .L75:
529 call __geteuid
530 leaq 16(%rsp), %rsi
531 movl %eax, %edi
532 call *%rbp
533 movq (%rax), %rdx
534 movq %rdx, 4(%rsp)
535 movl 8(%rax), %eax
536 movl %eax, 12(%rsp)
537 .L71:
538 movl 4(%rsp), %eax
539 testl %eax, %eax
540 jne .L73
541 movq 8(%rsp), %rax
542 movq %rax, (%rbx)
543 addq $56, %rsp
544 xorl %eax, %eax
545 popq %rbx
546 popq %rbp
548 .LFE69:
549 .size __GI_key_decryptsession_pk, .-__GI_key_decryptsession_pk
550 .globl __EI_key_decryptsession_pk
551 .set __EI_key_decryptsession_pk,__GI_key_decryptsession_pk
552 .p2align 4,,15
553 .globl __GI_key_gendes
554 .hidden __GI_key_gendes
555 .type __GI_key_gendes, @function
556 __GI_key_gendes:
557 .LFB70:
558 pushq %rbp
559 pushq %rbx
560 movabsq $72058139498774530, %rax
561 movq %rdi, %rbp
562 movl $100029, %esi
563 movl $1, %edx
564 subq $40, %rsp
565 movq trytimeout(%rip), %rcx
566 movq 8+trytimeout(%rip), %r8
567 movq %rax, 16(%rsp)
568 leaq 16(%rsp), %rdi
569 movq $0, 24(%rsp)
570 movl $-1, 12(%rsp)
571 pushq $400
572 pushq $400
573 leaq 28(%rsp), %r9
574 call __GI_clntudp_bufcreate
575 testq %rax, %rax
576 popq %rcx
577 popq %rsi
578 je .L78
579 movq %rax, %rbx
580 movq 8(%rax), %rax
581 movq %rbp, %r9
582 pushq 8+tottimeout(%rip)
583 xorl %ecx, %ecx
584 pushq tottimeout(%rip)
585 leaq __GI_xdr_des_block(%rip), %r8
586 movl $4, %esi
587 leaq __GI_xdr_void(%rip), %rdx
588 movq %rbx, %rdi
589 call *(%rax)
590 movl %eax, %ebp
591 movq %rbx, %rdi
592 popq %rax
593 movq 8(%rbx), %rax
594 popq %rdx
595 call *32(%rax)
596 movl 12(%rsp), %edi
597 call __GI___close
598 xorl %eax, %eax
599 testl %ebp, %ebp
600 setne %al
601 negl %eax
602 .L76:
603 addq $40, %rsp
604 popq %rbx
605 popq %rbp
607 .L78:
608 movl $-1, %eax
609 jmp .L76
610 .LFE70:
611 .size __GI_key_gendes, .-__GI_key_gendes
612 .globl key_gendes
613 .set key_gendes,__GI_key_gendes
614 .p2align 4,,15
615 .globl __GI_key_setnet
616 .hidden __GI_key_setnet
617 .type __GI_key_setnet, @function
618 __GI_key_setnet:
619 .LFB71:
620 subq $24, %rsp
621 leaq __GI_xdr_keystatus(%rip), %rcx
622 leaq __GI_xdr_key_netstarg(%rip), %rsi
623 leaq 12(%rsp), %r8
624 movq %rdi, %rdx
625 movl $8, %edi
626 call key_call_socket
627 testl %eax, %eax
628 je .L82
629 cmpl $1, 12(%rsp)
630 sbbl %eax, %eax
631 andl $2, %eax
632 subl $1, %eax
633 .L80:
634 addq $24, %rsp
636 .p2align 4,,10
637 .p2align 3
638 .L82:
639 movl $-1, %eax
640 jmp .L80
641 .LFE71:
642 .size __GI_key_setnet, .-__GI_key_setnet
643 .globl __EI_key_setnet
644 .set __EI_key_setnet,__GI_key_setnet
645 .p2align 4,,15
646 .globl __GI_key_get_conv
647 .hidden __GI_key_get_conv
648 .type __GI_key_get_conv, @function
649 __GI_key_get_conv:
650 .LFB72:
651 pushq %rbx
652 leaq __GI_xdr_cryptkeyres(%rip), %rcx
653 movq %rsi, %rbx
654 leaq __GI_xdr_keybuf(%rip), %rsi
655 movq %rdi, %rdx
656 movl $10, %edi
657 subq $16, %rsp
658 leaq 4(%rsp), %r8
659 call key_call_socket
660 testl %eax, %eax
661 je .L88
662 movl 4(%rsp), %eax
663 testl %eax, %eax
664 jne .L88
665 movq 8(%rsp), %rax
666 movq %rax, (%rbx)
667 xorl %eax, %eax
668 .L85:
669 addq $16, %rsp
670 popq %rbx
672 .p2align 4,,10
673 .p2align 3
674 .L88:
675 movl $-1, %eax
676 jmp .L85
677 .LFE72:
678 .size __GI_key_get_conv, .-__GI_key_get_conv
679 .globl __EI_key_get_conv
680 .set __EI_key_get_conv,__GI_key_get_conv
681 .p2align 4,,15
682 .globl __rpc_thread_key_cleanup
683 .hidden __rpc_thread_key_cleanup
684 .type __rpc_thread_key_cleanup, @function
685 __rpc_thread_key_cleanup:
686 .LFB76:
687 pushq %rbx
688 call __rpc_thread_variables
689 movq 200(%rax), %rbx
690 testq %rbx, %rbx
691 je .L90
692 movq (%rbx), %rax
693 testq %rax, %rax
694 je .L92
695 movq (%rax), %rdi
696 testq %rdi, %rdi
697 je .L93
698 movq 56(%rdi), %rax
699 call *32(%rax)
700 movq (%rbx), %rax
701 .L93:
702 movq 8(%rax), %rdx
703 movq %rax, %rdi
704 call *32(%rdx)
705 .L92:
706 movq %rbx, %rdi
707 popq %rbx
708 jmp free@PLT
709 .p2align 4,,10
710 .p2align 3
711 .L90:
712 popq %rbx
714 .LFE76:
715 .size __rpc_thread_key_cleanup, .-__rpc_thread_key_cleanup
716 .local keycall_lock
717 .comm keycall_lock,4,4
718 .globl __key_gendes_LOCAL
719 .bss
720 .align 8
721 .type __key_gendes_LOCAL, @object
722 .size __key_gendes_LOCAL, 8
723 __key_gendes_LOCAL:
724 .zero 8
725 .globl __key_decryptsession_pk_LOCAL
726 .align 8
727 .type __key_decryptsession_pk_LOCAL, @object
728 .size __key_decryptsession_pk_LOCAL, 8
729 __key_decryptsession_pk_LOCAL:
730 .zero 8
731 .globl __key_encryptsession_pk_LOCAL
732 .align 8
733 .type __key_encryptsession_pk_LOCAL, @object
734 .size __key_encryptsession_pk_LOCAL, 8
735 __key_encryptsession_pk_LOCAL:
736 .zero 8
737 .section .rodata.cst16,"aM",@progbits,16
738 .align 16
739 .type tottimeout, @object
740 .size tottimeout, 16
741 tottimeout:
742 .quad 60
743 .quad 0
744 .align 16
745 .type trytimeout, @object
746 .size trytimeout, 16
747 trytimeout:
748 .quad 5
749 .quad 0
750 .hidden __lll_lock_wait_private
751 .hidden __getpeername
752 .hidden __geteuid
753 .hidden __rpc_thread_variables