lkml.org 
[lkml]   [2018]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] x86: pad assembly functions with INT3
Date
From: Alexey Dobriyan
> Sent: 07 May 2018 22:38
>
> Use INT3 instead of NOP. All that padding between functions is
> an illegal area, no legitimate code should jump into it.
>
> I've checked x86_64 allyesconfig disassembly, all changes looks sane:
> INT3 is only used after RET or unconditional JMP.

I thought there was a performance penalty (on at least some cpu)
depending on the number of and the actual instructions used for padding.

I believe that is why gcc generates a small number of very long 'nop'
instructions when padding code.

David

\
 
 \ /
  Last update: 2018-05-10 18:39    [W:0.099 / U:5.108 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site