From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 960B9C3A5A1 for ; Thu, 22 Aug 2019 20:19:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6A39220856 for ; Thu, 22 Aug 2019 20:19:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="V7kKCOmz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A39220856 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jPTASFcnLOlGcqf0E/dw1kdZTJGTPTBWSrR1n0ptQTU=; b=V7kKCOmzYYqO0Q HDyH0nQenGxBt/AuVIyHglPVJRVkIdbg/Su/zOZPBnq2hNZP2EKdDbnzeRYkw87kQ8KIx8o34IuHW uRnKFd4Rp4piOKP1JxraoV5B9gksgSA036c1tPZGsgpi/Gq4rlcixBlgW2supHC0ECyD9kEsON2Qo 9m43a4Ra/rICqlTIUqy20l+ZrNKG55xEIXxQAbqet2ocQs35TbBiq/6AOQ2KT5g95g96bDHW4s+kl d/6PnLOZdlkiUn9ZVRFD7f+xmCqAph2ktZV6rK5bP9QgoJ4STKV3W6ISvAqovN6sjjUpSH/L60r60 DeGA4G8zyi5BkwxlAUng==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i0tY6-0000K3-3V; Thu, 22 Aug 2019 20:19:10 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i0tY3-0000J6-2W for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2019 20:19:08 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BB6BB10576D9; Thu, 22 Aug 2019 20:19:06 +0000 (UTC) Received: from treble (ovpn-121-55.rdu2.redhat.com [10.10.121.55]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C40425D713; Thu, 22 Aug 2019 20:19:05 +0000 (UTC) Date: Thu, 22 Aug 2019 15:19:03 -0500 From: Josh Poimboeuf To: Raphael Gault Subject: Re: [RFC v4 16/18] arm64: crypto: Add exceptions for crypto object to prevent stack analysis Message-ID: <20190822201903.srbxynoabrarnlyw@treble> References: <20190816122403.14994-1-raphael.gault@arm.com> <20190816122403.14994-17-raphael.gault@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190816122403.14994-17-raphael.gault@arm.com> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Thu, 22 Aug 2019 20:19:06 +0000 (UTC) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190822_131907_130934_84C51172 X-CRM114-Status: GOOD ( 17.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: raph.gault+kdev@gmail.com, peterz@infradead.org, catalin.marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, julien.thierry.kdev@gmail.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Aug 16, 2019 at 01:24:01PM +0100, Raphael Gault wrote: > Some crypto modules contain `.word` of data in the .text section. > Since objtool can't make the distinction between data and incorrect > instruction, it gives a warning about the instruction beeing unknown > and stops the analysis of the object file. > > The exception can be removed if the data are moved to another section > or if objtool is tweaked to handle this particular case. > > Signed-off-by: Raphael Gault If the data can be moved to .rodata then I think that would be a much better solution. > --- > arch/arm64/crypto/Makefile | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/arm64/crypto/Makefile b/arch/arm64/crypto/Makefile > index 0435f2a0610e..e2a25919ebaa 100644 > --- a/arch/arm64/crypto/Makefile > +++ b/arch/arm64/crypto/Makefile > @@ -43,9 +43,11 @@ aes-neon-blk-y := aes-glue-neon.o aes-neon.o > > obj-$(CONFIG_CRYPTO_SHA256_ARM64) += sha256-arm64.o > sha256-arm64-y := sha256-glue.o sha256-core.o > +OBJECT_FILES_NON_STANDARD_sha256-core.o := y > > obj-$(CONFIG_CRYPTO_SHA512_ARM64) += sha512-arm64.o > sha512-arm64-y := sha512-glue.o sha512-core.o > +OBJECT_FILES_NON_STANDARD_sha512-core.o := y > > obj-$(CONFIG_CRYPTO_CHACHA20_NEON) += chacha-neon.o > chacha-neon-y := chacha-neon-core.o chacha-neon-glue.o > @@ -58,6 +60,7 @@ aes-arm64-y := aes-cipher-core.o aes-cipher-glue.o > > obj-$(CONFIG_CRYPTO_AES_ARM64_BS) += aes-neon-bs.o > aes-neon-bs-y := aes-neonbs-core.o aes-neonbs-glue.o > +OBJECT_FILES_NON_STANDARD_aes-neonbs-core.o := y > > CFLAGS_aes-glue-ce.o := -DUSE_V8_CRYPTO_EXTENSIONS > > -- > 2.17.1 > -- Josh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel