diff mbox series

[v2,05/16] powerpc: Skip objtool from running on drivers/crypto/vmx/aesp8-ppc.o

Message ID 20220829055223.24767-6-sv@linux.ibm.com (mailing list archive)
State Superseded
Headers show
Series objtool: Enable and implement --mcount option on powerpc | expand

Commit Message

Sathvika Vasireddy Aug. 29, 2022, 5:52 a.m. UTC
With objtool enabled, below warnings are seen when trying to build:

drivers/crypto/vmx/aesp8-ppc.o: warning: objtool: aes_p8_set_encrypt_key+0x44: unannotated intra-function call

drivers/crypto/vmx/aesp8-ppc.o: warning: objtool: .text+0x2448: unannotated intra-function call

drivers/crypto/vmx/aesp8-ppc.o: warning: objtool: .text+0x2d68: unannotated intra-function call

Skip objtool from running on this file, for two main reasons:

Since this file comes from OpenSSL, and since it is a perl file
which generates a .S file, it may not be the best choice to
make too many code changes to such files, unless absolutely
necessary.

Second reason is that, at least as far as the objtool --mcount
functionality is concerned, we do not have to run objtool on
that file because that file does not have any calls to _mcount.

Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
---
 drivers/crypto/vmx/Makefile | 2 ++
 1 file changed, 2 insertions(+)

Comments

Christophe Leroy Aug. 30, 2022, 6:26 a.m. UTC | #1
Le 29/08/2022 à 07:52, Sathvika Vasireddy a écrit :
> With objtool enabled, below warnings are seen when trying to build:
> 
> drivers/crypto/vmx/aesp8-ppc.o: warning: objtool: aes_p8_set_encrypt_key+0x44: unannotated intra-function call
> 
> drivers/crypto/vmx/aesp8-ppc.o: warning: objtool: .text+0x2448: unannotated intra-function call
> 
> drivers/crypto/vmx/aesp8-ppc.o: warning: objtool: .text+0x2d68: unannotated intra-function call
> 
> Skip objtool from running on this file, for two main reasons:
> 
> Since this file comes from OpenSSL, and since it is a perl file
> which generates a .S file, it may not be the best choice to
> make too many code changes to such files, unless absolutely
> necessary.
> 
> Second reason is that, at least as far as the objtool --mcount
> functionality is concerned, we do not have to run objtool on
> that file because that file does not have any calls to _mcount.
> 
> Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>

Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>

> ---
>   drivers/crypto/vmx/Makefile | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/crypto/vmx/Makefile b/drivers/crypto/vmx/Makefile
> index 2560cfea1dec..7b41f0da6807 100644
> --- a/drivers/crypto/vmx/Makefile
> +++ b/drivers/crypto/vmx/Makefile
> @@ -9,3 +9,5 @@ targets += aesp8-ppc.S ghashp8-ppc.S
>   
>   $(obj)/aesp8-ppc.S $(obj)/ghashp8-ppc.S: $(obj)/%.S: $(src)/%.pl FORCE
>   	$(call if_changed,perl)
> +
> +OBJECT_FILES_NON_STANDARD_aesp8-ppc.o := y
Peter Zijlstra Sept. 1, 2022, 7:17 p.m. UTC | #2
On Mon, Aug 29, 2022 at 11:22:12AM +0530, Sathvika Vasireddy wrote:
> With objtool enabled, below warnings are seen when trying to build:
> 
> drivers/crypto/vmx/aesp8-ppc.o: warning: objtool: aes_p8_set_encrypt_key+0x44: unannotated intra-function call
> 
> drivers/crypto/vmx/aesp8-ppc.o: warning: objtool: .text+0x2448: unannotated intra-function call
> 
> drivers/crypto/vmx/aesp8-ppc.o: warning: objtool: .text+0x2d68: unannotated intra-function call
> 
> Skip objtool from running on this file, for two main reasons:
> 
> Since this file comes from OpenSSL, and since it is a perl file
> which generates a .S file, it may not be the best choice to
> make too many code changes to such files, unless absolutely
> necessary.
> 
> Second reason is that, at least as far as the objtool --mcount
> functionality is concerned, we do not have to run objtool on
> that file because that file does not have any calls to _mcount.
> 
> Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
> ---
>  drivers/crypto/vmx/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/crypto/vmx/Makefile b/drivers/crypto/vmx/Makefile
> index 2560cfea1dec..7b41f0da6807 100644
> --- a/drivers/crypto/vmx/Makefile
> +++ b/drivers/crypto/vmx/Makefile
> @@ -9,3 +9,5 @@ targets += aesp8-ppc.S ghashp8-ppc.S
>  
>  $(obj)/aesp8-ppc.S $(obj)/ghashp8-ppc.S: $(obj)/%.S: $(src)/%.pl FORCE
>  	$(call if_changed,perl)
> +
> +OBJECT_FILES_NON_STANDARD_aesp8-ppc.o := y

Just be aware that the moment you start to run objtool on vmlinux.o this
annotation becomes unstuck.

Specifically things like LTO builds require this because there simply
isn't an object file before that.
Naveen N. Rao Sept. 5, 2022, 10:47 a.m. UTC | #3
Peter Zijlstra wrote:
> On Mon, Aug 29, 2022 at 11:22:12AM +0530, Sathvika Vasireddy wrote:
>> With objtool enabled, below warnings are seen when trying to build:
>> 
>> drivers/crypto/vmx/aesp8-ppc.o: warning: objtool: aes_p8_set_encrypt_key+0x44: unannotated intra-function call
>> 
>> drivers/crypto/vmx/aesp8-ppc.o: warning: objtool: .text+0x2448: unannotated intra-function call
>> 
>> drivers/crypto/vmx/aesp8-ppc.o: warning: objtool: .text+0x2d68: unannotated intra-function call
>> 
>> Skip objtool from running on this file, for two main reasons:
>> 
>> Since this file comes from OpenSSL, and since it is a perl file
>> which generates a .S file, it may not be the best choice to
>> make too many code changes to such files, unless absolutely
>> necessary.
>> 
>> Second reason is that, at least as far as the objtool --mcount
>> functionality is concerned, we do not have to run objtool on
>> that file because that file does not have any calls to _mcount.
>> 
>> Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
>> ---
>>  drivers/crypto/vmx/Makefile | 2 ++
>>  1 file changed, 2 insertions(+)
>> 
>> diff --git a/drivers/crypto/vmx/Makefile b/drivers/crypto/vmx/Makefile
>> index 2560cfea1dec..7b41f0da6807 100644
>> --- a/drivers/crypto/vmx/Makefile
>> +++ b/drivers/crypto/vmx/Makefile
>> @@ -9,3 +9,5 @@ targets += aesp8-ppc.S ghashp8-ppc.S
>>  
>>  $(obj)/aesp8-ppc.S $(obj)/ghashp8-ppc.S: $(obj)/%.S: $(src)/%.pl FORCE
>>  	$(call if_changed,perl)
>> +
>> +OBJECT_FILES_NON_STANDARD_aesp8-ppc.o := y
> 
> Just be aware that the moment you start to run objtool on vmlinux.o this
> annotation becomes unstuck.
> 
> Specifically things like LTO builds require this because there simply
> isn't an object file before that.

Good point. LTO isn't supported today with ftrace on powerpc, so I guess 
we are ok with this patch for now.

To add LTO support, I guess we will need to add some annotations to this 
file later on.


- Naveen
diff mbox series

Patch

diff --git a/drivers/crypto/vmx/Makefile b/drivers/crypto/vmx/Makefile
index 2560cfea1dec..7b41f0da6807 100644
--- a/drivers/crypto/vmx/Makefile
+++ b/drivers/crypto/vmx/Makefile
@@ -9,3 +9,5 @@  targets += aesp8-ppc.S ghashp8-ppc.S
 
 $(obj)/aesp8-ppc.S $(obj)/ghashp8-ppc.S: $(obj)/%.S: $(src)/%.pl FORCE
 	$(call if_changed,perl)
+
+OBJECT_FILES_NON_STANDARD_aesp8-ppc.o := y