From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 7C326385802B for ; Mon, 11 Jan 2021 17:40:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7C326385802B Received: by mail-pf1-x429.google.com with SMTP id m6so369828pfk.1 for ; Mon, 11 Jan 2021 09:40:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=M2gp2GWQUL+jBLipWBrcUnFkpT+hDK0i/jab7wJ7Sf0=; b=OAHV99wzVvHkyRCgkaXBvLcrMgEW8rESMUj1a27r4BiLO/AAtogP3+HJaF09pN7GTS GsXwKiulWbCSW4umKyaQslFARJNkdxOMx0w/GK1B7YFTQrPioZnRGaCTBG6vK8VdCBOr 2I++Kl6ziRnutzcmmqAxhgHsJxSbqod+a1YZ1NV/UzMmR3BoKXIX5UG5szHBcSYBw7f0 +r9Qbeu4qD2h0FSJtZ1Bb9w/eDAF3hpLP7Gqkw60vTuBFL6FxaBPsWVFbg/Jrw3rVMjK TGrKyMfife+IQth7Rxi8nWCM3HLJWJpofg/tXdyyBeH4a9VXl896Hb6Sc7Ob9db58CUL 9M6Q== X-Gm-Message-State: AOAM531e5hyRI+huQJQY5C8ol1hh9ULV1ytyZ7RYkVbHoKFCirZqw8Oh 8X0Lll/IpIIKVHwR72iMim43Sj/BY9AgTN5665EUsg== X-Google-Smtp-Source: ABdhPJz45TxKRf7m2e5xEZ/FnDfdpLTIX/Fl9hPxFO15YNGRSqqnqFadrok3dexDuPRM1qLF0pAaV4NX/EH43CrCYPw= X-Received: by 2002:a62:5ec5:0:b029:1ae:6847:fa02 with SMTP id s188-20020a625ec50000b02901ae6847fa02mr449241pfb.61.1610386825462; Mon, 11 Jan 2021 09:40:25 -0800 (PST) MIME-Version: 1.0 References: <20210111031210.4020603-1-maskray@google.com> <87h7nnrewa.fsf@oldenburg2.str.redhat.com> In-Reply-To: <87h7nnrewa.fsf@oldenburg2.str.redhat.com> From: =?UTF-8?B?RsSBbmctcnXDrCBTw7JuZw==?= Date: Mon, 11 Jan 2021 09:40:13 -0800 Message-ID: Subject: Re: [PATCH] Unconditionally define __stack_chk_guard [BZ #26817] To: Florian Weimer Cc: Fangrui Song via Libc-alpha Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-18.5 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2021 17:40:27 -0000 On Mon, Jan 11, 2021 at 1:39 AM Florian Weimer wrote: > > * Fangrui Song via Libc-alpha: > > > This makes -mstack-protector-guard=global work even if > > -mstack-protector-guard=tls is the default. > > It's unclear how you intend this to work. Is it just for building > glibc? Or also for user code? It is for user applications. gcc -fstack-protector -mstack-protector-guard=global a.c or clang -fstack-protector -mstack-protector-guard=global a.c (clang 12) Currently there is an undefined symbol error. This patch fixes the problem. > In the latter case, we either need to provide a way to initialize a > hidden __stack_chk_guard symbol (probably with new relocations), or > export __stack_chk_guard from glibc, under a GLIBC_2.33 symbol version > for architectures that were missing it before. In elf/Versions, __stack_chk_guard is already exported as __stack_chk_guard@@GLIBC_2.4 > Thanks, > Florian > -- > Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn, > Commercial register: Amtsgericht Muenchen, HRB 153243, > Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill >