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=-12.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,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 95AB6C47082 for ; Wed, 26 May 2021 22:37:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6A63D613D4 for ; Wed, 26 May 2021 22:37:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234356AbhEZWio (ORCPT ); Wed, 26 May 2021 18:38:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:54026 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231419AbhEZWin (ORCPT ); Wed, 26 May 2021 18:38:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ADE62613D2; Wed, 26 May 2021 22:37:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622068631; bh=43f0Da5GThG0RObLByn8HYdzHVg9fpmhqgI7p1//ieA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=KoWtNwOEzjllHtt/B42ALCJ2I5fdxBSBaiiFeLl0T/XZYkGoxCdX6uMYjvBvjOBO1 XGQGOBmhJQFzFotiQ3bqVU5isMmD2B1A8BXjAIAZLnQuTmW11Wv/eBauLD4UuOWRG/ poydu6slWg56FlcqXzjR257YjAbtT+Tn2MQZTp5xKZvCyEIU2aB079JYYU6xSzMAKW z1VK7+szHdnQ9FtSIDEQQZA6aVT+XIIDSBCs56vAeSkBYCduBz5uoGf1MK+M629M9M TBQck1AAbd2sZ0GShMkfsOIQBCKqcNSD9abSCm4liWlC2djKs6Lzj3BXU6xzeFyFd4 nGt7RhcOZdiAQ== Subject: Re: [syzbot] WARNING in ex_handler_fprestore To: "Yu, Yu-cheng" , Dmitry Vyukov Cc: syzbot , Borislav Petkov , Borislav Petkov , Dave Hansen , fenghua.yu@intel.com, "H. Peter Anvin" , LKML , Ingo Molnar , Peter Zijlstra , syzkaller-bugs , Thomas Gleixner , tony.luck@intel.com, the arch/x86 maintainers References: <0000000000004c453905c30f8334@google.com> <27d52fe4-3159-2f19-33cd-01ef4b3e530b@intel.com> From: Andy Lutomirski Message-ID: Date: Wed, 26 May 2021 15:37:09 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <27d52fe4-3159-2f19-33cd-01ef4b3e530b@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/26/21 2:21 PM, Yu, Yu-cheng wrote: > On 5/26/2021 12:00 AM, Dmitry Vyukov wrote: >> On Wed, May 26, 2021 at 2:33 AM Andy Lutomirski wrote: >>> >>> On 5/24/21 1:51 AM, syzbot wrote: >>>> Hello, >>>> >>>> syzbot found the following issue on: >>>> >>>> HEAD commit:    45af60e7 Merge tag 'for-5.13-rc2-tag' of >>>> git://git.kernel... >>>> git tree:       upstream >>>> console output: >>>> https://syzkaller.appspot.com/x/log.txt?x=1591e9f7d00000 >>>> kernel config:  >>>> https://syzkaller.appspot.com/x/.config?x=18fade5827eb74f7 >>>> dashboard link: >>>> https://syzkaller.appspot.com/bug?extid=2067e764dbcd10721e2e >>>> compiler:       Debian clang version 11.0.1-2 >>>> syz repro:      >>>> https://syzkaller.appspot.com/x/repro.syz?x=11be6bd1d00000 >>> >>> Hi syz people and x86 people- >>> >>> I entirely believe that this bug is real and that syzbot bisected it >>> correctly, but I'm puzzled by the reproducer.  It says: >>> >>> ptrace$setregs(0xd, r0, 0x0, &(0x7f0000000080)) >>> >>> I would really, really expect this to result from PTRACE_SETREGSET or >>> PTRACE_SETFPREGS, but this is PTRACE_SETREGS. >>> >>> Am I missing something really obvious here? >> >> Hi Andy, >> >> Sometimes syzkaller uses data format from one syscall variant, but >> actually invokes another. >> But here it does _not_ seem to be the case: 0xd is actually >> PTRACE_SETREGS. And the other ptrace calls in the reproducer are >> PTRACE_SEIZE and PTRACE_SINGLESTEP. >> So I would assume somehow it happened with PTRACE_SETREGS. >> Is there any indication from hardware as to what's wrong with fpregs? >> > > PTRACE_SETREGS can change segment registers.  The PTRACE_SETREGS is > using some uninitialized memory area.  One possibility would be that > XRSTORS has a memory operand outside of segment limits. It's a regression caused by your fpu__clear_user() patch. tglx and I are working on it. The syzbot report is confusing but correct.