mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Charlotte Delenk <darkkirb@darkkirb.de>
To: musl@lists.openwall.com
Subject: Re: [musl] [PATCH] Add support for LLVM's Control Flow Integrity (V2)
Date: Tue, 29 Dec 2020 11:20:41 +0100	[thread overview]
Message-ID: <104266ac-6da3-0fac-2394-54dca6675270@darkkirb.de> (raw)
In-Reply-To: <F4C8EA33-9721-47A5-BEC6-5A29A7072989@shiz.me>

On 12/28/20 6:01 PM, Shiz wrote:
> Hi,
>
> It seems to me guarding all of those with #ifdef __clang__ is not the optimal approach.
> What if another compilers decides to pick up the spec, or an older non-CFI
> Clang is used to compile? I think it's more logical to check the no_sanitize attribute
> with a functional test (like __has_attribute),
As Rich Felker wrote in an email i haven't yet received in my mailbox, 
he thinks it's better to put the exceptions in the Makefile. I'm going 
to update the patch accordingly (and split in two, one for GCC and LLVM 
LTO fixes and one for CFI)
> and to just apply the used attribute unconditionally.
The used attribute is a workaround for a LLVM bug that has existed for 
quite some time. GCC does not have a problem with the functions marked 
used, but instead requires _dlstart_c to be marked as such.
>
> - Shiz
>

  parent reply	other threads:[~2020-12-29 10:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-27 17:53 [musl] [PATCH] Add support for LLVM's Control Flow Integrity Charlotte Delenk
2020-12-27 23:05 ` Fangrui Song
2020-12-28  0:56   ` Fangrui Song
2020-12-28  9:20     ` Charlotte Delenk
2020-12-28 13:17       ` [musl] [PATCH] Add support for LLVM's Control Flow Integrity (V2) Charlotte Delenk
2020-12-28 17:01         ` Shiz
2020-12-29  1:26           ` Rich Felker
2020-12-29 10:20           ` Charlotte Delenk [this message]
2020-12-29 11:56             ` [musl] [PATCH 1/2] Fix LTO shared library build on GCC and Clang Charlotte Delenk
2020-12-29 11:59             ` [musl] [PATCH 2/2] Add support for LLVM's Control Flow Integrity Charlotte Delenk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=104266ac-6da3-0fac-2394-54dca6675270@darkkirb.de \
    --to=darkkirb@darkkirb.de \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).