Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3147316rdb; Tue, 26 Dec 2023 19:03:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IEUXYGXs9hDf/KqFtmhztE1zwFwKvgxb6fiJbl0R7ao/q363Ve7MJOra+AWjKI4HJeTiiXA X-Received: by 2002:a17:902:e789:b0:1d3:e250:eb66 with SMTP id cp9-20020a170902e78900b001d3e250eb66mr9152418plb.81.1703646239024; Tue, 26 Dec 2023 19:03:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703646239; cv=none; d=google.com; s=arc-20160816; b=BU1GsnrSOJK+tRjhzkCITEHmdJV0dL2GErTOY8Yntf89/GjraZgqTFUXgZTTEJ5joJ C7n3NTN4etbfYLpZTAlfRr8B6Ntv55OiLkmil0Hr2EbyFHmLzbD7/2PphHe5Uj10DCpb TtNiqkE0g7EQwAewTH+/olYcOj5WUJew0CR5hLTBwo8Mc39CvII1dFrt5Lt7looIRFac f4oFts1WSoZExegAsWMH0Tto2jULifYrbYXt/+Jd3KpcameYE3rTe9WX6ALpUA8xbH/X k+YEwi9aGE5Cq26JFaZ/fefraympylqD/pyGmluGOypa6/ItpWrGkuY5wMO/XfaOR/zu jPFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:date :subject:cc:to:from:message-id:dkim-signature; bh=oUkaS1sJVaXK+BY4ope+OPz+sUYoqu2NxZWQgnK+Vvs=; fh=l76QQN+sLwBC2OOG4c9ru+LUJwf92sGQ/Jqii/hYCTA=; b=JCzH56bCxugTYDEt5xW3PO+huYL8MbCGl2UdNiEmOQrGqINP6ReTpciSmNDT5aeUvD zHXBZH+11SX3FCwi+ceQbNw7Lq06TyH/oPOTgHydF4FkdvWSau9SixQTjgov+tjBGguE m2oHzZ/b6IGukSC/uiXbTCPiS66pUTaHXDzwBEfmr/4rI1jcGTru03uBjpBHaHUPvHDQ jTHz+r9MkINDDmFq7hC4fxt2MXNoLcAaIlZADEo6eOoF4hhhIp7HS+hqwf71JHEIr6GH NVUkxPFRvwuj761HiXhtBS/XMX9lMhUUykM9vO87fl9fWKZcFnPQKOiv83cRNNOydoSK mnuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@qq.com header.s=s201512 header.b="C8/tcH2w"; spf=pass (google.com: domain of linux-kernel+bounces-11792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11792-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=qq.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bc7-20020a170902930700b001d3a6cb519dsi10240888plb.543.2023.12.26.19.03.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 19:03:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@qq.com header.s=s201512 header.b="C8/tcH2w"; spf=pass (google.com: domain of linux-kernel+bounces-11792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11792-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=qq.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7A00128270E for ; Wed, 27 Dec 2023 03:03:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8AE8B3C23; Wed, 27 Dec 2023 03:03:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=qq.com header.i=@qq.com header.b="C8/tcH2w" X-Original-To: linux-kernel@vger.kernel.org Received: from out162-62-57-210.mail.qq.com (out162-62-57-210.mail.qq.com [162.62.57.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F0FE3C16 for ; Wed, 27 Dec 2023 03:03:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=qq.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qq.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1703646218; bh=oUkaS1sJVaXK+BY4ope+OPz+sUYoqu2NxZWQgnK+Vvs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=C8/tcH2w+a4wBMBTRFzE9U053fdalr34NsmWMmaTmu5rE6sL5oPCDbcDOG2kXoo1R 8AHAZyz3Y7+S/RvCKQSF56glo5UP4TCsNzwIksg5SYCxBwKdRiNW9a6CkyTAb0hYW2 Axn7w05bOJfPQ679q9dXt6oaIORgZdB5IrwmKdMc= Received: from pek-lxu-l1.wrs.com ([111.198.225.215]) by newxmesmtplogicsvrszb9-0.qq.com (NewEsmtp) with SMTP id 6C4B2A3E; Wed, 27 Dec 2023 10:27:04 +0800 X-QQ-mid: xmsmtpt1703644024ti5p1auwv Message-ID: X-QQ-XMAILINFO: NRN3UPsLzYKVVo5pFEUSl+h02cm1Oaxah5rMsx3/K126T6zN+PWs+uKOj8HQ/g 7oH+q9TVPUzXB4y9TStuFnEh4o7A7MzLtZ6b5+pnRytJzFsqKSQPELJ5vFP8FsF64BB6VHtLa1zp 3kLu8PTlyl7PLOLIhLfWK+iVLf81BhXmKOoiiMBKrsAHG1JtD6c/x8MIpnyNFQ5H3739jDPRc01P hR21jzApjkgsXRQTw1+RkK8Vb7IVnjoEPO8AMDnrg7RWIKMQDmV6wp6aYy8FtOP6oU56xUDoIURp 2z1M7uA+8s6bo+QZ9bU1gjjSoYGsXgpJ+muta9rJTeap7dE09VLBLXFnVF4Qft/EII/ivohUQy9B PTckkScbPLQWhVfYhcp8NvNbPrHA47deWuDNbLwBJokV8kEk3bqQ+mxlnyWgHkFiS9gftVSGfJpF XlyStm6wdiProVoe1d6YOZx3MF408q+gwZ6whMVsP82NJzmcCILQ4t/EV2bEjVcyrn9e3wjcHPj/ pvg1ih8jp7erLKFLAAl5ZLgXqsdQ01vXkM74IXmIkq6hQozsxrrz29aTU2siQpaXAe+dchHM2fCd MLgqjTm+9xGx7AIXBMQr4IyVcFa/l5hqGIZ5zBp4MgBgZGvF1hToOR5vTlr1lriYInXjcQvtMlNB 07G8ShoCJi4JjE50uhQ3mbpZpkiODTL+cBSi5/JFW4ufooCMOialGrw30rJoiZBcKkq0dC52UIL9 uNP7fC3K1J/IBcN96E/iv5ng07nw6ghtFg07H9A3H+a72MTmbf/zciCXVwN5oKxYPiPVBOphyeGe 2q6qFYRXqlWieJszRLGq9XHbAYxHXfjHQfbGksLOq2PYOdHbNbUVJ0MvJZ0Vp1FuF85Fe0Yd4yq1 X1U33xI/Rmaqblvf2P9D6iNWVb9oT8cTEqwgPwoHtHgGYLBqinRBOIjV7cjQS9jg== X-QQ-XMRINFO: MSVp+SPm3vtS1Vd6Y4Mggwc= From: Edward Adam Davis To: syzbot+3eff5e51bf1db122a16e@syzkaller.appspotmail.com Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [perf?] WARNING in perf_event_open Date: Wed, 27 Dec 2023 10:27:05 +0800 X-OQ-MSGID: <20231227022704.2089296-2-eadavis@qq.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <0000000000000b05cd060d6b5511@google.com> References: <0000000000000b05cd060d6b5511@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit please test WARNING in perf_event_open #syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 39676dfe5233 diff --git a/mm/madvise.c b/mm/madvise.c index 912155a94ed5..8fd3e00af243 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -1405,6 +1405,9 @@ int do_madvise(struct mm_struct *mm, unsigned long start, size_t len_in, int beh if (!madvise_behavior_valid(behavior)) return -EINVAL; + if (!start) + return -EINVAL; + if (!PAGE_ALIGNED(start)) return -EINVAL; len = PAGE_ALIGN(len_in);