From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by sourceware.org (Postfix) with ESMTPS id 512513858C2D for ; Fri, 13 May 2022 01:55:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 512513858C2D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=xen0n.name Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xen0n.name DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1652406924; bh=PsTShSGAVb1hzeXlEnhTPtSvicD0GH/IkW7Zs+MaYWQ=; h=Date:Subject:To:References:From:In-Reply-To:From; b=gD4atjVQU4+vWmCeN3YIOiAJ11tG7IvPPBNgDbLU+uPsXtRaS2nhuSqJGKfvCpMEf JttOHHa6NDa+H7qHms72Nf1b9yJsQ09NBWSz1vLUFURlRUx8w3tIGG7aLRD3QG1GNH RD3u05TAibY9NpBX+9htTLmwbx02Mt9TBcC6c2Sc= Received: from [192.168.9.172] (unknown [101.88.28.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mailbox.box.xen0n.name (Postfix) with ESMTPSA id 73542600B5; Fri, 13 May 2022 09:55:24 +0800 (CST) Message-ID: Date: Fri, 13 May 2022 09:55:23 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.0a1 Subject: Re: [PATCH 2/2] partial revert 5a91f93b983184c64b3a9332f5f4339d17941d76 Content-Language: en-US To: Huang Pei , Zhensong Liu , binutils , Chenghua Xu References: <20220513013523.85151-1-huangpei@loongson.cn> <20220513013523.85151-2-huangpei@loongson.cn> From: WANG Xuerui In-Reply-To: <20220513013523.85151-2-huangpei@loongson.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-15.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2022 01:55:31 -0000 Hi, On 5/13/22 09:35, Huang Pei wrote: > set elf_backend_default_execstack=0 on loongarch Please provide reasons for the change; while I and other people familiar with those lower-level details can somehow guess it's because contemporary architectures really prefer non-executable stacks by default, for enhancing security, it's better to be explicit. Plus, please format the subject lines of both your patches, so they conform to the repo's conventions. I think they should look like "LoongArch: Do foo" or "bfd: LoongArch: Do foo", looking at a few recent commits on various components. > --- > bfd/elfnn-loongarch.c | 1 + > ld/testsuite/ld-elf/elf.exp | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c > index e4cd9fa107e..94c8e8269d3 100644 > --- a/bfd/elfnn-loongarch.c > +++ b/bfd/elfnn-loongarch.c > @@ -130,6 +130,7 @@ struct loongarch_elf_link_hash_table > #define elf_backend_got_header_size (GOT_ENTRY_SIZE * 1) > > #define elf_backend_want_dynrelro 1 > +#define elf_backend_default_execstack 0 > > /* Generate a PLT header. */ > > diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp > index ebb5ba090bf..e33a0d08831 100644 > --- a/ld/testsuite/ld-elf/elf.exp > +++ b/ld/testsuite/ld-elf/elf.exp > @@ -186,6 +186,7 @@ proc target_defaults_to_execstack {} { > || [istarget "*-*-nacl"] > || [istarget "arc*-*-*"] > || [istarget "ia64*-*-*"] > + || [istarget "loongarch*-*-*"] > || [istarget "nios2*-*-*"] > || [istarget "powerpc64*-*-*"] > || [istarget "riscv*-*-*"]