-----Original Message----- From: Jarkko Sakkinen jarkko@kernel.org Sent: Wednesday, August 17, 2022 7:39 AM To: Dhanraj, Vijay vijay.dhanraj@intel.com Cc: Chatre, Reinette reinette.chatre@intel.com; Dave Hansen dave.hansen@linux.intel.com; linux-sgx@vger.kernel.org; Shuah Khan shuah@kernel.org; open list:KERNEL SELFTEST FRAMEWORK <linux- kselftest@vger.kernel.org>; open list linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] selftests/sgx: Add SGX selftest augment_via_eaccept_long
On Wed, Aug 17, 2022 at 01:27:38AM +0000, Dhanraj, Vijay wrote:
I think changing it to "int i" will cause a buffer overflow with edmm_size being 8GB.
Hmm.. 'i' iterates segments. Amd I missing something?
BR, Jarkko
It is also used when iterating over pages to eaccept. This might cause an issue.
for (i = 0; i < edmm_size; i += 4096) { eaccept_op.epc_addr = (uint64_t)(addr + i);
Regards, Vijay