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 0B1993857340 for ; Mon, 13 Jun 2022 16:43:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0B1993857340 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-333-lId0p33yNm-9aMzQPLFUvw-1; Mon, 13 Jun 2022 12:43:14 -0400 X-MC-Unique: lId0p33yNm-9aMzQPLFUvw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 14B7E2919EA4; Mon, 13 Jun 2022 16:43:14 +0000 (UTC) Received: from greed.delorie.com (unknown [10.22.8.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 004C418EA1; Mon, 13 Jun 2022 16:43:13 +0000 (UTC) Received: from greed.delorie.com.redhat.com (localhost [127.0.0.1]) by greed.delorie.com (8.15.2/8.15.2) with ESMTP id 25DGhDII4047711; Mon, 13 Jun 2022 12:43:13 -0400 From: DJ Delorie To: Jeff Law Cc: libc-alpha@sourceware.org Subject: Re: [patch/idea] Add register scrambling to testsuite In-Reply-To: <4366412f-10ce-a6f8-4586-ff930d9fc788@gmail.com> Date: Mon, 13 Jun 2022 12:43:13 -0400 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2022 16:43:17 -0000 Jeff Law via Libc-alpha writes: > If you wanted to get nasty you could intercept all calls going through > the PLT and do something similar there as well. The LD_AUDIT interface may or may not be able to do that, if the backend doesn't preserve all registers "for our convenience" :-) Would it be too much to ask for a "gcc -fscramble-regs" that writes something to every call-clobbered reg in every prologue? It wouldn't have to be random, it would just have to be something that's obviously wrong for most uses.