From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751121AbcFXHTW (ORCPT ); Fri, 24 Jun 2016 03:19:22 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36624 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750853AbcFXHTT (ORCPT ); Fri, 24 Jun 2016 03:19:19 -0400 Date: Fri, 24 Jun 2016 10:19:08 +0300 From: Johan Hedberg To: Andy Lutomirski Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Borislav Petkov , Nadav Amit , Kees Cook , Brian Gerst , "kernel-hardening@lists.openwall.com" , Linus Torvalds , Josh Poimboeuf , Jann Horn , Heiko Carstens , Marcel Holtmann , Gustavo Padovan , "David S. Miller" , linux-bluetooth@vger.kernel.org, Herbert Xu , netdev@vger.kernel.org Subject: Re: [PATCH v4 01/16] bluetooth: Switch SMP to crypto_cipher_encrypt_one() Message-ID: <20160624071908.GA7040@t440s> Mail-Followup-To: Andy Lutomirski , x86@kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Borislav Petkov , Nadav Amit , Kees Cook , Brian Gerst , "kernel-hardening@lists.openwall.com" , Linus Torvalds , Josh Poimboeuf , Jann Horn , Heiko Carstens , Marcel Holtmann , Gustavo Padovan , "David S. Miller" , linux-bluetooth@vger.kernel.org, Herbert Xu , netdev@vger.kernel.org References: <9a1ddd10d96898f8a2c94c3f3d37073c73ba50c9.1466741835.git.luto@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9a1ddd10d96898f8a2c94c3f3d37073c73ba50c9.1466741835.git.luto@kernel.org> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 23, 2016, Andy Lutomirski wrote: > SMP does ECB crypto on stack buffers. This is complicated and > fragile, and it will not work if the stack is virtually allocated. > > Switch to the crypto_cipher interface, which is simpler and safer. > > Cc: Marcel Holtmann > Cc: Gustavo Padovan > Cc: Johan Hedberg > Cc: "David S. Miller" > Cc: linux-bluetooth@vger.kernel.org > Cc: Herbert Xu > Cc: netdev@vger.kernel.org > Signed-off-by: Andy Lutomirski > --- > net/bluetooth/smp.c | 67 ++++++++++++++++++++++------------------------------- > 1 file changed, 28 insertions(+), 39 deletions(-) Acked-and-tested-by: Johan Hedberg Johan