Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp291752ybk; Sat, 9 May 2020 03:03:23 -0700 (PDT) X-Google-Smtp-Source: APiQypJwliYKWzN+p/CrwSPYeESGOUimvEAa8k4u8xutxoAF6YyIgaGGcA2CC3Gm1/8W20bFOwB7 X-Received: by 2002:a05:6402:612:: with SMTP id n18mr4724406edv.343.1589018602591; Sat, 09 May 2020 03:03:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589018602; cv=none; d=google.com; s=arc-20160816; b=t3QykMlmuLwSCNOg/eu5Q3Q1i5l135G5RdVVynDUtRPW15rzSSJ8v5+05AeUic5yDg LOeFkLwVFjqXam9dhEYQtZXdGP2XJUP4LLT1RNQOgew9EB40AnTi4ikZWuIgmoi42+Ot brIfoXhTCWVDvg0jqSP2FjsV4W2lxlds9LHXdjk7wpNYhfv7aoGS2+IT17wmHpm2RfN9 nQeCYwk3VHsfGblY83lVYWdSxpFNkwW2L5qSFC8xeHB3hLEql2U6v3Jd/e2O/BteLYy5 yH+CcT4vJrfsyqYpEpCiE6Q7mhyBAsKZgApXmg/GO8aCi04/JPuHzg2KJbTPiH1U13ly 5szQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:to:from; bh=077cvcjCXvA/GVlNqTej69XLfgsz1z9RvziYUeLPqnI=; b=WJ7swtocdg7qcaIjcyi0kALpkxvdmwLCWELOBnwlh2DAZqBw8xyd6dNgeIK3d53qqT KXmlGRgn9579tvEchyvbJVBBSj4QiyKOvYH3om7fSgiHMxUQPyTrp++gOaIVsHWu6i68 mQOyJYVYh3OP2hiU2lamaopMG9A3ukSxOcvTPvQrEyCL/IaGDn4kOPMaNtASZHJPC+oX 3paXMeVKnqxhfGi1Q3tcMCTROTzeqEK5ruVUwPscmt7aDIN8qUSISNUNAjR7y1m+34JD 8fDf7LPTvvcmY4h1ZIld/5k2sSkAs+bFSPGtLPJ3aDBXC5648AM/p0alOz3MGL8qk+m+ /vPQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s8si2268683eji.349.2020.05.09.03.02.57; Sat, 09 May 2020 03:03:22 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727780AbgEIKBS (ORCPT + 99 others); Sat, 9 May 2020 06:01:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726600AbgEIKBR (ORCPT ); Sat, 9 May 2020 06:01:17 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F895C061A0C; Sat, 9 May 2020 03:01:17 -0700 (PDT) Received: from p5de0bf0b.dip0.t-ipconnect.de ([93.224.191.11] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jXMHx-0005Kw-J2; Sat, 09 May 2020 12:00:57 +0200 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id 0EECA100C8A; Sat, 9 May 2020 12:00:57 +0200 (CEST) From: Thomas Gleixner To: Greg KH , syzbot , bp@alien8.de, dave.hansen@linux.intel.com, dmitry.torokhov@gmail.com, ebiederm@xmission.com, hpa@zytor.com, jeremy.linton@arm.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, luto@kernel.org, mingo@redhat.com, peterz@infradead.org, stern@rowland.harvard.edu, syzkaller-bugs@googlegroups.com, x86@kernel.org Subject: Re: WARNING in memtype_reserve In-Reply-To: <20200509074507.GC1831917@kroah.com> References: <000000000000f0d8d205a531f1a3@google.com> <20200509074507.GC1831917@kroah.com> Date: Sat, 09 May 2020 12:00:57 +0200 Message-ID: <87wo5l4ecm.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Greg KH writes: > On Sat, May 09, 2020 at 12:20:14AM -0700, syzbot wrote: >> memtype_reserve failed: [mem 0xffffffffff000-0x00008fff], req write-back >> WARNING: CPU: 1 PID: 7025 at arch/x86/mm/pat/memtype.c:589 memtype_reserve+0x69f/0x820 arch/x86/mm/pat/memtype.c:589 > > So should memtype_reserve() not do a WARN if given invalid parameters as > it can be triggered by userspace requests? > > A normal "invalid request" debug line is probably all that is needed, > right? I disagree. The callsite espcially if user space triggerable should not attempt to ask for a reservation where start > end: >> memtype_reserve failed: [mem 0xffffffffff000-0x00008fff], req write-back The real question is which part of the call chain is responsible for this. That needs to be fixed. Thanks, tglx