All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests/x86: Fix malformed src_offset initialization
@ 2020-11-17 22:36 Jarkko Sakkinen
  2020-11-18 11:11 ` Borislav Petkov
  2020-11-18 17:19 ` Borislav Petkov
  0 siblings, 2 replies; 23+ messages in thread
From: Jarkko Sakkinen @ 2020-11-17 22:36 UTC (permalink / raw)
  To: linux-sgx
  Cc: Jarkko Sakkinen, Borislav Petkov, Shuah Khan, linux-kselftest,
	akpm, andriy.shevchenko, asapek, cedric.xing, chenalexchen,
	conradparker, cyhanish, dave.hansen, haitao.huang, kai.huang,
	kai.svahn, kmoy, ludloff, luto, nhorman, npmccallum, puiterwijk,
	rientjes, sean.j.christopherson, tglx, yaozhangx, mikko.ylinen

Assign src_offset just to the p_offset, when first initialized.
This has been probably copy-pasting accident (at least looks like
it).

Cc: Borislav Petkov <bp@alien8.de>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
---
 tools/testing/selftests/sgx/load.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/sgx/load.c b/tools/testing/selftests/sgx/load.c
index 07988de6b767..64976f266bae 100644
--- a/tools/testing/selftests/sgx/load.c
+++ b/tools/testing/selftests/sgx/load.c
@@ -185,7 +185,7 @@ bool encl_load(const char *path, struct encl *encl)
 		}
 
 		if (j == 0) {
-			src_offset = (phdr->p_offset & PAGE_MASK) - src_offset;
+			src_offset = (phdr->p_offset & PAGE_MASK);
 
 			seg->prot = PROT_READ | PROT_WRITE;
 			seg->flags = SGX_PAGE_TYPE_TCS << 8;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2020-11-19 18:05 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17 22:36 [PATCH] selftests/x86: Fix malformed src_offset initialization Jarkko Sakkinen
2020-11-18 11:11 ` Borislav Petkov
2020-11-18 11:18   ` Jethro Beekman
2020-11-18 11:44     ` Borislav Petkov
2020-11-18 11:47       ` Borislav Petkov
2020-11-18 11:49         ` Borislav Petkov
2020-11-18 15:24         ` Jarkko Sakkinen
2020-11-18 15:30           ` Jarkko Sakkinen
2020-11-18 12:00       ` Jethro Beekman
2020-11-18 12:15         ` Borislav Petkov
2020-11-18 15:27           ` Jarkko Sakkinen
2020-11-18 17:09         ` Jarkko Sakkinen
2020-11-18 15:07   ` Jarkko Sakkinen
2020-11-18 17:19 ` Borislav Petkov
2020-11-18 17:58   ` Jarkko Sakkinen
2020-11-18 18:04     ` Borislav Petkov
2020-11-18 21:37       ` Jarkko Sakkinen
2020-11-18 21:54         ` Borislav Petkov
2020-11-19  1:16           ` Andy Lutomirski
2020-11-19 16:44             ` Jarkko Sakkinen
2020-11-19 16:41           ` Jarkko Sakkinen
2020-11-19 18:04             ` Borislav Petkov
2020-11-19  1:05         ` Dr. Greg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.