From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 604A9387688C for ; Fri, 30 Jun 2023 15:38:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 604A9387688C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688139527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JYrtALb3DccOU5YFdsX0aSzfVHb3yInrBDVP5fcTeqw=; b=fp22EnMzlA3QoRI+qIZ2rMbbv4TBqPgGWFgKArbErxSFiY1tGb3dtsYe9zUIRCzw8C2DXe vxXxCpfcPmTuZaHRT/pPoG1NUWm5eMrawvtwKNWK4h6YFTgqsProo1wGsilZMsQqYm7EEG Ci6zOiWUjzScA3IhKGtoLgN/tZ82slU= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-437-vvLAZzT2Psa_QhhABuZVzw-1; Fri, 30 Jun 2023 11:38:45 -0400 X-MC-Unique: vvLAZzT2Psa_QhhABuZVzw-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-9879d2fc970so149622366b.0 for ; Fri, 30 Jun 2023 08:38:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688139524; x=1690731524; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JYrtALb3DccOU5YFdsX0aSzfVHb3yInrBDVP5fcTeqw=; b=lvhCu/XUokOMC/HBPYrG5XYOErKkfKMENQXMUc5v9Id0XAMwODNEgEsF55dtTIaCzg Us5Wp8/EeeSj5QTfpNP9FnCMlTCijvyiHDqwNO8f/nF747qOw+GDFcm4hX/4vHSKKRA/ dG6Zg0c2iIBVulSiqilQtFuwuWet0soRupDKxJCIBLu6zb8ivJ7jaeNS1UEEBRUftWd/ FDnFNCfp3dcsfDG/LpiukZ19hPCfxh8rqZcL0kU69K/edjIUvVsfEs31SX84t3LVx85f ywtacJQeOzk/6o2ylNx6aaL9qi8hlnYF/1Go6YcmKqG/O437K3ZokWBvumOQMUP3FWUJ J8Vg== X-Gm-Message-State: ABy/qLZv7f69+cc+9ybYn80/wOvM51DiY+Qy3LVkZnCfvMe0dTsX/Mi0 uoa5nnD1IJT+NH2CioPLecKgGGxBK6TQDbHLE6f6fMf8xgtWczjnaHFCqGoFIHjNRQ7VxE0i0H5 fIdwA+QR0nC8IRePu/GwR0gq2Y1tnEhmzkde3M8iodfJA X-Received: by 2002:a17:906:b811:b0:992:ba2c:2e0f with SMTP id dv17-20020a170906b81100b00992ba2c2e0fmr2273283ejb.30.1688139523872; Fri, 30 Jun 2023 08:38:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5CDlmqZcGAe4/NgSqIXFjGO3+og82T7mBGUyrH3A6iUuAc1HhZfPZTwGRs8bLTeEoHjcu//f+eNG3mqFyRh9Q= X-Received: by 2002:a17:906:b811:b0:992:ba2c:2e0f with SMTP id dv17-20020a170906b81100b00992ba2c2e0fmr2273275ejb.30.1688139523634; Fri, 30 Jun 2023 08:38:43 -0700 (PDT) MIME-Version: 1.0 References: <20230628084246.778302-1-fberat@redhat.com> <20230628084246.778302-15-fberat@redhat.com> <514ef51d-5501-5af9-baf6-4885cbcd9fc7@gotplt.org> In-Reply-To: <514ef51d-5501-5af9-baf6-4885cbcd9fc7@gotplt.org> From: Frederic Berat Date: Fri, 30 Jun 2023 17:38:32 +0200 Message-ID: Subject: Re: [PATCH v3 14/16] libio/bits/stdio2-decl.h: Avoid PLT entries with _FORTIFY_SOURCE To: Siddhesh Poyarekar Cc: libc-alpha@sourceware.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="000000000000a3495705ff5a9c48" X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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 List-Id: --000000000000a3495705ff5a9c48 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jun 30, 2023 at 5:30=E2=80=AFPM Siddhesh Poyarekar wrote: > > > On 2023-06-28 04:42, Fr=C3=A9d=C3=A9ric B=C3=A9rat wrote: > > The change is meant to avoid unwanted PLT entry for the fgets_unlocked > > routine when _FORTIFY_SOURCE is set. > > --- > > libio/bits/stdio2-decl.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libio/bits/stdio2-decl.h b/libio/bits/stdio2-decl.h > > index 114b06d24b..d7ef7283d6 100644 > > --- a/libio/bits/stdio2-decl.h > > +++ b/libio/bits/stdio2-decl.h > > @@ -122,7 +122,7 @@ extern size_t __fread_chk (void *__restrict __ptr, > size_t __ptrlen, > > FILE *__restrict __stream) __wur; > > > > #ifdef __USE_GNU > > -extern char *__REDIRECT (__fgets_unlocked_alias, > > +extern char *__REDIRECT_FORTIFY (__fgets_unlocked_alias, > > (char *__restrict __s, int __n, > > FILE *__restrict __stream), fgets_unlocked) > > __wur __attr_access ((__write_only__, 1, 2)); > > Why not the same for all the others? > I tend to avoid modifying things that are not strictly necessary. If that happens to be needed on other aliases, then everything is ready for it, but it seems I didn't stumbled upon a case where it was ... When you look at it, the same way I didn't create libc_hidden_def/proto for all the routines here (like e.g. __fread_chk) if that wasn't needed. > > Sid > > --000000000000a3495705ff5a9c48--