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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1CCCECAAA1 for ; Fri, 9 Sep 2022 20:21:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 146988D0003; Fri, 9 Sep 2022 16:21:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0F6B38D0002; Fri, 9 Sep 2022 16:21:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EFF318D0003; Fri, 9 Sep 2022 16:21:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id E00C68D0002 for ; Fri, 9 Sep 2022 16:21:49 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id A859516019B for ; Fri, 9 Sep 2022 20:21:49 +0000 (UTC) X-FDA: 79893667938.15.8B2B862 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf03.hostedemail.com (Postfix) with ESMTP id 430F220077 for ; Fri, 9 Sep 2022 20:21:49 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 77570B8262E; Fri, 9 Sep 2022 20:21:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68592C433C1; Fri, 9 Sep 2022 20:21:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662754906; bh=GKpxAviIRf0Cm5Wh0WlIJnPelOqjKCHbR94gPvMQyCw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=PEoFgf9678ZZKfCRW/iY3TZ1QT5zzs1XjdCPolznYEGyMpDx+SY0gUs4HzvJgtzSD 8If15nTuUngVqYWIR0ZH/UJOL4TPc4x0YuzcD/kZyWPoewc9ienTCyUtqcF7D8BgUL s0XIZV5SdEKZqP95oV1dh/yWT/2dV1peQsiUZlb78Knfm20sM++wqvLpvUsyJejTmT AULxkvaK0h3/mfg8ngKALehmsWZ2+boOcdyMRkBH/hV6vSSmiOJEWN9ISVyGakwdOi pWq2xXCNLxNskQN8s7jzsa0PdlOK2YoiS5sK+up+KnlrYbm0ki71MNpXz6OnUCvj+/ XY7uHwUrl3kCw== Message-ID: <8abfed2c-2499-b2da-1e06-ecc188f7c7b0@kernel.org> Date: Fri, 9 Sep 2022 22:21:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH] mm/slub: fix to return errno if kmalloc() fails To: Matthew Wilcox Cc: Muchun Song , Chao Yu , Linux MM , Andrew Morton , linux-kernel@vger.kernel.org, jaegeuk@kernel.org, Chao Yu , stable@kernel.org, syzbot+81684812ea68216e08c5@syzkaller.appspotmail.com, David Rientjes , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Christoph Lameter , Christophe JAILLET References: <20220830141009.150075-1-chao@kernel.org> Content-Language: en-US From: "Vlastimil Babka (SUSE)" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662754909; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=1IRaJlk2HpxUNI0IobvgYNxU+eKNe9u0Hw+C1wBq1Tw=; b=ProqLpYTKFKQlKmBNZR4a1Czp7dYiPzl0Ejw1WO4gxqWqgqMFrpiT26PUdf6aKhlO9wnmb tWF8FcKSsPEeHnPdpYDFVFInzzfR7g2rpT1lb8S6WjQq/P97sD6UP9T3dVMA3Gy5FkfFNT dk6EoJ0z12c2RFl2bdHVfthRzUz/6LA= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=PEoFgf96; spf=pass (imf03.hostedemail.com: domain of vbabka@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=vbabka@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662754909; a=rsa-sha256; cv=none; b=lWJ8WpjN2nYzb6kciekp/h+lJnWHlRFzU4hvIg+QH6UqVPBUiKD4AFcfBum99ow209LpBi JIakETXcQQkdHTlV7+6kTIJ71yNHQ1wiegQFN2JqqEglkRqKCdtTZjfoGJ1l9XttYqZEPN yJr4a0U1/C5j5uoYZlr80RD9c7fz8P4= X-Rspam-User: Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=PEoFgf96; spf=pass (imf03.hostedemail.com: domain of vbabka@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=vbabka@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspamd-Server: rspam06 X-Stat-Signature: dqg9ukdyzpwarif7mym4ryo7qoedaecr X-Rspamd-Queue-Id: 430F220077 X-HE-Tag: 1662754909-692077 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 9/9/22 22:06, Matthew Wilcox wrote: > On Thu, Sep 08, 2022 at 11:25:08PM +0200, Vlastimil Babka (SUSE) wrote: >> > I tend to agree with you. A mount operation shouldn’t panic the >> > kernel. >> >> Hmm kmalloc(64) shouldn't normally due that due to the the underlying page >> allocation falling into the "too small to fail" category, wonder if >> syzkaller was doing anything special here? > > Here's the repro: > > https://syzkaller.appspot.com/x/repro.c?x=17cd7fa3080000 > > you can see it does: > > fd = open("/proc/thread-self/fail-nth", O_RDWR); > if (fd == -1) > exit(1); > char buf[16]; > sprintf(buf, "%d", nth); > if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) > > so this is the kind of stupid nitpicky bug that we shouldn't be > reporting, let alone fixing, IMO. Ah, thanks. Well I'm ok with eventually removing all such BUG_ONs including what Christophe Jaillet suggested, but it certainly isn't urgent nor deserves Cc: stable then.