|
From: | Daniele Buono |
Subject: | Re: [PATCH v2 0/2] gitlab-ci.yml: Add jobs to test CFI |
Date: | Tue, 2 Mar 2021 08:18:03 -0500 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
On 3/2/2021 5:30 AM, Daniel P. Berrangé wrote:
On Mon, Mar 01, 2021 at 03:39:42PM -0500, Daniele Buono wrote:Hi Daniel, On 3/1/2021 10:08 AM, Daniel P. Berrangé wrote:What are the unique failure scenarios for CFI that these jobs are likely to expose ? Is it likely that we'll have cases where CFI succeeds in say, x86_64 target, but fails in aarch64 target ?For CFI to fail (even if it shouldn't) you'll need code that is calling a function pointer that was not well defined at compile time. Although unlikely, that could happen everywhere in the code.What does "was not well defined" mean here ?
At high level, the compiler creates metadata for every function. Before jumping to a function pointer, it makes sure that the pointer and the pointee have matching types. Not well defined means one of these two cases: 1. The function has a different type than the pointer -> Most likely an error 2. The function was not available at compile time so the compiler could not create the related metadata -> Most likely a false positive. Thanks, Daniele
[Prev in Thread] | Current Thread | [Next in Thread] |