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]
Message-ID: <f2685d7c8dc14792a4e0f9807f742ea6@intel.com>
Date:   Wed, 28 Jul 2021 22:57:07 +0000
From:   "Luck, Tony" <tony.luck@...el.com>
To:     "Hansen, Dave" <dave.hansen@...el.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Jarkko Sakkinen <jarkko@...nel.org>
CC:     "x86@...nel.org" <x86@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v3 1/7] x86/sgx: Provide indication of life-cycle of EPC
 pages

> Wouldn't it be safer to do something like:
>
>	page->owner = owner ? owner : (void *)-1;
>
> -1 is non-NULL, but also invalid, which makes it harder for us to poke
> ourselves in the eye.

Does Linux have some #define INVALID_POINTER thing that
provides a guaranteed bad (e.g. non-canonical) value?

(void *)-1 seems hacky.

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ