From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by sourceware.org (Postfix) with ESMTPS id D746D3858CDA for ; Mon, 5 Feb 2024 18:12:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D746D3858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D746D3858CDA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::634 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707156771; cv=none; b=eiKZYHeNmLfR/wFV/tMzbGd6+cdNhrSs73ZshqjsHbSA7Oe1ZiafqDIl/cxfthjBNMI1EzMNfJv69DUFKcJ7YFBzUN10B3Nr6ydlvVUYyYXUFvAkuh4UZpxDum73pgFnivo1jvCEuwmfR428cZwOAthvYHZMaHuW3i7/Tt2DsNE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707156771; c=relaxed/simple; bh=jDhKPkwvG0sILRJb287HOSgDi6S7K2M1ziJzhZURS84=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=nPVVzJQ+IThd5RwY2X4xRU0k+tt1NfB8EKPfEe0+ptbrs0Uc3QNmkgy5jGPDye0nM9lYNyJl0dh+ZAv0kDr2ck+5Z7nbNORb//wxSCrGL9xvO+r0KEGZA7ZDlc+cL1fHNYP+dCor2N249H5M89+SUa+WGAItojp9Bne4eA61ldI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1d731314e67so31462105ad.1 for ; Mon, 05 Feb 2024 10:12:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707156769; x=1707761569; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=VeP60lSJKoD8Byln3ueQHJvchsQpq+j2sDpXM09Ycuw=; b=KpvnXJ5IAZ2rfm9bRva/6sOyqGVm33Tr6EJ780iSg7a5nIvfSHbczrnRMq8ZC2qVUz T482Zew/666XkAwCnyuikPv/FrFEIANvj1R1qyxDzimkrZALQ3UfD5xg7z+NmkHAclu8 2bnuwxzBLk9Gsl2iOZ7FNUBmPUi+PjtGP57YhLDuF+dDv+r2wu22W8rEDqA4a5cfFMX+ LzaTFuQ1B8qKpkl70PmWCBweAz6orfb5A78MUaJi58LCbbov07zu/Sn9jhwdxe4kjWZO PUHBxQ2iUMcJOCJML7nLHNzJu3+5QHP0vurPD1/Gre097/UQFV4jdI307zr5psaZnMLN HTUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707156769; x=1707761569; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VeP60lSJKoD8Byln3ueQHJvchsQpq+j2sDpXM09Ycuw=; b=JVlp8pgUBSVE7rCSlqE9qZF5zXpxKWQH5QQIDoa6Dn8iW6uy3KQmmdaYRqYereGBTg jICZZ2W3f/umEZYvxomHkvDpXBK5BL5T6A00qxphO94Uq9z3PAeCTK+UpdCgNTUJitpc 0ITxWt+F+SNH/k7Wzb6cdlVMBOBdqtpk2YwyKZqBZBGSZNAKb4Oe9HUHlC+dbp3tHE0L AfLXBo+2SvW6t78n7U0V+Vw0Zn0BNKQoz3pmbZtsSaRU8wO+a4QuYWoqv8QihZrDi6am njO5pxJfsZTD3Vil+/3m0BrO/CD44XW7e9DmdZwMU04cXVSL4KEZeUM6m8ZHIWXXHUm/ cgQg== X-Gm-Message-State: AOJu0Yw+pg2cIEmra8xe2WpapkYj1eQMgxHVESCpRaq2QsFY3paa4Q2b HkH6a5UOk+bu4Sa3ZbzWYP2OWgd5PJW/Gtht0vR+p6veJMJpixTDwRVOhzEPJ54= X-Google-Smtp-Source: AGHT+IEGLHLoHdKatx3iD67JhA67EKhK/0okjEQa/cePTcUFojEii6hyu3WqdFfmU5gklRv1JfiIJg== X-Received: by 2002:a17:902:f552:b0:1d9:732e:8fe6 with SMTP id h18-20020a170902f55200b001d9732e8fe6mr351324plf.16.1707156768977; Mon, 05 Feb 2024 10:12:48 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCU/LU3EOsNhVapHBWt7rXQUAC1u6eIMO8+ktKxpXBtOb/kOmDz0g5yKjUrqRKRpH4U48ahovYl/Kq7+z4VbVTyIAhnjc1j/2RPK Received: from ?IPV6:2804:1b3:a7c3:574b:f1c3:db83:b701:fe0f? ([2804:1b3:a7c3:574b:f1c3:db83:b701:fe0f]) by smtp.gmail.com with ESMTPSA id kk6-20020a170903070600b001d8dd636705sm156891plb.190.2024.02.05.10.12.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Feb 2024 10:12:48 -0800 (PST) Message-ID: <878ccbd7-55a8-4129-af0b-2a5d25544f15@linaro.org> Date: Mon, 5 Feb 2024 15:12:46 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] string: Add hidden builtin definition for __strcpy_chk. Content-Language: en-US To: Stefan Liebler , libc-alpha@sourceware.org References: <20240205132206.1603576-1-stli@linux.ibm.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20240205132206.1603576-1-stli@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,URIBL_BLACK 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: On 05/02/24 10:22, Stefan Liebler wrote: > Otherwise on at least x86_64 and s390x there is an unwanted PLT entry > in libc.so when configured with --enable-fortify-source and build > with -Os. I think it would be useful to add that it also requires --enable-fortify-source=3 to trigger it. > > This is observed in elf/check-localplt > Extra PLT reference: libc.so: __strcpy_chk > > The call to PLT entry is in inet/ruserpass.c. LGTM, thanks. Reviewed-by: Adhemerval Zanella > --- > debug/strcpy_chk.c | 1 + > include/string.h | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/debug/strcpy_chk.c b/debug/strcpy_chk.c > index e54780ddde..dd2c453417 100644 > --- a/debug/strcpy_chk.c > +++ b/debug/strcpy_chk.c > @@ -31,3 +31,4 @@ __strcpy_chk (char *dest, const char *src, size_t destlen) > > return memcpy (dest, src, len + 1); > } > +libc_hidden_builtin_def (__strcpy_chk) > diff --git a/include/string.h b/include/string.h > index 86d1fa4abe..3b4c6007d7 100644 > --- a/include/string.h > +++ b/include/string.h > @@ -215,6 +215,7 @@ libc_hidden_builtin_proto (__mempcpy_chk) > libc_hidden_builtin_proto (__memset_chk) > libc_hidden_builtin_proto (__stpcpy_chk) > libc_hidden_builtin_proto (__strncpy_chk) > +libc_hidden_builtin_proto (__strcpy_chk) > > #endif >