From patchwork Mon Jun 18 15:05:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Salyzyn X-Patchwork-Id: 10472065 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 24398601D7 for ; Mon, 18 Jun 2018 15:23:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12B7428B21 for ; Mon, 18 Jun 2018 15:23:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06DE028B59; Mon, 18 Jun 2018 15:23:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 982AD28B21 for ; Mon, 18 Jun 2018 15:23:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=3Yfmj/RppW2Hi9XaeS3lkd2X7RNB4NtkinY9/33Nfko=; b=dQD+Cu4hACOfGsMvIC1NVvS+3V 4K4qjSfqAOzLfF/4MqS/W91NQBdT63q6HMzcC4d9L/mTFcUPejgT0Svm/ZNZHachTbRgmImW4RJY6 CIdlXHFJtzUwv9zlb36hoNmgUr0D2J1TirgEKO4i2EGwUQnyxlcQyJACTvhqm7CWtF7HoRerMSWUr pjo8WUWJmujrgLprOpFN/nsY7m6O0oDhKw2Cm9yKC90mLtgJ0DAknhaougJ7mD8pR/pmpegUikEWj PMrXZkl3ogR/2ngnQ7hIg2vIloG2N1WBJD4gQstZOrCS6OWs3YaQZw/tSQ2qg/3a4Ulhh1BXnxh9I vDzTLnbg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fUvzX-0003la-NT; Mon, 18 Jun 2018 15:22:51 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fUvst-00079r-Az for linux-arm-kernel@bombadil.infradead.org; Mon, 18 Jun 2018 15:15:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=YDT3d1VxBK0YiBEZ1hS7fYSLK7481fKshItjGaWAOGs=; b=pt3opLeWVWzKddarxwATWhjac +8E02nrrTV7QsotnhfNBWgcvsHIfyZ8yTqoiKBd/N3q12r5sYtEj+3FdVTrpIQcyWXxYUdlE/M9QQ O8oNSpXKrg39L2yxbIi4q86CjaifD3oVSEbbpBLUa5oGvlJqDKpVzigI5f+1wpsv40QT7yjn23yLy kEvoEge6DyYJnt5kttw6NVTLndxYooWcSq5ojoThdf0aR0d9N7FbrxSWlEjHXZksPG+URL9wdfAd8 LeHniJQwn8Gcyg5IfJaDbwK26BRBm1XrCklBUZJxbGnhhkg5kui8TeikDFzhrVCa3lsaclZfRsUyR +22ubjP0A==; Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fUvkr-0005ye-Be for linux-arm-kernel@lists.infradead.org; Mon, 18 Jun 2018 15:07:45 +0000 Received: by mail-pf0-x243.google.com with SMTP id a22-v6so8316398pfo.12 for ; Mon, 18 Jun 2018 08:07:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=android.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YDT3d1VxBK0YiBEZ1hS7fYSLK7481fKshItjGaWAOGs=; b=QlQTyt7b8pqu8WG/lziJBb3L6OdVoEzKHbanvYqjAVMaQvw87kHx286Wq7BIijhU+b oHeA7Vdnno8pXhL6pK6xQONn98AfViOg0VQS0trWSiUnAyxXV0Cb/7JbV3vR4ymu9ewM xMZLpdLWeugjE5xIg2AGN0C1/RxpaM5rgjgMWPHXwK7ECE3P0atp49apKnPAeJ4/YqNu AUYGxIHWFx4PRb9oDJXSFLSBRtl7u5dn2rcv/0DZQPRK9jHycQhot1tkgQFsn+CKg4Nk FwPVD/zF5YerARHJT/PDpVRH5EWBC/yYXITpxfmuSYN0iI9aZIhAePP+kTxLx85eKfyx Nk3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YDT3d1VxBK0YiBEZ1hS7fYSLK7481fKshItjGaWAOGs=; b=ef9C8LPm4we9AvUVEgcLBfazjgwgzRk2gbQnoC8MmMfNXtyxW075m3Qwl8zF6oGKUd goFi5I7yJIOdP8FE+0n/RJk1deTHvLmmxp9fX69XSwNk9XMX7WqhY/ZQ5khqEBnVCWPO W5zYAfbJ0UCt4ym3NjLv4wsVhm12H3lv5baBbEhIfAZK11vggeebpsWZPdDG0HDdJnV9 E33API6uCXl6WEx4ASYOe1q+qhIbXskzU8Cp0ZpbJPjy/jOxBfqPWHdPLDb7ed1hIYhT i32JkhUnmXSuN57AOZS/Ef7aGx0e45aVuIkBJwk8lSs90F2KwF+lL6JSVV7MnK4ntBYj rdYQ== X-Gm-Message-State: APt69E0sYFTDZnuA48+w1rqyf+aAiaiS4Civwc6UCehfa0A0Af29KV/+ CSjN46+BrAqPNEooRjs7jZkPnA== X-Google-Smtp-Source: ADUXVKKB9Nvlsind6+J0LMB0V0c1G08BiNJoiu4EydI8Gx4TfPHeS/11WDro8Hvex3gZnOTubP3TQQ== X-Received: by 2002:a62:84e:: with SMTP id c75-v6mr14022815pfd.35.1529334449699; Mon, 18 Jun 2018 08:07:29 -0700 (PDT) Received: from nebulus.mtv.corp.google.com ([2620:0:1000:1611:6077:8eec:bc7e:d0f4]) by smtp.gmail.com with ESMTPSA id i7-v6sm54830660pfa.34.2018.06.18.08.07.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jun 2018 08:07:29 -0700 (PDT) From: Mark Salyzyn To: linux-kernel@vger.kernel.org Subject: RESEND [PATCH v5 07/12] arm: vdso: disable profiling Date: Mon, 18 Jun 2018 08:05:53 -0700 Message-Id: <20180618150613.10322-8-salyzyn@android.com> X-Mailer: git-send-email 2.18.0.rc1.244.gcf134e6275-goog In-Reply-To: <20180618150613.10322-1-salyzyn@android.com> References: <20180618150613.10322-1-salyzyn@android.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180618_160741_392883_966FDF8C X-CRM114-Status: GOOD ( 18.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Kate Stewart , Catalin Marinas , Will Deacon , Mark Salyzyn , Russell King , linux-arm-kernel@lists.infradead.org, Andy Gross , Laura Abbott , Kees Cook , Kevin Brodsky , Dmitry Safonov , John Stultz , Thomas Gleixner , Dmitry Vyukov , Ard Biesheuvel , Greg Kroah-Hartman , Jeremy Linton , Andy Lutomirski , James Morse , Andrew Pinski , Philippe Ombredanne MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Take an effort to recode the arm64 vdso code from assembler to C previously submitted by Andrew Pinski , rework it for use in both arm and arm64, overlapping any optimizations for each architecture. But instead of landing it in arm64, land the result into lib/vdso and unify both implementations to simplify future maintenance. Make sure kasan and ubsan profiling, and kcov instrumentation, is turned off for VDSO code. Signed-off-by: Mark Salyzyn Cc: James Morse Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Andy Lutomirski Cc: Dmitry Safonov Cc: John Stultz Cc: Mark Rutland Cc: Laura Abbott Cc: Kees Cook Cc: Ard Biesheuvel Cc: Andy Gross Cc: Kevin Brodsky Cc: Andrew Pinski Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: Jeremy Linton v2: - Added this to the split up of first CL, based on comments in second CL v4: - update commit message to reflect overall reasoning v5: - rebase --- arch/arm/vdso/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/vdso/Makefile b/arch/arm/vdso/Makefile index f4efff9d3afb..1125e3fb8006 100644 --- a/arch/arm/vdso/Makefile +++ b/arch/arm/vdso/Makefile @@ -27,8 +27,11 @@ CFLAGS_REMOVE_vdso.o = -pg CFLAGS_REMOVE_vgettimeofday.o = -pg -Os CFLAGS_vgettimeofday.o = -O2 -# Disable gcov profiling for VDSO code +# Disable gcov, kasan, ubsan and kcov profiling for VDSO code GCOV_PROFILE := n +KASAN_SANITIZE := n +UBSAN_SANITIZE := n +KCOV_INSTRUMENT := n # Prevents link failures: __sanitizer_cov_trace_pc() is not linked in. KCOV_INSTRUMENT := n