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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 16 Sep 2021 08:37:31 -0700
From:   Reinette Chatre <reinette.chatre@...el.com>
To:     Jarkko Sakkinen <jarkko@...nel.org>, <linux-sgx@...r.kernel.org>,
        <shuah@...nel.org>
CC:     <seanjc@...gle.com>, <bp@...en8.de>, <dave.hansen@...ux.intel.com>,
        <linux-kselftest@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 12/14] selftests/sgx: Add page permission and exception
 test

Hi Jarkko,

On 9/16/2021 8:21 AM, Jarkko Sakkinen wrote:
> On Wed, 2021-09-15 at 13:31 -0700, Reinette Chatre wrote:

...

>> +/*
>> + * Return the offset in the enclave where the data segment can be found.
>> + * The first RW segment loaded is the TCS, skip that to get info on the
>> + * data segment.
>> + */
>> +static off_t encl_get_data_offset(struct encl *encl)
>> +{
>> +	int i;
>> +
>> +	for (i = 0; i < encl->nr_segments; i++) {
>> +		struct encl_segment *seg = &encl->segment_tbl[i];
>> +
>> +		if (i != 0 && seg->prot == (PROT_READ | PROT_WRITE))
>> +			return seg->offset;
> 
> So, why not
> 
> 	for (i = 1; i < encl->nr_segments; i++)
> 
> ?

Thank you for catching this. Will do.

Reinette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ