From patchwork Fri Jan 6 13:08:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 90164 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp9439522qgi; Fri, 6 Jan 2017 05:08:43 -0800 (PST) X-Received: by 10.98.201.25 with SMTP id k25mr59378359pfg.108.1483708123755; Fri, 06 Jan 2017 05:08:43 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id i131si51008138pgc.39.2017.01.06.05.08.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jan 2017 05:08:43 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-76620-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-76620-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-76620-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=bUSkVmjZix/5YapRYiUkos+EDsX2g1H/JJx88FUJzHknsQSIgXbHO UUyCA+zuyrCuJ4t9T7HOL/HyBHbpX63ksdkkDci61Gi7RDJ2PG+idYXdB1rbfckw 1cRaaOVM+Fkoa7ISwCqAN8ks8XUH7ULbHpQooGYiG1/CZ53kULtc8E= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; s=default; bh=B3ftDmXNotGIbSlyu60FEGTze30=; b=BtrAi56oYyBzaZttHbmoSJ8TlfD0 p6qqpy26pUwluzGmd/hwqv1Kr8QXCL0HjBogLdC4DKX1xDmUEAWbNsmMbWNTUPc1 ahaGw6HVFocqU1nM3DnvfjTNYQT1ZH7s/KPF4Gv8IrPsMsMoYwoI7Z75Qled3Yvt Pm5mr9iFb22YGQc= Received: (qmail 84011 invoked by alias); 6 Jan 2017 13:08:22 -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 83766 invoked by uid 89); 6 Jan 2017 13:08:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=no version=3.3.2 spammy=__ch, __nonnull, sk:__forti, __THROW X-HELO: mail-yw0-f182.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=56GOoZlPO/miNRZDCcqEdGaPBQGdxLS7RqVIuBP4PgQ=; b=TdsKsQVdOrd9d6qC47HrOJtY8PNfxHZnxBSP6td3cGeGkGJUI9LxWpbN0lXFCPOMIP j2N/DWxZrahje71BOka1kff1kQ7cK774IIEAmNqfnOscOpbGaeWtCRFZOYTPYXYl/64e btwKXS1h3EMCpm8yH5BpJRv8+P6cIAKVQ6QLAXAMHvz/OulvDxA6ikChDQ3IP06V18MG tyl7rnH+5MuDVDFISGpggNjShZBrMz20p28E9ts2DbOEvVAvT27kvc9cVKif1S0T+jIv 3L2Ig77n1dcw9YY9+6VF88M4AuCtOoeNpexf8BmFrr00oKyBM2vLsIKstKGSyL2DG68C nUoA== X-Gm-Message-State: AIkVDXKVfsO5SHllp1ptR3byDB1qIl6B0/UnX04XoNgnUhQdcgdCB3doHtXajyaSq10GEnrI X-Received: by 10.129.56.10 with SMTP id f10mr76571722ywa.45.1483708089148; Fri, 06 Jan 2017 05:08:09 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH] Move fortified explicit_bzero back to string3 Date: Fri, 6 Jan 2017 11:08:02 -0200 Message-Id: <1483708082-24175-1-git-send-email-adhemerval.zanella@linaro.org> Commit 38765ab68f329fd moved the bzero, bcopy, and explicit_bzero fortified macros to a common header (strings_fortified.h). However the side effect is a fortified explicit_bzero is defined when including only strings.h. This patch moves back the fortified explicit_bzero definition to strings3.h header. Checked on x86_64-linux-gnu. --- ChangeLog | 5 +++++ string/bits/string3.h | 9 +++++++++ string/bits/strings_fortified.h | 9 --------- 3 files changed, 14 insertions(+), 9 deletions(-) -- 2.7.4 diff --git a/string/bits/string3.h b/string/bits/string3.h index 0b0a377..738226d 100644 --- a/string/bits/string3.h +++ b/string/bits/string3.h @@ -92,6 +92,15 @@ __NTH (memset (void *__dest, int __ch, size_t __len)) #ifdef __USE_MISC # include + +void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen) + __THROW __nonnull ((1)); + +__fortify_function void +__NTH (explicit_bzero (void *__dest, size_t __len)) +{ + __explicit_bzero_chk (__dest, __len, __bos0 (__dest)); +} #endif __fortify_function char * diff --git a/string/bits/strings_fortified.h b/string/bits/strings_fortified.h index fd396f9..411e786 100644 --- a/string/bits/strings_fortified.h +++ b/string/bits/strings_fortified.h @@ -31,13 +31,4 @@ __NTH (bzero (void *__dest, size_t __len)) (void) __builtin___memset_chk (__dest, '\0', __len, __bos0 (__dest)); } -void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen) - __THROW __nonnull ((1)); - -__fortify_function void -__NTH (explicit_bzero (void *__dest, size_t __len)) -{ - __explicit_bzero_chk (__dest, __len, __bos0 (__dest)); -} - #endif