lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220218061640.444038-1-xianting.tian@linux.alibaba.com>
Date:   Fri, 18 Feb 2022 14:16:40 +0800
From:   Xianting Tian <xianting.tian@...ux.alibaba.com>
To:     bcrl@...ck.org, viro@...iv.linux.org.uk
Cc:     linux-aio@...ck.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Xianting Tian <xianting.tian@...ux.alibaba.com>
Subject: [PATCH] aio: make io return value more readable

We may need to enable the debug prints in aio_complete when met io error
issue. We got below prints, fffffffffffffffb means the io err is EIO(-5),
but it's not readable.
[   33.304182] aio_complete: 00000000b3c70ea0[17]: 00000000cd131d11: 0000000023803e77 3fc2b160f0 fffffffffffffffb 0

Below prints are more readable, the value(-5) matches the errno defined
in include/uapi/asm-generic/errno-base.h,
[   98.187270] aio_complete: 00000000220ae523[10]: 00000000045ed171: 000000004c334ae4 3fc211a330 -5 0

Signed-off-by: Xianting Tian <xianting.tian@...ux.alibaba.com>
---
 fs/aio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/aio.c b/fs/aio.c
index 4ceba13a7..45a9ff3d2 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1140,7 +1140,7 @@ static void aio_complete(struct aio_kiocb *iocb)
 	kunmap_atomic(ev_page);
 	flush_dcache_page(ctx->ring_pages[pos / AIO_EVENTS_PER_PAGE]);
 
-	pr_debug("%p[%u]: %p: %p %Lx %Lx %Lx\n", ctx, tail, iocb,
+	pr_debug("%p[%u]: %p: %p %Lx %Ld %Ld\n", ctx, tail, iocb,
 		 (void __user *)(unsigned long)iocb->ki_res.obj,
 		 iocb->ki_res.data, iocb->ki_res.res, iocb->ki_res.res2);
 
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ