From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by sourceware.org (Postfix) with ESMTPS id 679993858D37 for ; Wed, 2 Mar 2022 19:09:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 679993858D37 Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-2d07ae0b1c4so29462537b3.11 for ; Wed, 02 Mar 2022 11:09:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fqNpBOPCUzVqMK23jEV1k8pK5Yf/m3bFFSggmhyVsSA=; b=xgm9GAihuBtsXJB8CzKkosbMt4/XRBsxKECz//u3FaCeBlfLJRDOqmUUQvDopFPzTi qwqMXma105RIrtlcvuIdJodZ5fzLywpzgz9r4IYCBPwrKMRUsqJL4hz8jHYXELifVxvL MLtd9F/CU+1mAdoCmv3IDsZnGSccMe31f5/p+6E6LgW21IbS9DDKdXAfXoEWELnXdkwe PbCSrLxLm7d3d1AS+s/wZwYN9GKse4XZzduPQ9YR/1F8kM5N6F1omGBQE4viOlp9VGl3 0H5+oAGpBpQOsOKMhhPR6MvXuFWil00rdb1Unl6Fktk1V1wPxiTdd1TqdGS7eYP+oBR+ yyww== X-Gm-Message-State: AOAM530WgAB9eCUS8TR+r8OUcR2yhN//6wNH4XkhdyUwZGYT1hs77jN8 AiV+RMMdOeFTzWPdGe+83cagSWPyucjc7NObOiI= X-Google-Smtp-Source: ABdhPJzsxd5gHm8nnvQuo8yn7CKUuo1QAf6Gu/0uTAY0IK9mu7E9VzXhIRvVO7ACpDtM29Zsys/Cn6d4ccvofbJqmTk= X-Received: by 2002:a81:5389:0:b0:2db:6d7a:93ca with SMTP id h131-20020a815389000000b002db6d7a93camr17369033ywb.11.1646248158929; Wed, 02 Mar 2022 11:09:18 -0800 (PST) MIME-Version: 1.0 References: <87o82ok616.fsf@oldenburg.str.redhat.com> In-Reply-To: <87o82ok616.fsf@oldenburg.str.redhat.com> From: Reinoud Koornstra Date: Wed, 2 Mar 2022 11:09:06 -0800 Message-ID: Subject: Re: Fortify_source and stack-protector-strong To: Florian Weimer Cc: Reinoud Koornstra via Gcc-help X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2022 19:09:20 -0000 Hi Florian, Thanks very much for your reply. -D_FORTIFY_SOURCE=1 is just during compile time and -D_FORTIFY_SOURCE=2 also has runtime checks for variable length? Thanks, Reinoud On Wed, Mar 2, 2022, 2:22 AM Florian Weimer wrote: > * Reinoud Koornstra via Gcc-help: > > > Is it possible to compile with -stack-protector-strong and > > FORTIFY_SOURCE=1 or =2? Or should both be used exclusively from > > another? Both check for similar things. > > They complement each other. I think most distributions use both these > days (-fstack-protector-strong and -D_FORTIFY_SOURCE=2). > > Thanks, > Florian > >