Re: [PATCH v3 03/17] mm: add generic __va_function and __pa_function macros

2021-03-25 Thread Sami Tolvanen
On Thu, Mar 25, 2021 at 3:17 AM Mark Rutland wrote: > > On Wed, Mar 24, 2021 at 08:54:18AM -0700, Sami Tolvanen wrote: > > On Wed, Mar 24, 2021 at 12:14 AM Christoph Hellwig > > wrote: > > > > > > On Tue, Mar 23, 2021 at 01:39:32PM -0700, Sami Tolvanen wrote: > > > > With CONFIG_CFI_CLANG, the

Re: [PATCH v3 03/17] mm: add generic __va_function and __pa_function macros

2021-03-25 Thread Mark Rutland
On Wed, Mar 24, 2021 at 08:54:18AM -0700, Sami Tolvanen wrote: > On Wed, Mar 24, 2021 at 12:14 AM Christoph Hellwig wrote: > > > > On Tue, Mar 23, 2021 at 01:39:32PM -0700, Sami Tolvanen wrote: > > > With CONFIG_CFI_CLANG, the compiler replaces function addresses > > > in instrumented C code with

Re: [PATCH v3 03/17] mm: add generic __va_function and __pa_function macros

2021-03-24 Thread Sami Tolvanen
On Wed, Mar 24, 2021 at 12:14 AM Christoph Hellwig wrote: > > On Tue, Mar 23, 2021 at 01:39:32PM -0700, Sami Tolvanen wrote: > > With CONFIG_CFI_CLANG, the compiler replaces function addresses > > in instrumented C code with jump table addresses. This means that > > __pa_symbol(function) returns

Re: [PATCH v3 03/17] mm: add generic __va_function and __pa_function macros

2021-03-24 Thread Christoph Hellwig
On Tue, Mar 23, 2021 at 01:39:32PM -0700, Sami Tolvanen wrote: > With CONFIG_CFI_CLANG, the compiler replaces function addresses > in instrumented C code with jump table addresses. This means that > __pa_symbol(function) returns the physical address of the jump table > entry instead of the actual

[PATCH v3 03/17] mm: add generic __va_function and __pa_function macros

2021-03-23 Thread Sami Tolvanen
With CONFIG_CFI_CLANG, the compiler replaces function addresses in instrumented C code with jump table addresses. This means that __pa_symbol(function) returns the physical address of the jump table entry instead of the actual function, which may not work as the jump table code will immediately