Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1645448
| Path | csiph.com!news.redatomik.org!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Jiri Slaby <jslaby@suse.cz> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 04/29] x86: assembly, use ENDPROC for functions |
| Date | Fri, 19 May 2017 11:20:02 +0200 |
| Message-ID | <tIMeK-8ro-5@gated-at.bofh.it> (permalink) |
| References | <tyHzH-6Pl-7@gated-at.bofh.it> <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> |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5lhdztkeFIFFa21/jkUqua1kXVMqedmqBPzKxyi6Qmw=; b=tYskEsjB1xwVo1JnFd2kUJOvVWuXZcstZ4y9RMqdNL/JxZCmAMur+3PEttvK3wipe1 d6A7fki4uoQ+Ha9NO4arPvD2EmAWBRbXpJP5SzQjdYe+GdpGQnLX2922Tw9lJeROwGEf /r49MOwGgyvK0Jzp+lrfusPd8s4CgDC24RQKvc1k/PfTWVZ6Xp5p53whA7u7jxcEGX2i yiNiLlss92uMTAw49FR/6m7+jhmNgkf4mMyJGWXYsFyrSyRuNzPK4g50GxEsoL7wXySJ ZoYEGFlzpc3f5gqZ+xe8D5txW8k4bziiEc4EFWccVQlHj6EwS5UdkNyBH6W6zUzu1Rxj jc0g== |
| X-Gm-Message-State | AODbwcBKD0js9Y04PIscUAyrsiK0QWHDfiq3RIk7iZD0HNMt0/r2dcKq F/hrrwrkjxgDPQ== |
| X-Received | by 10.223.161.65 with SMTP id r1mr2596713wrr.114.1495185446218; Fri, 19 May 2017 02:17:26 -0700 (PDT) |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Language | en-GB |
| Content-Transfer-Encoding | 7bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 36 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org, Boris Ostrovsky <boris.ostrovsky@oracle.com>, Juergen Gross <jgross@suse.com>, xen-devel@lists.xenproject.org |
| X-Original-Date | Fri, 19 May 2017 11:17:24 +0200 |
| X-Original-Message-ID | <a78d080c-1d32-c47c-b5b5-b5f809faacb5@suse.cz> |
| X-Original-References | <20170421141305.25180-1-jslaby@suse.cz> <20170421141305.25180-4-jslaby@suse.cz> <20170426014217.hshjlweqsimaumuy@treble> <4c3b765e-483a-4d9b-c451-6eccc02403f3@suse.cz> <20170512221532.s2wuaoq65uvaprgq@treble> <4a63c996-6c86-c298-dd9c-34b77afc6f27@suse.cz> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1645448 |
Show key headers only | View raw
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