From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754726AbdEDP61 convert rfc822-to-8bit (ORCPT ); Thu, 4 May 2017 11:58:27 -0400 Received: from smtp-out6.electric.net ([192.162.217.184]:63768 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754522AbdEDP5A (ORCPT ); Thu, 4 May 2017 11:57:00 -0400 From: David Laight To: "'Josh Poimboeuf'" , "x86@kernel.org" CC: Andrey Konovalov , "linux-kernel@vger.kernel.org" , Vlad Yasevich , "Neil Horman" , "David S . Miller" , "linux-sctp@vger.kernel.org" , netdev , Marcelo Ricardo Leitner , Dmitry Vyukov , "Kostya Serebryany" , syzkaller , "Eric Dumazet" , Cong Wang Subject: RE: [PATCH] x86/asm: Don't use rbp as temp register in csum_partial_copy_generic() Thread-Topic: [PATCH] x86/asm: Don't use rbp as temp register in csum_partial_copy_generic() Thread-Index: AQHSxOnlfdtcRDryi0qKYU7Hg+8ytqHkUuGw Date: Thu, 4 May 2017 15:56:49 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6DCFFE581C@AcuExch.aculab.com> References: <4b03a961efda5ec9bfe46b7b9c9ad72d1efad343.1493909486.git.jpoimboe@redhat.com> In-Reply-To: <4b03a961efda5ec9bfe46b7b9c9ad72d1efad343.1493909486.git.jpoimboe@redhat.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 156.67.243.126 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuExch.aculab.com X-TLS: TLSv1:AES128-SHA:128 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Josh Poimboeuf > Sent: 04 May 2017 15:52 > Andrey Konovalov reported the following warning while fuzzing the kernel > with syzkaller: > > WARNING: kernel stack regs at ffff8800686869f8 in a.out:4933 has bad 'bp' value c3fc855a10167ec0 > > The unwinder dump revealed that rbp had a bad value when an interrupt > occurred in csum_partial_copy_generic(). > > That function saves rbp on the stack and then overwrites it, using it as > a scratch register. That's problematic because it breaks stack traces > if an interrupt occurs in the middle of the function. Does gcc guarantee not to use bp as a scratch register in leaf functions? David