Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1645448
| From | Jiri Slaby <jslaby@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 04/29] x86: assembly, use ENDPROC for functions |
| Date | 2017-05-19 11:20 +0200 |
| Message-ID | <tIMeK-8ro-5@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <tyHJo-6SD-29@gated-at.bofh.it> <tAkfD-408-3@gated-at.bofh.it> <tGdEv-1eG-25@gated-at.bofh.it> <tGr4J-2RP-5@gated-at.bofh.it> <tI7bA-3B5-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 05/17/2017, 03:23 PM, Jiri Slaby wrote:
>> So the initial CFI state is different between the two types of
>> "functions". And there are a lot of other differences. C-type
>> functions have to follow frame pointer conventions, for example. So
>> your FUNC_START macro (and objtool) would have to somehow figure out a
>> way to make a distinction between the two. So it would probably work
>> out better if we kept the distinction between C-type functions and other
>> code.
>
> Ok, that makes a lot of sense.
A quick question:
Do you consider these to be C-type functions?
ENTRY(function_hook)
ret
END(function_hook)
or this?
ENTRY(native_load_gs_index)
pushfq
DISABLE_INTERRUPTS(CLBR_ANY & ~CLBR_RDI)
SWAPGS
movl %edi, %gs
SWAPGS
popfq
ret
END(native_load_gs_index)
Both are called from C, but they do not setup frame pointer etc.
thanks,
--
js
suse labs
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v3 04/29] x86: assembly, use ENDPROC for functions Jiri Slaby <jslaby@suse.cz> - 2017-05-12 10:00 +0200
Re: [PATCH v3 04/29] x86: assembly, use ENDPROC for functions Josh Poimboeuf <jpoimboe@redhat.com> - 2017-05-13 00:20 +0200
Re: [PATCH v3 04/29] x86: assembly, use ENDPROC for functions Jiri Slaby <jslaby@suse.cz> - 2017-05-17 15:30 +0200
Re: [PATCH v3 04/29] x86: assembly, use ENDPROC for functions Jiri Slaby <jslaby@suse.cz> - 2017-05-19 11:20 +0200
Re: [PATCH v3 04/29] x86: assembly, use ENDPROC for functions Josh Poimboeuf <jpoimboe@redhat.com> - 2017-05-19 22:00 +0200
csiph-web