From patchwork Wed Jun 21 14:51:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 21168 Received: (qmail 9007 invoked by alias); 21 Jun 2017 14:51:44 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 5996 invoked by uid 89); 21 Jun 2017 14:51:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-oi0-f52.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=4NpmnO3B3z9YFtaNCyuh0bH2HdIFunZUqN/9C3loDH8=; b=qz+zau1ockamEwmin4t0TukUF+C9lPdd6dI7A8+sQiabDaXkhf7ZMWx/K3cIfeC5Mi BtjB1QOFFNs+fe4Zo6BBp3G1KB0LuIOK9JQkxWowt5ddRTTvXBtUV5A3VPwZQpC34YZu vlI+TbtjkIZQIPwh8TqXye1iGFOV+UneFG7Y0ZAZm0fvWm0T2wSRTnaGEINmXBP41MEY nKBbMULgsfSWC4nRvh/ssX023M/ye0yP77DaRwnyW+8j17UDDyorhxWhRd6tZu46mGW+ gJRLGQ3cNO6bDox9hOy9R+IcH3VsNB6G4oTpQcuKRqf+dAyw0tnJeOtB+i6rDCq6zIIr 3Rfg== X-Gm-Message-State: AKS2vOx8+GnOL2OkolSz6b1LvojLlqt6mnBgURQVIHCIaBtfR7HEa/it PLDzxVDSlbzDG2KP3APjno95poXYFA== X-Received: by 10.202.192.193 with SMTP id q184mr16832148oif.179.1498056699040; Wed, 21 Jun 2017 07:51:39 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <53deaf6c-44e9-08d7-c143-5e4908dd4804@gotplt.org> References: <20170615131042.GA28885@gmail.com> <63707191-601d-9374-8cad-74f15d51f917@linaro.org> <658e5dbb-d93e-9ee8-8eaa-52d750e6d977@gotplt.org> <86ed2014-1600-55da-b8ae-35405a36cdf8@gotplt.org> <53deaf6c-44e9-08d7-c143-5e4908dd4804@gotplt.org> From: "H.J. Lu" Date: Wed, 21 Jun 2017 07:51:38 -0700 Message-ID: Subject: Re: [PATCH] tunables: Add IFUNC selection and cache sizes To: Siddhesh Poyarekar Cc: Adhemerval Zanella , GNU C Library On Wed, Jun 21, 2017 at 7:35 AM, Siddhesh Poyarekar wrote: > On Wednesday 21 June 2017 06:56 PM, H.J. Lu wrote: >> I am testing this patch. OK for master if there are no regressions? >> > > Looks OK to me with one comment change which I missed the last time: > >> Since all CPU/ARCH features are hardware optimizations without >> security implication, except for Prefer_MAP_32BIT_EXEC, which can >> - only be disabled, we check GLIBC_IFUNC for programs, including >> + only be disabled, we check glibc.tune.hwcaps for programs, including >> set*id ones. > > This block is no longer valid since the tunables are not read for setxid > binaries. If you want to make a case for hwcaps to be read in setxid > binaries, then it should be made along with hwcap_mask since they're > essentially the same feature for different machines. > Here is the updated patch. OK for master? From 3d6a433311d99dced1378d44b9f37736594e631f Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 20 Jun 2017 12:09:56 -0700 Subject: [PATCH] Move x86 specific tunables to x86/dl-tunables.list * elf/dl-tunables.list: Move x86 specific tunables to ... * sysdeps/x86/dl-tunables.list: Here. New file. --- elf/dl-tunables.list | 12 ------------ sysdeps/x86/dl-tunables.list | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 12 deletions(-) create mode 100644 sysdeps/x86/dl-tunables.list diff --git a/elf/dl-tunables.list b/elf/dl-tunables.list index 3247d49..b8b0ce5 100644 --- a/elf/dl-tunables.list +++ b/elf/dl-tunables.list @@ -87,17 +87,5 @@ glibc { type: STRING security_level: SXID_IGNORE } - x86_non_temporal_threshold { - type: SIZE_T - security_level: SXID_IGNORE - } - x86_data_cache_size { - type: SIZE_T - security_level: SXID_IGNORE - } - x86_shared_cache_size { - type: SIZE_T - security_level: SXID_IGNORE - } } } diff --git a/sysdeps/x86/dl-tunables.list b/sysdeps/x86/dl-tunables.list new file mode 100644 index 0000000..50c130a --- /dev/null +++ b/sysdeps/x86/dl-tunables.list @@ -0,0 +1,34 @@ +# x86 specific tunables. +# Copyright (C) 2017 Free Software Foundation, Inc. +# This file is part of the GNU C Library. + +# The GNU C Library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. + +# The GNU C Library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. + +# You should have received a copy of the GNU Lesser General Public +# License along with the GNU C Library; if not, see +# . + +glibc { + tune { + x86_non_temporal_threshold { + type: SIZE_T + security_level: SXID_IGNORE + } + x86_data_cache_size { + type: SIZE_T + security_level: SXID_IGNORE + } + x86_shared_cache_size { + type: SIZE_T + security_level: SXID_IGNORE + } + } +} -- 2.9.4