Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2149605imm; Sat, 23 Jun 2018 10:31:38 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL5vlYOdfhLO+TQ0kxhofJLipooRCFrnZVKVI5efKt22xTBmtve6c2ueb3oDUj+d+mciQ1f X-Received: by 2002:a17:902:ba87:: with SMTP id k7-v6mr6198494pls.271.1529775098554; Sat, 23 Jun 2018 10:31:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529775098; cv=none; d=google.com; s=arc-20160816; b=Yfv+4U8Gk0hnRy8sILc/cxo6MXkNd+Vmai6n2+3kr6kwBnpz/tFbZOV9+voKWn7fQ3 +lyIA7Vp6xADD3FNjoUbZVkLKuQh2sjj+9h5VLDO9Sv3Efx8hXW7vyJs5HXSxMkoOxl+ oS4ZqRQrwbjCcety56fSa2N6+BF7GwdTWdGCe0ddrupEVIewMTqxaIvCP6fC6GD6uuFV hjmVBgcYOKYBdhRqnA6H4wOh/3uR+48POSrV0S/AuhOOz+paka0QViXJljDwz788vIau /ZjFt3bReXDdnWLrWlsvCpk8FZZ98yRbV2xveV8+Ia+q1cOX/Cn0sW2M1P1aJVZTCpOR oYVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:arc-authentication-results; bh=9ytnvNFnQdZ7piY+8IgyTs84JBtK5dSilFiaGizyAWM=; b=dKLdH/ZUQk1t6FYZefRbl32xoZuY8LsRQECrnRNlp7k+hfwyS7wOmUOwky6xTxJ6Fz G4vTaGp+tB0YhizOIKgPuS9b4m9vaUH/ChqNCG+HoJr/SKS5Arc/uDUrilHp+8aG+hqM VM3p23cdOCgUOWSnaWSG/Z1lunwsEB+6cT5jT4oFyZPFHNEvhMvip0XYImW/OV9q4R27 p0vhPuRcF/ggmOxynYhKF3qYJJZPoPhIXfqreJ/MSQvq6LZesrhWnMy2a65O2tC/tg3y dx1+EDgJz9WqL7PJtUkt9a3JcciW08x3sF6fTy+NDQdIcAQLoHJXHiQdslF4lA1lsDos jjdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=K5N2zOZL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 139-v6si5787729pgc.87.2018.06.23.10.31.24; Sat, 23 Jun 2018 10:31:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=K5N2zOZL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751665AbeFWRaq (ORCPT + 99 others); Sat, 23 Jun 2018 13:30:46 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:42855 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751487AbeFWRao (ORCPT ); Sat, 23 Jun 2018 13:30:44 -0400 Received: by mail-lj1-f193.google.com with SMTP id k20-v6so1445681ljk.9; Sat, 23 Jun 2018 10:30:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=9ytnvNFnQdZ7piY+8IgyTs84JBtK5dSilFiaGizyAWM=; b=K5N2zOZLVdu791Y7tCa5EXmGYI3yM99EYoLW0dAkbwd5Pch9oXczMadNvjCFowyXls XFeVZYahwoOdV0KZAlf6y7eh3P25PDq0m6TqS9jslLPNVlQqy7ZjQGc3o8rMlaVbFdjM 4W3LdnM0jSgT9ymwhZc9F/Xb57pVAidS7qkvxHtKd4y2p7VW0y/ERDyXwpSOxREv1OGi bq3gPAP12c6VWN/CUduqivnPcpVMpxGjb/poisN3zqp7O57MZozP8F741gNkv6UwYQOW svCImBcZBwoOL6lb4LJ5OAEZ3bDFkAkNzce33l/6RoaAd5AILrrfCUylvTDnfnbPvcD3 d+VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=9ytnvNFnQdZ7piY+8IgyTs84JBtK5dSilFiaGizyAWM=; b=ZHryQcrjoC4Hq1P1RSAwteQ74aMnKfhv5qK6n+eOIrhlZV2LFwMLb1Fr3GEDJLqi9D svO8RgmBhIG/Q//tuLQNZG8tcBE0KNpfHrPDpa186OE4H8sOK9xKljrkyj8L2W+Taaex sOZJpHRGCcJgn+ot8imthfiAxjUy44X1mpvJnhP+Kg87cV87X28vyIZaeUgUvzUXNt6n H8qvguk0Iqs9Ej41Bwnbq81pj+c6KUGXaglIjjMRA6urzs4uYmImtzPXtwuexcsw3MP+ uePiNco4KDEebLsr6oC+q89v1+BdD3gaCHvVO9PeVW2ZPeBIUqips22P2vT993iuS0Ps 5W0A== X-Gm-Message-State: APt69E3iAbFUsVGdKasSVDFzRIP3XSfzA1yKONUblKUOCY96DYHSyOyt eS1rnbyV8+CUtEsJFc/enrQwF4OBZMJujIq8zIE= X-Received: by 2002:a2e:905a:: with SMTP id n26-v6mr3718493ljg.33.1529775042408; Sat, 23 Jun 2018 10:30:42 -0700 (PDT) MIME-Version: 1.0 References: <20180507213755.GA32406@avx2> <1529235613.4572.7.camel@gmx.de> <20180617120012.GB16877@zn.tnic> <1529242717.4472.3.camel@gmx.de> <1529244178.4674.1.camel@gmx.de> <20180617194747.GA21160@zn.tnic> <1529289279.31745.3.camel@gmx.de> <20180623103622.GA2760@zn.tnic> In-Reply-To: <20180623103622.GA2760@zn.tnic> From: =?UTF-8?B?T25kcmVqIE1vc27DocSNZWs=?= Date: Sat, 23 Jun 2018 19:30:30 +0200 Message-ID: Subject: Re: [PATCH] x86/crypto: Add missing RETs To: bp@alien8.de Cc: linux-crypto@vger.kernel.org, efault@gmx.de, adobriyan@gmail.com, torvalds@linux-foundation.org, tglx@linutronix.de, mingo@kernel.org, jpoimboe@redhat.com, luto@kernel.org, peterz@infradead.org, brgerst@gmail.com, hpa@zytor.com, Linux Kernel Mailing List , dvlasenk@redhat.com, h.peter.anvin@intel.com, linux-tip-commits@vger.kernel.org, Herbert Xu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org so 23. 6. 2018 o 12:36 Borislav Petkov nap=C3=ADsal(a): > > Lemme send a proper patch now... > > --- > From: Borislav Petkov > Date: Sun, 17 Jun 2018 13:57:42 +0200 > Subject: [PATCH] x86/crypto: Add missing RETs > > Add explicit RETs to the tail calls of AEGIS and MORUS crypto algorithms > otherwise they run into INT3 padding due to > > 51bad67ffbce ("x86/asm: Pad assembly functions with INT3 instructions") > > leading to spurious debug exceptions. > > Mike Galbraith took care of all the remaining callsites. > > Signed-off-by: Borislav Petkov Oh, thanks for fixing that! Acked-by: Ondrej Mosnacek Cheers, Ondrej > --- > arch/x86/crypto/aegis128-aesni-asm.S | 1 + > arch/x86/crypto/aegis128l-aesni-asm.S | 1 + > arch/x86/crypto/aegis256-aesni-asm.S | 1 + > arch/x86/crypto/morus1280-avx2-asm.S | 1 + > arch/x86/crypto/morus1280-sse2-asm.S | 1 + > arch/x86/crypto/morus640-sse2-asm.S | 1 + > 6 files changed, 6 insertions(+) > > diff --git a/arch/x86/crypto/aegis128-aesni-asm.S b/arch/x86/crypto/aegis= 128-aesni-asm.S > index 9254e0b6cc06..717bf0776421 100644 > --- a/arch/x86/crypto/aegis128-aesni-asm.S > +++ b/arch/x86/crypto/aegis128-aesni-asm.S > @@ -535,6 +535,7 @@ ENTRY(crypto_aegis128_aesni_enc_tail) > movdqu STATE3, 0x40(STATEP) > > FRAME_END > + ret > ENDPROC(crypto_aegis128_aesni_enc_tail) > > .macro decrypt_block a s0 s1 s2 s3 s4 i > diff --git a/arch/x86/crypto/aegis128l-aesni-asm.S b/arch/x86/crypto/aegi= s128l-aesni-asm.S > index 9263c344f2c7..4eda2b8db9e1 100644 > --- a/arch/x86/crypto/aegis128l-aesni-asm.S > +++ b/arch/x86/crypto/aegis128l-aesni-asm.S > @@ -645,6 +645,7 @@ ENTRY(crypto_aegis128l_aesni_enc_tail) > state_store0 > > FRAME_END > + ret > ENDPROC(crypto_aegis128l_aesni_enc_tail) > > /* > diff --git a/arch/x86/crypto/aegis256-aesni-asm.S b/arch/x86/crypto/aegis= 256-aesni-asm.S > index 1d977d515bf9..32aae8397268 100644 > --- a/arch/x86/crypto/aegis256-aesni-asm.S > +++ b/arch/x86/crypto/aegis256-aesni-asm.S > @@ -543,6 +543,7 @@ ENTRY(crypto_aegis256_aesni_enc_tail) > state_store0 > > FRAME_END > + ret > ENDPROC(crypto_aegis256_aesni_enc_tail) > > /* > diff --git a/arch/x86/crypto/morus1280-avx2-asm.S b/arch/x86/crypto/morus= 1280-avx2-asm.S > index 37d422e77931..07653d4582a6 100644 > --- a/arch/x86/crypto/morus1280-avx2-asm.S > +++ b/arch/x86/crypto/morus1280-avx2-asm.S > @@ -453,6 +453,7 @@ ENTRY(crypto_morus1280_avx2_enc_tail) > vmovdqu STATE4, (4 * 32)(%rdi) > > FRAME_END > + ret > ENDPROC(crypto_morus1280_avx2_enc_tail) > > /* > diff --git a/arch/x86/crypto/morus1280-sse2-asm.S b/arch/x86/crypto/morus= 1280-sse2-asm.S > index 1fe637c7be9d..bd1aa1b60869 100644 > --- a/arch/x86/crypto/morus1280-sse2-asm.S > +++ b/arch/x86/crypto/morus1280-sse2-asm.S > @@ -652,6 +652,7 @@ ENTRY(crypto_morus1280_sse2_enc_tail) > movdqu STATE4_HI, (9 * 16)(%rdi) > > FRAME_END > + ret > ENDPROC(crypto_morus1280_sse2_enc_tail) > > /* > diff --git a/arch/x86/crypto/morus640-sse2-asm.S b/arch/x86/crypto/morus6= 40-sse2-asm.S > index 71c72a0a0862..efa02816d921 100644 > --- a/arch/x86/crypto/morus640-sse2-asm.S > +++ b/arch/x86/crypto/morus640-sse2-asm.S > @@ -437,6 +437,7 @@ ENTRY(crypto_morus640_sse2_enc_tail) > movdqu STATE4, (4 * 16)(%rdi) > > FRAME_END > + ret > ENDPROC(crypto_morus640_sse2_enc_tail) > > /* > -- > 2.17.0.582.gccdcbd54c > > -- > Regards/Gruss, > Boris. > > Good mailing practices for 400: avoid top-posting and trim the reply.