[<prev] [next>] [day] [month] [year] [list]
Message-ID: <160578254433.11244.9036967823695962289.tip-bot2@tip-bot2>
Date: Thu, 19 Nov 2020 10:42:24 -0000
From: "tip-bot2 for Jarkko Sakkinen" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Haitao Huang <haitao.huang@...el.com>,
Jarkko Sakkinen <jarkko@...nel.org>,
Borislav Petkov <bp@...e.de>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: x86/sgx] x86/sgx: Return -ERESTARTSYS in sgx_ioc_enclave_add_pages()
The following commit has been merged into the x86/sgx branch of tip:
Commit-ID: 14132a5b807bb5caf778fe7ae1597e630971e949
Gitweb: https://git.kernel.org/tip/14132a5b807bb5caf778fe7ae1597e630971e949
Author: Jarkko Sakkinen <jarkko@...nel.org>
AuthorDate: Wed, 18 Nov 2020 23:39:32 +02:00
Committer: Borislav Petkov <bp@...e.de>
CommitterDate: Thu, 19 Nov 2020 10:51:24 +01:00
x86/sgx: Return -ERESTARTSYS in sgx_ioc_enclave_add_pages()
Return -ERESTARTSYS instead of -EINTR in sgx_ioc_enclave_add_pages()
when interrupted before any pages have been processed. At this point
ioctl can be obviously safely restarted.
Reported-by: Haitao Huang <haitao.huang@...el.com>
Signed-off-by: Jarkko Sakkinen <jarkko@...nel.org>
Signed-off-by: Borislav Petkov <bp@...e.de>
Link: https://lkml.kernel.org/r/20201118213932.63341-1-jarkko@kernel.org
---
arch/x86/kernel/cpu/sgx/ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpu/sgx/ioctl.c b/arch/x86/kernel/cpu/sgx/ioctl.c
index 6d37117..30aefc9 100644
--- a/arch/x86/kernel/cpu/sgx/ioctl.c
+++ b/arch/x86/kernel/cpu/sgx/ioctl.c
@@ -444,7 +444,7 @@ static long sgx_ioc_enclave_add_pages(struct sgx_encl *encl, void __user *arg)
for (c = 0 ; c < add_arg.length; c += PAGE_SIZE) {
if (signal_pending(current)) {
if (!c)
- ret = -EINTR;
+ ret = -ERESTARTSYS;
break;
}
Powered by blists - more mailing lists