Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fetch_struct_keyctl_kdf_params.c 841B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) 2016-2018 Eugene Syromyatnikov <evgsyr@gmail.com>
  3. * All rights reserved.
  4. *
  5. * SPDX-License-Identifier: LGPL-2.1-or-later
  6. */
  7. #include "defs.h"
  8. #include DEF_MPERS_TYPE(struct_keyctl_kdf_params)
  9. #include "keyctl_kdf_params.h"
  10. typedef struct keyctl_kdf_params struct_keyctl_kdf_params;
  11. #include MPERS_DEFS
  12. MPERS_PRINTER_DECL(int, fetch_keyctl_kdf_params, struct tcb *const tcp,
  13. kernel_ulong_t addr, struct strace_keyctl_kdf_params *p)
  14. {
  15. struct_keyctl_kdf_params kdf;
  16. int ret;
  17. if ((ret = umove(tcp, addr, &kdf)))
  18. return ret;
  19. p->hashname = (kernel_ulong_t)
  20. #ifndef IN_MPERS
  21. (uintptr_t)
  22. #endif
  23. kdf.hashname;
  24. p->otherinfo = (kernel_ulong_t)
  25. #ifndef IN_MPERS
  26. (uintptr_t)
  27. #endif
  28. kdf.otherinfo;
  29. p->otherinfolen = kdf.otherinfolen;
  30. memcpy(p->__spare, kdf.__spare, sizeof(kdf.__spare));
  31. return 0;
  32. }