Message ID | cover.1620304013.git.fweimer@redhat.com |
---|---|
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DFEA2388E836; Thu, 6 May 2021 12:29:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DFEA2388E836 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1620304191; bh=KkAGcUO6orX3mfOkyRj4HffGFpmTFioZgPltZC+/ar0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=RONyEPYWV/Qv/0Ca/n5YLDfvHZoWPfR6Y7vIw26kq9HxjCNalJgZWGYuBdU2OLziM Wj1MDn/EtAbBFe+7RHTId/eq8m09NzBFnlkN4I+gX6dYRCSUi/8H5j/WzGjjM5bYxw FBPbV4X7cpakM08xQEtVmj0CpZI47ZjNnHh8JQq8= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 214413AA981D for <libc-alpha@sourceware.org>; Thu, 6 May 2021 12:29:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 214413AA981D Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-583-yAzbpHwiMwiZiTYVhCPVlA-1; Thu, 06 May 2021 08:29:46 -0400 X-MC-Unique: yAzbpHwiMwiZiTYVhCPVlA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 70E5C801AF7 for <libc-alpha@sourceware.org>; Thu, 6 May 2021 12:29:45 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-137.ams2.redhat.com [10.36.112.137]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B087D1813B for <libc-alpha@sourceware.org>; Thu, 6 May 2021 12:29:44 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 0/3] Checking HWCAP bits against compiler flags Message-Id: <cover.1620304013.git.fweimer@redhat.com> Date: Thu, 06 May 2021 14:30:02 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Florian Weimer <fweimer@redhat.com> Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
Checking HWCAP bits against compiler flags
|
|
Message
Florian Weimer
May 6, 2021, 12:30 p.m. UTC
This series adds checks after HWCAP parsing that all bits required for compiler flags are present. It is brittle by design because invalid instructions could already have been used by the dynamic loader at this point, but for our downstream use case, it is an improvement over a plain SIGILL. (If this is deemed too hackish, I'll probably revert our downstream changes.) Tested on various variants on z13, z15, POWER8 and POWER9, and also built with build-many-glibcs.py. Thanks, Florian Florian Weimer (3): elf: Add hook for checking HWCAP bits after auxiliary vector parsing powerpc64le: Check HWCAP bits against compiler build flags s390x: Check HWCAP bits against compiler flags elf/dl-sysdep.c | 3 ++ sysdeps/generic/dl-hwcap-check.h | 28 +++++++++++ sysdeps/powerpc/powerpc64/le/dl-hwcap-check.h | 49 +++++++++++++++++++ sysdeps/s390/s390-64/dl-hwcap-check.h | 40 +++++++++++++++ 4 files changed, 120 insertions(+) create mode 100644 sysdeps/generic/dl-hwcap-check.h create mode 100644 sysdeps/powerpc/powerpc64/le/dl-hwcap-check.h create mode 100644 sysdeps/s390/s390-64/dl-hwcap-check.h