+/*
+ * Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
#include "defs.h"
-#include <linux/keyctl.h>
typedef int32_t key_serial_t;
-static const struct xlat key_spec[] = {
- XLAT(KEY_SPEC_THREAD_KEYRING),
- XLAT(KEY_SPEC_PROCESS_KEYRING),
- XLAT(KEY_SPEC_SESSION_KEYRING),
- XLAT(KEY_SPEC_USER_KEYRING),
- XLAT(KEY_SPEC_USER_SESSION_KEYRING),
- XLAT(KEY_SPEC_GROUP_KEYRING),
- XLAT(KEY_SPEC_REQKEY_AUTH_KEY),
- XLAT(KEY_SPEC_REQUESTOR_KEYRING),
- XLAT_END
+#include "xlat/key_spec.h"
+
+struct keyctl_dh_params {
+ int32_t private;
+ int32_t prime;
+ int32_t base;
};
static void
print_keyring_serial_number(key_serial_t id)
{
- const char *str = xlookup(key_spec, id);
+ const char *str = xlookup(key_spec, (unsigned int) id);
if (str)
tprints(str);
tprintf("%d", id);
}
-int
-sys_add_key(struct tcb *tcp)
+SYS_FUNC(add_key)
{
- if (entering(tcp)) {
- /* type */
- printstr(tcp, tcp->u_arg[0], -1);
- /* description */
- tprints(", ");
- printstr(tcp, tcp->u_arg[1], -1);
- /* payload */
- tprints(", ");
- printstr(tcp, tcp->u_arg[2], tcp->u_arg[3]);
- /* payload length */
- tprintf(", %lu, ", tcp->u_arg[3]);
- /* keyring serial number */
- print_keyring_serial_number(tcp->u_arg[4]);
- }
- return 0;
+ /* type */
+ printstr(tcp, tcp->u_arg[0]);
+ /* description */
+ tprints(", ");
+ printstr(tcp, tcp->u_arg[1]);
+ /* payload */
+ tprints(", ");
+ printstrn(tcp, tcp->u_arg[2], tcp->u_arg[3]);
+ /* payload length */
+ tprintf(", %" PRI_klu ", ", tcp->u_arg[3]);
+ /* keyring serial number */
+ print_keyring_serial_number(tcp->u_arg[4]);
+
+ return RVAL_DECODED;
}
-int
-sys_request_key(struct tcb *tcp)
+SYS_FUNC(request_key)
{
- if (entering(tcp)) {
- /* type */
- printstr(tcp, tcp->u_arg[0], -1);
- /* description */
- tprints(", ");
- printstr(tcp, tcp->u_arg[1], -1);
- /* callout_info */
- tprints(", ");
- printstr(tcp, tcp->u_arg[2], -1);
- /* keyring serial number */
- tprints(", ");
- print_keyring_serial_number(tcp->u_arg[3]);
- }
- return 0;
+ /* type */
+ printstr(tcp, tcp->u_arg[0]);
+ /* description */
+ tprints(", ");
+ printstr(tcp, tcp->u_arg[1]);
+ /* callout_info */
+ tprints(", ");
+ printstr(tcp, tcp->u_arg[2]);
+ /* keyring serial number */
+ tprints(", ");
+ print_keyring_serial_number(tcp->u_arg[3]);
+
+ return RVAL_DECODED;
}
-static int
+static void
keyctl_get_keyring_id(struct tcb *tcp, key_serial_t id, int create)
{
- if (entering(tcp)) {
- tprints(", ");
- print_keyring_serial_number(id);
- tprintf(", %d", create);
- }
- return 0;
-}
-
-static int
-keyctl_join_session_keyring(struct tcb *tcp, long addr)
-{
- if (entering(tcp)) {
- tprints(", ");
- printstr(tcp, addr, -1);
- }
- return 0;
-}
-
-static int
-keyctl_update_key(struct tcb *tcp, key_serial_t id, long addr, long len)
-{
- if (entering(tcp)) {
- tprints(", ");
- print_keyring_serial_number(id);
- tprints(", ");
- printstr(tcp, addr, len);
- tprintf(", %lu", len);
- }
- return 0;
+ print_keyring_serial_number(id);
+ tprintf(", %d", create);
}
-static int
-keyctl_handle_key(struct tcb *tcp, key_serial_t id)
+static void
+keyctl_update_key(struct tcb *tcp, key_serial_t id, kernel_ulong_t addr,
+ kernel_ulong_t len)
{
- if (entering(tcp)) {
- tprints(", ");
- print_keyring_serial_number(id);
- }
- return 0;
+ print_keyring_serial_number(id);
+ tprints(", ");
+ printstrn(tcp, addr, len);
+ tprintf(", %llu", zero_extend_signed_to_ull(len));
}
-static int
+static void
keyctl_handle_key_key(struct tcb *tcp, key_serial_t id1, key_serial_t id2)
{
- if (entering(tcp)) {
- tprints(", ");
- print_keyring_serial_number(id1);
- tprints(", ");
- print_keyring_serial_number(id2);
- }
- return 0;
+ print_keyring_serial_number(id1);
+ tprints(", ");
+ print_keyring_serial_number(id2);
}
-static int
-keyctl_read_key(struct tcb *tcp, key_serial_t id, long addr, long len)
+static void
+keyctl_read_key(struct tcb *tcp, key_serial_t id, kernel_ulong_t addr,
+ kernel_ulong_t len, bool has_nul)
{
if (entering(tcp)) {
- tprints(", ");
print_keyring_serial_number(id);
tprints(", ");
} else {
- if (addr && syserror(tcp))
- tprintf("%#lx", addr);
+ if (syserror(tcp))
+ printaddr(addr);
else {
- long rval = tcp->u_rval > len ?
- len : (tcp->u_rval ? -1 : 0);
- printstr(tcp, addr, rval);
+ kernel_ulong_t rval = (tcp->u_rval >= 0) &&
+ ((kernel_ulong_t) tcp->u_rval > len) ? len :
+ (kernel_ulong_t) tcp->u_rval;
+ printstr_ex(tcp, addr, rval, has_nul ?
+ QUOTE_OMIT_TRAILING_0 : 0);
}
- tprintf(", %lu", len);
+ tprintf(", %llu", zero_extend_signed_to_ull(len));
}
- return 0;
}
-static int
-keyctl_keyring_search(struct tcb *tcp, key_serial_t id1, long addr1,
- long addr2, key_serial_t id2)
+static void
+keyctl_keyring_search(struct tcb *tcp, key_serial_t id1, kernel_ulong_t addr1,
+ kernel_ulong_t addr2, key_serial_t id2)
{
- if (entering(tcp)) {
- tprints(", ");
- print_keyring_serial_number(id1);
- tprints(", ");
- printstr(tcp, addr1, -1);
- tprints(", ");
- printstr(tcp, addr2, -1);
- tprints(", ");
- print_keyring_serial_number(id2);
- }
- return 0;
+ print_keyring_serial_number(id1);
+ tprints(", ");
+ printstr(tcp, addr1);
+ tprints(", ");
+ printstr(tcp, addr2);
+ tprints(", ");
+ print_keyring_serial_number(id2);
}
-static int
-keyctl_chown_key(struct tcb *tcp, key_serial_t id, int user, int group)
+static void
+keyctl_chown_key(struct tcb *tcp, key_serial_t id, unsigned user,
+ unsigned group)
{
- if (entering(tcp)) {
- tprints(", ");
- print_keyring_serial_number(id);
- tprintf(", %d, %d", user, group);
- }
- return 0;
+ print_keyring_serial_number(id);
+ printuid(", ", user);
+ printuid(", ", group);
}
-static int
-keyctl_instantiate_key(struct tcb *tcp, key_serial_t id1, long addr,
- long len, key_serial_t id2)
+static void
+keyctl_instantiate_key(struct tcb *tcp, key_serial_t id1, kernel_ulong_t addr,
+ kernel_ulong_t len, key_serial_t id2)
{
- if (entering(tcp)) {
- tprints(", ");
- print_keyring_serial_number(id1);
- tprints(", ");
- printstr(tcp, addr, len);
- tprintf(", %lu, ", len);
- print_keyring_serial_number(id2);
- }
- return 0;
+ print_keyring_serial_number(id1);
+ tprints(", ");
+ printstrn(tcp, addr, len);
+ tprintf(", %llu, ", zero_extend_signed_to_ull(len));
+ print_keyring_serial_number(id2);
}
-static int
+static void
keyctl_instantiate_key_iov(struct tcb *tcp, key_serial_t id1,
- long addr, long len, key_serial_t id2)
+ kernel_ulong_t addr, kernel_ulong_t len,
+ key_serial_t id2)
{
- if (entering(tcp)) {
- tprints(", ");
- print_keyring_serial_number(id1);
- tprints(", ");
- tprint_iov(tcp, len, addr, 1);
- tprintf(", %lu, ", len);
- print_keyring_serial_number(id2);
- }
- return 0;
+ print_keyring_serial_number(id1);
+ tprints(", ");
+ tprint_iov(tcp, len, addr, IOV_DECODE_STR);
+ tprintf(", %llu, ", zero_extend_signed_to_ull(len));
+ print_keyring_serial_number(id2);
}
-static int
+static void
keyctl_negate_key(struct tcb *tcp, key_serial_t id1, unsigned timeout,
key_serial_t id2)
{
- if (entering(tcp)) {
- tprints(", ");
- print_keyring_serial_number(id1);
- tprintf(", %u, ", timeout);
- print_keyring_serial_number(id2);
- }
- return 0;
+ print_keyring_serial_number(id1);
+ tprintf(", %u, ", timeout);
+ print_keyring_serial_number(id2);
}
-static int
+static void
keyctl_reject_key(struct tcb *tcp, key_serial_t id1, unsigned timeout,
unsigned error, key_serial_t id2)
{
- if (entering(tcp)) {
- tprints(", ");
- print_keyring_serial_number(id1);
- tprintf(", %u, %u, ", timeout, error);
- print_keyring_serial_number(id2);
- }
- return 0;
+ const char *err_str = err_name(error);
+
+ print_keyring_serial_number(id1);
+ tprintf(", %u, ", timeout);
+
+ if (err_str)
+ tprintf("%s, ", err_str);
+ else
+ tprintf("%u, ", error);
+
+ print_keyring_serial_number(id2);
}
-static int
+static void
keyctl_set_timeout(struct tcb *tcp, key_serial_t id, unsigned timeout)
{
- if (entering(tcp)) {
- tprints(", ");
- print_keyring_serial_number(id);
- tprintf(", %u", timeout);
- }
- return 0;
+ print_keyring_serial_number(id);
+ tprintf(", %u", timeout);
}
-static int
-keyctl_get_persistent(struct tcb *tcp, int uid, key_serial_t id)
+static void
+keyctl_get_persistent(struct tcb *tcp, unsigned uid, key_serial_t id)
{
- if (entering(tcp)) {
- tprintf(", %d, ", uid);
- print_keyring_serial_number(id);
- }
- return 0;
+ printuid("", uid);
+ tprints(", ");
+ print_keyring_serial_number(id);
}
-#define KEY_POS_VIEW 0x01000000
-#define KEY_POS_READ 0x02000000
-#define KEY_POS_WRITE 0x04000000
-#define KEY_POS_SEARCH 0x08000000
-#define KEY_POS_LINK 0x10000000
-#define KEY_POS_SETATTR 0x20000000
-#define KEY_POS_ALL 0x3f000000
-#define KEY_USR_VIEW 0x00010000
-#define KEY_USR_READ 0x00020000
-#define KEY_USR_WRITE 0x00040000
-#define KEY_USR_SEARCH 0x00080000
-#define KEY_USR_LINK 0x00100000
-#define KEY_USR_SETATTR 0x00200000
-#define KEY_USR_ALL 0x003f0000
-#define KEY_GRP_VIEW 0x00000100
-#define KEY_GRP_READ 0x00000200
-#define KEY_GRP_WRITE 0x00000400
-#define KEY_GRP_SEARCH 0x00000800
-#define KEY_GRP_LINK 0x00001000
-#define KEY_GRP_SETATTR 0x00002000
-#define KEY_GRP_ALL 0x00003f00
-#define KEY_OTH_VIEW 0x00000001
-#define KEY_OTH_READ 0x00000002
-#define KEY_OTH_WRITE 0x00000004
-#define KEY_OTH_SEARCH 0x00000008
-#define KEY_OTH_LINK 0x00000010
-#define KEY_OTH_SETATTR 0x00000020
-#define KEY_OTH_ALL 0x0000003f
-
-static const struct xlat key_perms[] = {
- XLAT(KEY_POS_VIEW),
- XLAT(KEY_POS_READ),
- XLAT(KEY_POS_WRITE),
- XLAT(KEY_POS_SEARCH),
- XLAT(KEY_POS_LINK),
- XLAT(KEY_POS_SETATTR),
- XLAT(KEY_POS_ALL),
- XLAT(KEY_USR_VIEW),
- XLAT(KEY_USR_READ),
- XLAT(KEY_USR_WRITE),
- XLAT(KEY_USR_SEARCH),
- XLAT(KEY_USR_LINK),
- XLAT(KEY_USR_SETATTR),
- XLAT(KEY_USR_ALL),
- XLAT(KEY_GRP_VIEW),
- XLAT(KEY_GRP_READ),
- XLAT(KEY_GRP_WRITE),
- XLAT(KEY_GRP_SEARCH),
- XLAT(KEY_GRP_LINK),
- XLAT(KEY_GRP_SETATTR),
- XLAT(KEY_GRP_ALL),
- XLAT(KEY_OTH_VIEW),
- XLAT(KEY_OTH_READ),
- XLAT(KEY_OTH_WRITE),
- XLAT(KEY_OTH_SEARCH),
- XLAT(KEY_OTH_LINK),
- XLAT(KEY_OTH_SETATTR),
- XLAT(KEY_OTH_ALL),
- XLAT_END
-};
+#include "xlat/key_perms.h"
-static int
+static void
keyctl_setperm_key(struct tcb *tcp, key_serial_t id, uint32_t perm)
{
- if (entering(tcp)) {
- tprints(", ");
- print_keyring_serial_number(id);
- tprints(", ");
- printflags(key_perms, perm, "KEY_???");
- }
- return 0;
+ print_keyring_serial_number(id);
+ tprints(", ");
+ printflags(key_perms, perm, "KEY_???");
}
-static const struct xlat key_reqkeys[] = {
- XLAT(KEY_REQKEY_DEFL_NO_CHANGE),
- XLAT(KEY_REQKEY_DEFL_DEFAULT),
- XLAT(KEY_REQKEY_DEFL_THREAD_KEYRING),
- XLAT(KEY_REQKEY_DEFL_PROCESS_KEYRING),
- XLAT(KEY_REQKEY_DEFL_SESSION_KEYRING),
- XLAT(KEY_REQKEY_DEFL_USER_KEYRING),
- XLAT(KEY_REQKEY_DEFL_USER_SESSION_KEYRING),
- XLAT(KEY_REQKEY_DEFL_GROUP_KEYRING),
- XLAT(KEY_REQKEY_DEFL_REQUESTOR_KEYRING),
- XLAT_END
-};
+static void
+print_dh_params(struct tcb *tcp, kernel_ulong_t addr)
+{
+ struct keyctl_dh_params params;
+
+ if (umove_or_printaddr(tcp, addr, ¶ms))
+ return;
+
+ tprints("{private=");
+ print_keyring_serial_number(params.private);
+ tprints(", prime=");
+ print_keyring_serial_number(params.prime);
+ tprints(", base=");
+ print_keyring_serial_number(params.base);
+ tprints("}");
+}
-static int
-keyctl_set_reqkey_keyring(struct tcb *tcp, int reqkey)
+static void
+keyctl_dh_compute(struct tcb *tcp, kernel_ulong_t params, kernel_ulong_t buf,
+ kernel_ulong_t len)
{
if (entering(tcp)) {
+ print_dh_params(tcp, params);
tprints(", ");
- printxval(key_reqkeys, reqkey, "KEY_REQKEY_DEFL_???");
+ } else {
+ if (syserror(tcp)) {
+ printaddr(buf);
+ } else {
+ kernel_ulong_t rval = (tcp->u_rval >= 0) &&
+ ((kernel_ulong_t) tcp->u_rval > len) ? len :
+ (kernel_ulong_t) tcp->u_rval;
+ printstrn(tcp, buf, rval);
+ }
+ tprintf(", %llu", zero_extend_signed_to_ull(len));
}
- return 0;
}
-static const struct xlat keyctl_commands[] = {
- XLAT(KEYCTL_GET_KEYRING_ID),
- XLAT(KEYCTL_JOIN_SESSION_KEYRING),
- XLAT(KEYCTL_UPDATE),
- XLAT(KEYCTL_REVOKE),
- XLAT(KEYCTL_CHOWN),
- XLAT(KEYCTL_SETPERM),
- XLAT(KEYCTL_DESCRIBE),
- XLAT(KEYCTL_CLEAR),
- XLAT(KEYCTL_LINK),
- XLAT(KEYCTL_UNLINK),
- XLAT(KEYCTL_SEARCH),
- XLAT(KEYCTL_READ),
- XLAT(KEYCTL_INSTANTIATE),
- XLAT(KEYCTL_NEGATE),
- XLAT(KEYCTL_SET_REQKEY_KEYRING),
- XLAT(KEYCTL_SET_TIMEOUT),
- XLAT(KEYCTL_ASSUME_AUTHORITY),
- XLAT(KEYCTL_GET_SECURITY),
- XLAT(KEYCTL_SESSION_TO_PARENT),
- XLAT(KEYCTL_REJECT),
- XLAT(KEYCTL_INSTANTIATE_IOV),
- XLAT(KEYCTL_INVALIDATE),
- XLAT(KEYCTL_GET_PERSISTENT),
- XLAT_END
-};
+#include "xlat/key_reqkeys.h"
+#include "xlat/keyctl_commands.h"
-int
-sys_keyctl(struct tcb *tcp)
+SYS_FUNC(keyctl)
{
int cmd = tcp->u_arg[0];
+ kernel_ulong_t arg2 = tcp->u_arg[1];
+ kernel_ulong_t arg3 = tcp->u_arg[2];
+ kernel_ulong_t arg4 = tcp->u_arg[3];
+ kernel_ulong_t arg5 = tcp->u_arg[4];
- if (entering(tcp))
+ if (entering(tcp)) {
printxval(keyctl_commands, cmd, "KEYCTL_???");
+ /*
+ * For now, KEYCTL_SESSION_TO_PARENT is the only cmd without
+ * arguments.
+ */
+ if (cmd != KEYCTL_SESSION_TO_PARENT)
+ tprints(", ");
+ }
+
switch (cmd) {
case KEYCTL_GET_KEYRING_ID:
- return keyctl_get_keyring_id(tcp, tcp->u_arg[1], tcp->u_arg[2]);
+ keyctl_get_keyring_id(tcp, arg2, arg3);
+ break;
case KEYCTL_JOIN_SESSION_KEYRING:
- return keyctl_join_session_keyring(tcp, tcp->u_arg[1]);
+ printstr(tcp, arg2);
+ break;
case KEYCTL_UPDATE:
- return keyctl_update_key(tcp, tcp->u_arg[1],
- tcp->u_arg[2], tcp->u_arg[3]);
+ keyctl_update_key(tcp, arg2, arg3, arg4);
+ break;
case KEYCTL_REVOKE:
case KEYCTL_CLEAR:
case KEYCTL_INVALIDATE:
case KEYCTL_ASSUME_AUTHORITY:
- return keyctl_handle_key(tcp, tcp->u_arg[1]);
+ print_keyring_serial_number(arg2);
+ break;
case KEYCTL_LINK:
case KEYCTL_UNLINK:
- return keyctl_handle_key_key(tcp, tcp->u_arg[1], tcp->u_arg[2]);
+ keyctl_handle_key_key(tcp, arg2, arg3);
+ break;
case KEYCTL_DESCRIBE:
case KEYCTL_READ:
case KEYCTL_GET_SECURITY:
- return keyctl_read_key(tcp, tcp->u_arg[1],
- tcp->u_arg[2], tcp->u_arg[3]);
+ keyctl_read_key(tcp, arg2, arg3, arg4, cmd != KEYCTL_READ);
+ return 0;
case KEYCTL_SEARCH:
- return keyctl_keyring_search(tcp, tcp->u_arg[1], tcp->u_arg[2],
- tcp->u_arg[3], tcp->u_arg[4]);
+ keyctl_keyring_search(tcp, arg2, arg3, arg4, arg5);
+ break;
case KEYCTL_CHOWN:
- return keyctl_chown_key(tcp, tcp->u_arg[1],
- tcp->u_arg[2], tcp->u_arg[3]);
+ keyctl_chown_key(tcp, arg2, arg3, arg4);
+ break;
case KEYCTL_SETPERM:
- return keyctl_setperm_key(tcp, tcp->u_arg[1], tcp->u_arg[2]);
+ keyctl_setperm_key(tcp, arg2, arg3);
+ break;
case KEYCTL_INSTANTIATE:
- return keyctl_instantiate_key(tcp, tcp->u_arg[1], tcp->u_arg[2],
- tcp->u_arg[3], tcp->u_arg[4]);
+ keyctl_instantiate_key(tcp, arg2, arg3, arg4, arg5);
+ break;
case KEYCTL_NEGATE:
- return keyctl_negate_key(tcp, tcp->u_arg[1],
- tcp->u_arg[2], tcp->u_arg[3]);
+ keyctl_negate_key(tcp, arg2, arg3, arg4);
+ break;
case KEYCTL_SET_REQKEY_KEYRING:
- return keyctl_set_reqkey_keyring(tcp, tcp->u_arg[1]);
+ printxval(key_reqkeys, arg2, "KEY_REQKEY_DEFL_???");
+ break;
case KEYCTL_SET_TIMEOUT:
- return keyctl_set_timeout(tcp, tcp->u_arg[1], tcp->u_arg[2]);
+ keyctl_set_timeout(tcp, arg2, arg3);
+ break;
case KEYCTL_SESSION_TO_PARENT:
- return 0;
+ break;
case KEYCTL_REJECT:
- return keyctl_reject_key(tcp, tcp->u_arg[1], tcp->u_arg[2],
- tcp->u_arg[3], tcp->u_arg[4]);
+ keyctl_reject_key(tcp, arg2, arg3, arg4, arg5);
+ break;
case KEYCTL_INSTANTIATE_IOV:
- return keyctl_instantiate_key_iov(tcp, tcp->u_arg[1],
- tcp->u_arg[2], tcp->u_arg[3],
- tcp->u_arg[4]);
+ keyctl_instantiate_key_iov(tcp, arg2, arg3, arg4, arg5);
+ break;
case KEYCTL_GET_PERSISTENT:
- return keyctl_get_persistent(tcp, tcp->u_arg[1], tcp->u_arg[2]);
+ keyctl_get_persistent(tcp, arg2, arg3);
+ break;
+
+ case KEYCTL_DH_COMPUTE:
+ keyctl_dh_compute(tcp, arg2, arg3, arg4);
+ return 0;
default:
- if (entering(tcp))
- tprintf(", %#lx, %#lx, %#lx, %#lx",
- tcp->u_arg[1], tcp->u_arg[2],
- tcp->u_arg[3], tcp->u_arg[4]);
+ tprintf("%#" PRI_klx ", %#" PRI_klx
+ ", %#" PRI_klx ", %#" PRI_klx,
+ arg2, arg3, arg4, arg5);
+ break;
}
- return 0;
+ return RVAL_DECODED;
}