From nobody Tue Jul 16 05:12:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WNRz50TD3z5R1By; Tue, 16 Jul 2024 05:12:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WNRz463qnz4hyx; Tue, 16 Jul 2024 05:12:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721106768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jlZWmQMBljwOg5w/hhfQeBuWwNQRxNS11GMOSGvMcX8=; b=H28E00VqkVAbd4p0SbNqruRzxHp3aM+fwuQ24FMnwjTh9/0Mca9USUbL5pGPAHuLdtq/FY oVcIkhEOqh4z0yT46EwjizOEs+rnVAHEf5evymOiTvIK/KKHu8rPaAayvqjpv3E7OTDDQ/ cWEe4kCGgZPsGin3SYv+ZL7B3hJdVAPpoqwdMp4x0uhWlxeMql9FvwakCRohPoB9EJv8Ys pgL6rPw1/wifBdOltYQVzsYCvASg1lbeXHbKWb3Tkez4EJZPMYlHVxwSzBVJIhu6pd+BdP xXbVpisp3AOYZPKDm0+S2MZy+Ftq/Y6kbB4uqZ+a1GpQ09Wi9XioB/mOB2Titw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721106768; a=rsa-sha256; cv=none; b=ZtEgsw1RWbqn+07tzaWTDTAFxR3UatrSrHLJCHBreKp2ilPIzbecDj3C4OGEJqjsjPQS2N 4N6XhhuGq88eEMYrYplAFAqLTOiBqJzyBzkMTd9UwLJEiFg1iDJPSoRSYKE/KR5FiEI/QN nIsiMXVt8deSBkMXj0cL9if3R5tjzIxCrBoW8eOuMTmo6ptcGl3whLtZGcj031Wtz33Zrt tuWZCsbV/yemtNQVbBGghuGw946NN2OenwFe4yYg29cs7CIQOP+y4P+WyC+ikcsOnuHuVr bca+8RM0T2Qont5hplc83KbcFqb+UkF9YmJHWrF+S+Pd07+l9qks4xFMYNollg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721106768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jlZWmQMBljwOg5w/hhfQeBuWwNQRxNS11GMOSGvMcX8=; b=CcH9dGxiUy7Q5SUV1cd5MHTodjQ3X33wkfC8znSZ+9HDe+5svsxvmMUNpgQz2lGFI8drOL vs6Xj98q7KdyssmvbpPKtwethgMApnXly6cupMGXRzy9Ae4pkrenBvU4pYKzF/5Y4yBuN5 moiG60d5m7EZgsHvqSYhzAZEHyALs2BCoMG12izKFIkfDSlkAWaaHnaIZtMyXJqq5w1lBB XsvNhc8Sb8umuy0uzZrUcf6pmnbtxc6cm6EwlPXT92nqr6IJ6saCGrK5bo5GpTdhIsIUFY dvVWqDFMJlYbdF0h6HANzvGV8LdYcR+hFMcSOaA4YT6fZNS1RNX14Z34s0UQRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WNRz45gZ8zNQ2; Tue, 16 Jul 2024 05:12:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46G5Cmx7056554; Tue, 16 Jul 2024 05:12:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46G5CmgB056551; Tue, 16 Jul 2024 05:12:48 GMT (envelope-from git) Date: Tue, 16 Jul 2024 05:12:48 GMT Message-Id: <202407160512.46G5CmgB056551@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: d5f8270917bf - main - libc: switch to __weak_symbol for fortified interpose stubs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5f8270917bfee4242778544b990bb7f82f8a4de Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=d5f8270917bfee4242778544b990bb7f82f8a4de commit d5f8270917bfee4242778544b990bb7f82f8a4de Author: Kyle Evans AuthorDate: 2024-07-16 05:12:28 +0000 Commit: Kyle Evans CommitDate: 2024-07-16 05:12:28 +0000 libc: switch to __weak_symbol for fortified interpose stubs GCC doesn't like `#pragma weak macro(foo)`, but that's fine; just slap a __weak_symbol on the definition to more reliably make it weak anyways. Reviewed by: kib (earlier version), markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45976 --- lib/libc/sys/poll.c | 3 +-- lib/libc/sys/ppoll.c | 3 +-- lib/libc/sys/readv.c | 3 +-- lib/libc/sys/recvfrom.c | 3 +-- lib/libc/sys/recvmsg.c | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/libc/sys/poll.c b/lib/libc/sys/poll.c index 7a418afbbf49..5e000f7e728f 100644 --- a/lib/libc/sys/poll.c +++ b/lib/libc/sys/poll.c @@ -36,8 +36,7 @@ __weak_reference(__sys_poll, __poll); -#pragma weak __ssp_real(poll) -int +int __weak_symbol __ssp_real(poll)(struct pollfd pfd[], nfds_t nfds, int timeout) { return (INTERPOS_SYS(poll, pfd, nfds, timeout)); diff --git a/lib/libc/sys/ppoll.c b/lib/libc/sys/ppoll.c index ef72a902548b..72c0b5d5e421 100644 --- a/lib/libc/sys/ppoll.c +++ b/lib/libc/sys/ppoll.c @@ -36,8 +36,7 @@ __weak_reference(__sys_ppoll, __ppoll); -#pragma weak __ssp_real(ppoll) -int +int __weak_symbol __ssp_real(ppoll)(struct pollfd pfd[], nfds_t nfds, const struct timespec *__restrict timeout, const sigset_t *__restrict newsigmask) diff --git a/lib/libc/sys/readv.c b/lib/libc/sys/readv.c index d58dba1fc47e..2729f6ed99da 100644 --- a/lib/libc/sys/readv.c +++ b/lib/libc/sys/readv.c @@ -38,8 +38,7 @@ __weak_reference(__sys_readv, __readv); -#pragma weak readv -ssize_t +ssize_t __weak_symbol __ssp_real(readv)(int fd, const struct iovec *iov, int iovcnt) { return (INTERPOS_SYS(readv, fd, iov, iovcnt)); diff --git a/lib/libc/sys/recvfrom.c b/lib/libc/sys/recvfrom.c index 6247b315d078..0cdbd8a4ccaa 100644 --- a/lib/libc/sys/recvfrom.c +++ b/lib/libc/sys/recvfrom.c @@ -37,8 +37,7 @@ __weak_reference(__sys_recvfrom, __recvfrom); -#pragma weak recvfrom -ssize_t +ssize_t __weak_symbol __ssp_real(recvfrom)(int s, void *buf, size_t len, int flags, struct sockaddr * __restrict from, socklen_t * __restrict fromlen) { diff --git a/lib/libc/sys/recvmsg.c b/lib/libc/sys/recvmsg.c index 334049d6cfad..ce0f5e0478cd 100644 --- a/lib/libc/sys/recvmsg.c +++ b/lib/libc/sys/recvmsg.c @@ -37,8 +37,7 @@ __weak_reference(__sys_recvmsg, __recvmsg); -#pragma weak recvmsg -ssize_t +ssize_t __weak_symbol __ssp_real(recvmsg)(int s, struct msghdr *msg, int flags) { return (INTERPOS_SYS(recvmsg, s, msg, flags));