From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16476 invoked from network); 29 Dec 2020 10:21:07 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 29 Dec 2020 10:21:07 -0000 Received: (qmail 20477 invoked by uid 550); 29 Dec 2020 10:21:03 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 20456 invoked from network); 29 Dec 2020 10:21:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=darkkirb.de; s=mail; t=1609237251; bh=oZDCIrxLse7G6tB0WbcSZ1QuaVp08Lkj5fMps90wByA=; h=Subject:To:References:From:Date:In-Reply-To; b=OqJ8d692W1mSExdTjqrZtb9C7OLAuu5ETORndgym+o3Slb8c74rs7nzYjYgnrxyh9 OHP21qz5P1knfdStFc806t4JkyHC5WfNBPC41Q1KTbOflVv8+bon3p0/QIwjPjv553 uSpIxJs2zaPc05skXyeJ7CdiHVQzp3pud1JTxPAk= To: musl@lists.openwall.com References: <6106be97-2c82-75c0-ad88-2e49b17c68ee@darkkirb.de> <20201227230554.ddflrnbmyvjccj4n@gmail.com> <20201228005632.rezxjuehsgmr5ira@gmail.com> <0326d35a-4c1d-3d25-1917-166e5b580062@darkkirb.de> <865734a3-e4c6-eb06-5855-db74c00fb071@darkkirb.de> From: Charlotte Delenk Message-ID: <104266ac-6da3-0fac-2394-54dca6675270@darkkirb.de> Date: Tue, 29 Dec 2020 11:20:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [musl] [PATCH] Add support for LLVM's Control Flow Integrity (V2) 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 >