summaryrefslogtreecommitdiff
path: root/fetch_struct_keyctl_kdf_params.c
blob: 50fc9d1110c8489940489b706011736ce8a53186 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "defs.h"

#include DEF_MPERS_TYPE(struct_keyctl_kdf_params)

#include "keyctl_kdf_params.h"
typedef struct keyctl_kdf_params struct_keyctl_kdf_params;

#include MPERS_DEFS

MPERS_PRINTER_DECL(int, fetch_keyctl_kdf_params, struct tcb *const tcp,
		   kernel_ulong_t addr, struct strace_keyctl_kdf_params *p)
{
	struct_keyctl_kdf_params kdf;
	int ret;

	if ((ret = umove(tcp, addr, &kdf)))
		return ret;

	p->hashname = (kernel_ulong_t)
#ifndef IN_MPERS
		(uintptr_t)
#endif
		kdf.hashname;
	p->otherinfo = (kernel_ulong_t)
#ifndef IN_MPERS
		(uintptr_t)
#endif
		kdf.otherinfo;
	p->otherinfolen = kdf.otherinfolen;

	memcpy(p->__spare, kdf.__spare, sizeof(kdf.__spare));

	return 0;
}