Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp122856pxj; Wed, 26 May 2021 18:03:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwq5JP0QFQvE3ArN9CljVly0uvdhNLqp59lB+YECrQrZaGbgvVascbWRN5MVZxsbPc6H7Pt X-Received: by 2002:a05:6602:5cd:: with SMTP id w13mr773111iox.185.1622077398847; Wed, 26 May 2021 18:03:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622077398; cv=none; d=google.com; s=arc-20160816; b=joZVZ6ruPZ9iTR2H7RSiupakCIPP9bYygnT6MlRahrv4fFDkuUPKdhiVXHTW1kzjMp dle2Ut8E1voJN24thKWKJ6pACdDpi3y9dkz/bzJ+kX9nmMumVxFq++jADL1syY2jMEB4 aLVdlfV+IDb9X9/RwzZS0ZTvoDiwu5WsTa18xhI32wPm9HrorAdLy7XPI2hSyvLWJj8w 85H5UD9ragDIb0Ydvdsg0uF4f6VBlMpHgm4wUSfSO6Rfv1tRIrAp92coiRKXi4obKNSZ xLqOKVSPFk0QrpqSGfe388RAgB2CRZUhL0AttIiYXZOFOQwIJlIYHAKUpBvIQbZip/8T p7QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=1R1+oKOK6AKPJCvtl/MNUTJVVaELHy93PR6zNhgqkcw=; b=YNlHsD7TlqusPrI4wBG0K77z0bCJAPBMCEoTV7PcP46YZpH3u1PHzv69i7Qyf5gWkN Vvilqor+/O9MlBeYAyzCWQ/8E9C/lHfT6NXdqYjcoBj824fF/qHLhGWWTZtAszjpGKX0 Sbs5+JPgJ14fWAvBr/BOiZ2y5+n+8/Fj4p/q9JwlnjXZY5QTrUi+bDOHerBbHRFDdLI3 +FHPI9ZzTq725RYdxzq1OWcu/9x+XMF5mXkbQ01cz06qp4e3o7zAX3k2mR4/ylcNZaHP +/Bm6ckmZTbaOL6MKWPodmRuxQ/a8uAEjLGX1PPjhxvWl1m7AREJYRlx2GTjhrI4HA/u E45Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KoWtNwOE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si831868jat.37.2021.05.26.18.02.50; Wed, 26 May 2021 18:03:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KoWtNwOE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234136AbhEZWin (ORCPT + 99 others); Wed, 26 May 2021 18:38:43 -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.