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=-11.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 78470C433E0 for ; Thu, 4 Feb 2021 20:28:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2810064DAF for ; Thu, 4 Feb 2021 20:28:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240019AbhBDU2F (ORCPT ); Thu, 4 Feb 2021 15:28:05 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:26805 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240106AbhBDUYB (ORCPT ); Thu, 4 Feb 2021 15:24:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612470155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ob/Q0z75fUha7sOp70sKDWv4y9mB1atawq7qE94MTs8=; b=YamBDRsT/DGgjlEEU2gnfEKXQzyjq08J65ne3Es0B6VqookBoqTg3USp2F42RXDrD1b9UY 0CYLjCoZhmIEFZCVOYISKIpu7F5yoaWaCxZEjp3u3CaJhOFoDfuDawP9QR9evxoIX4nTGU l3lATF3zqFDywgPY4CSLTlKfgzNvsXo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-428-A7ohRb1EOQ2tcgOjpeJI5w-1; Thu, 04 Feb 2021 15:22:31 -0500 X-MC-Unique: A7ohRb1EOQ2tcgOjpeJI5w-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0E1A18030B5; Thu, 4 Feb 2021 20:22:27 +0000 (UTC) Received: from treble (ovpn-114-156.rdu2.redhat.com [10.10.114.156]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2A7DB722D9; Thu, 4 Feb 2021 20:22:14 +0000 (UTC) Date: Thu, 4 Feb 2021 14:22:10 -0600 From: Josh Poimboeuf To: Ivan Babrou Cc: kernel-team , Ignat Korchagin , Hailong liu , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Miroslav Benes , Julien Thierry , Jiri Slaby , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, "Steven Rostedt (VMware)" , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh , Robert Richter , "Joel Fernandes (Google)" , Mathieu Desnoyers , Linux Kernel Network Developers , bpf@vger.kernel.org, Alexey Kardashevskiy Subject: Re: BUG: KASAN: stack-out-of-bounds in unwind_next_frame+0x1df5/0x2650 Message-ID: <20210204202210.4awpfn2ckdv7h5cf@treble> References: <20210203190518.nlwghesq75enas6n@treble> <20210203232735.nw73kugja56jp4ls@treble> <20210204001700.ry6dpqvavcswyvy7@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Feb 04, 2021 at 11:51:44AM -0800, Ivan Babrou wrote: > > .macro FUNC_SAVE > > #the number of pushes must equal STACK_OFFSET > > + push %rbp > > + mov %rsp, %rbp > > push %r12 > > push %r13 > > push %r14 > > @@ -271,12 +273,14 @@ VARIABLE_OFFSET = 16*8 > > .endm > > > > .macro FUNC_RESTORE > > + add $VARIABLE_OFFSET, %rsp > > mov %r14, %rsp > > > > pop %r15 > > pop %r14 > > pop %r13 > > pop %r12 > > + pop %rbp > > .endm > > > > # Encryption of a single block > > > > This patch seems to fix the following warning: > > [ 147.995699][ C0] WARNING: stack going in the wrong direction? at > glue_xts_req_128bit+0x21f/0x6f0 [glue_helper] > > Or at least I cannot see it anymore when combined with your other > patch, not sure if it did the trick by itself. > > This sounds like a good reason to send them both. Ok, that's what I expected. The other patch fixed the unwinder failure mode to be the above (harmless) unwinder warning, instead of a disruptive KASAN failure. This patch fixes the specific underlying crypto unwinding metadata issue. I'll definitely be sending both fixes. The improved failure mode patch will come first because it's more urgent and lower risk. -- Josh