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 72D6D3858D28 for ; Sat, 4 Mar 2023 17:37:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 72D6D3858D28 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=1677951425; 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: in-reply-to:in-reply-to:references:references; bh=N/m6PA4MtMfqz2Cz/QmQ1ko/Y26BPGUW7x8Xqb7gmCA=; b=D6Id+ju/HWKxl4spqdsWWuFNe46qZoUd9IO7KR7d9S58On/n5dmn4JWt8rr2W9QTfYeZJX hENMrSvIdE4LBgNanPsnddkXypwJeb7wvz9BPMd9LhL3fWld/R3wfcD5gOSkXnCkp/Cw7T eaJXYzAEC/BZ/hkbz/evDR3ruvQ9GKQ= Received: from mail-il1-f200.google.com (mail-il1-f200.google.com [209.85.166.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-161-yMJSDkjMOCioopv5X6XFXA-1; Sat, 04 Mar 2023 12:37:03 -0500 X-MC-Unique: yMJSDkjMOCioopv5X6XFXA-1 Received: by mail-il1-f200.google.com with SMTP id t16-20020a92c0d0000000b00319bb6f4282so2975793ilf.20 for ; Sat, 04 Mar 2023 09:37:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677951422; 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=N/m6PA4MtMfqz2Cz/QmQ1ko/Y26BPGUW7x8Xqb7gmCA=; b=GFVDEkWZhQLf3lE04cfTjRnWtb0L7p9YsfI5saU70LPjRA8vYQfn/S1uxOVHVRfAfn hd0gpHllG004h/lS9b0aJCG5tCqhgjpm1R9lJQ1vXbuqeknlVQIkUiNWUGGceLXVigNt Ytu2tWisMNa0yObZyz0OTPGKlVRa+WCxai9sWGv1Sl9r71QtpTnfowIhD3yUFU5A+X3d v7t6ZaTFuuXvpQIN5LWPyNwhXlXB4FVIjZItkugnZy+ZnYyhdG06yhRpgqEyhwpbbmd4 C+cg2kZYoTrSfj1MrlyRFhPs8sN3DyJvnBDgjxXDWlRVszz4uv4T7Ugayu72H5Q2m7ET M33Q== X-Gm-Message-State: AO0yUKWX7YXdnaw0U0le+48hhSkB0nymbH87tkQzMmAdo4jL098dNKtj XBDg9m6wdhcr4rED5QPXyZHVIjvUWjNbxli01VSD9Z6gdum1w3h5uawC6YV0F5JGTYlvKEbuZWZ iaPoShPRLxGprBh+bvjoNCIGx2/Ay X-Received: by 2002:a05:6e02:1c23:b0:319:e144:80dd with SMTP id m3-20020a056e021c2300b00319e14480ddmr4180872ilh.27.1677951422367; Sat, 04 Mar 2023 09:37:02 -0800 (PST) X-Google-Smtp-Source: AK7set+chNlYYx5XYLHJWDkAHYE1cHH2mMwJ8r4CsGEmZFjISS7ioVr7hU3a7mr1OiJvwVIJOfd06Q== X-Received: by 2002:a05:6e02:1c23:b0:319:e144:80dd with SMTP id m3-20020a056e021c2300b00319e14480ddmr4180863ilh.27.1677951422121; Sat, 04 Mar 2023 09:37:02 -0800 (PST) Received: from [192.168.0.241] ([198.48.244.52]) by smtp.gmail.com with ESMTPSA id l5-20020a056638220500b003c4e02148e5sm1672000jas.53.2023.03.04.09.37.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Mar 2023 09:37:01 -0800 (PST) Message-ID: <53080af8-1818-5b3e-9a8a-015c138fba17@redhat.com> Date: Sat, 4 Mar 2023 12:37:00 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v3 0/4] Remove --with-default-link option To: Adhemerval Zanella , libc-alpha@sourceware.org, Florian Weimer References: <20221227211145.3765256-1-adhemerval.zanella@linaro.org> From: Carlos O'Donell Organization: Red Hat In-Reply-To: <20221227211145.3765256-1-adhemerval.zanella@linaro.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP 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 12/27/22 16:11, Adhemerval Zanella via Libc-alpha wrote: > The vtables hardening are not enabled with --with-default-link=no s/are/is/g > (tst-relro-libc fails [1]) and with --with-default-link=yes it also > requires ld.bfd to be available [2]. Furthermore, only lld 15 > supports custom RELRO sections in linker script, even though older > version does support building glibc for some architectures. s/version does/versions do/g > > The patchset removes the --with-default-link by replacing > libc_freeres_ptrs and libc_subfreeres with weak function calls, and by > refactoring the vtables hardening with a array placed directly on s/a/an/g s/on/in the/g Please post v4. > RELRO segment. > > [1] https://sourceware.org/bugzilla/show_bug.cgi?id=25812 > [2] https://sourceware.org/git/?p=glibc.git;a=commit;h=2ae7990542e1955097aa21943e416dec70f867fa > > Changes from v2: > - Add pragma weak for weakly called function at malloc/set-freeres.c. > - Remove _IO_str_*, _IO_new_file_*, and _IO_old_ from pragma weak directive. > > Adhemerval Zanella (4): > Move libc_freeres_ptrs and libc_subfreeres to hidden/weak functions > libio: Remove the usage of __libc_IO_vtables > Remove --with-default-link configure option > Remove set-hooks.h from generic includes > > INSTALL | 6 - > Makerules | 52 +- > config.make.in | 1 - > configure | 13 - > configure.ac | 7 - > crypt/md5-crypt.c | 7 +- > crypt/sha256-crypt.c | 7 +- > crypt/sha512-crypt.c | 7 +- > dlfcn/dlerror.h | 1 - > elf/Makefile | 18 +- > elf/dl-libc.c | 5 +- > grp/fgetgrent.c | 5 +- > gshadow/fgetsgent.c | 5 +- > {include => hurd}/set-hooks.h | 0 > iconv/gconv_cache.c | 3 +- > iconv/gconv_conf.c | 3 +- > iconv/gconv_db.c | 6 +- > iconv/gconv_dl.c | 5 +- > iconvdata/extra-module.mk | 2 +- > include/libc-symbols.h | 91 +--- > include/set-freeres.h | 142 +++++ > inet/getnameinfo.c | 5 +- > inet/getnetgrent.c | 5 +- > inet/rcmd.c | 5 +- > inet/rexec.c | 5 +- > intl/dcigettext.c | 3 +- > intl/finddomain.c | 2 +- > intl/loadmsgcat.c | 1 - > intl/localealias.c | 15 +- > libio/Makefile | 2 + > libio/fcloseall.c | 1 + > libio/fileops.c | 81 +-- > libio/genops.c | 8 +- > libio/iofopncook.c | 60 +-- > libio/iopopen.c | 25 - > libio/libio-macros.sym | 7 + > libio/libioP.h | 137 ++++- > libio/memstream.c | 32 +- > libio/oldfileops.c | 23 - > libio/oldiopopen.c | 23 - > libio/stdio.c | 3 + > libio/strfile.h | 2 - > libio/strops.c | 24 - > libio/tst-vtables-interposed.c | 5 + > libio/vtables.c | 497 ++++++++++++++++++ > libio/wfileops.c | 79 +-- > libio/wmemstream.c | 32 +- > libio/wstrops.c | 24 - > locale/loadarchive.c | 2 +- > locale/localeinfo.h | 4 +- > locale/setlocale.c | 4 +- > login/getutent.c | 5 +- > login/getutid.c | 6 +- > login/getutline.c | 5 +- > malloc/set-freeres.c | 156 +++++- > malloc/thread-freeres.c | 9 +- > manual/install.texi | 6 - > misc/efgcvt-template.c | 5 +- > misc/efgcvt.c | 1 + > misc/fstab.c | 3 +- > misc/hsearch.c | 4 - > misc/mntent.c | 5 +- > misc/qefgcvt.c | 1 + > misc/unwind-link.c | 2 +- > nptl/nptlfreeres.c | 1 - > nscd/nscd_getgr_r.c | 3 +- > nscd/nscd_gethst_r.c | 3 +- > nscd/nscd_getpw_r.c | 3 +- > nscd/nscd_getserv_r.c | 3 +- > nscd/nscd_netgroup.c | 3 +- > nss/getXXbyYY.c | 7 +- > nss/getXXent.c | 7 +- > nss/nss_action.c | 2 +- > nss/nss_action.h | 3 - > nss/nss_database.c | 2 +- > nss/nss_database.h | 3 - > nss/nss_module.c | 2 +- > nss/nss_module.h | 3 - > posix/regcomp.c | 3 +- > posix/register-atfork.c | 3 +- > pwd/fgetpwent.c | 5 +- > resolv/gai_misc.c | 6 +- > resolv/res-close.c | 2 - > resolv/res_hconf.c | 16 +- > resolv/resolv-internal.h | 14 + > resolv/resolv_conf.c | 3 +- > resolv/tst-leaks2.c | 2 + > rt/aio_misc.c | 6 +- > shadow/fgetspent.c | 5 +- > stdio-common/printf_buffer_as_file.c | 28 +- > stdio-common/reg-modifier.c | 3 +- > stdio-common/reg-printf.c | 6 +- > stdio-common/reg-type.c | 6 +- > stdio-common/wprintf_buffer_as_file.c | 28 +- > stdlib/exit.c | 2 +- > stdlib/fmtmsg.c | 3 +- > stdlib/setenv.c | 3 +- > sunrpc/clnt_perr.c | 4 +- > sunrpc/rpc_thread.c | 1 - > sunrpc/tst-svc_register.c | 6 +- > sysdeps/generic/set-freeres-fp.h | 19 + > sysdeps/generic/set-freeres-os.h | 19 + > sysdeps/generic/set-freeres-system.h | 27 + > .../ldbl-128ibm-compat/ieee128-qefgcvt.c | 1 + > .../ldbl-128ibm-compat/set-freeres-fp.h | 22 + > sysdeps/mach/hurd/bits/errno.h | 1 - > sysdeps/posix/getaddrinfo.c | 5 +- > sysdeps/posix/ttyname.c | 4 +- > sysdeps/unix/sysv/linux/check_pf.c | 3 +- > .../unix/sysv/linux/s390/s390-32/getutent.c | 1 + > .../unix/sysv/linux/s390/s390-32/getutid.c | 1 + > .../unix/sysv/linux/s390/s390-32/getutline.c | 1 + > sysdeps/unix/sysv/linux/set-freeres-os.h | 24 + > sysdeps/unix/sysv/linux/ttyname.c | 8 +- > time/tzfile.c | 5 +- > time/tzset.c | 3 +- > 116 files changed, 1247 insertions(+), 807 deletions(-) > rename {include => hurd}/set-hooks.h (100%) > create mode 100644 include/set-freeres.h > create mode 100644 libio/libio-macros.sym > create mode 100644 sysdeps/generic/set-freeres-fp.h > create mode 100644 sysdeps/generic/set-freeres-os.h > create mode 100644 sysdeps/generic/set-freeres-system.h > create mode 100644 sysdeps/ieee754/ldbl-128ibm-compat/set-freeres-fp.h > create mode 100644 sysdeps/unix/sysv/linux/set-freeres-os.h > -- Cheers, Carlos.