Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp219585lqh; Mon, 6 May 2024 17:31:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVue8nXG//Bwq8ZYX0fYKCRaGct+L7X96Z3Xya6/cWFOXUZEPmCTKPc+3OnuzLneJLEuTdmLQLEJjHJir3WM+WN39Myhb/Y8dgnq+HMJw== X-Google-Smtp-Source: AGHT+IE4LcPQtZMT8AsHN5K38G3fN1w3jUEXchM1LKlGo4Pglv01L51CHzauSc3ZfiorGZoNF51J X-Received: by 2002:a50:d595:0:b0:572:9d22:eb8c with SMTP id v21-20020a50d595000000b005729d22eb8cmr9133387edi.15.1715041874112; Mon, 06 May 2024 17:31:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715041874; cv=pass; d=google.com; s=arc-20160816; b=dWtfIsJHvgqBKQxDx9uh84NAOzq6NebHqrP16DWXqMomScfJE8jKcs5RCitEz/TPny j7MwDSLyxcZBeSr7YLbp8elCxqY2bYo/N13zVFROVAtBDzfnUudTzQFvW+RW1FRh8NO8 mVpx3BTeK9FaybxlBtBmv1GFvRofYljiUDH0gswaXnKvKN4IBSrSrHzV/vxh0wBsbn2w Ak8ZpxdRDlxNdD3OIhUIFAZq+2q3WI/m+ih1iqyRrDRa9ivEHvxfHAzvCmk4fTIdcXhs QTN0x6GA5I9lB5TTlIHZOuSOPZoHGIEjYMEUNeJVuVVnQ0/K/0ThCZTPYntnORRw03gq K7mg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=eVoHe7gki5cWDhouGnejYKP4ZymSrtyZjdYp0G0mgKs=; fh=l8rPUGOov1ir5gRH6XS/2i6PV2hV1KyH/5VFCW5ji8I=; b=JxZ+HwHpQzB8Quc1SgalQzgtscEv5l/Qb0dyNGyPSGKyWCyiiqv3ULaOImhbkTwb0h treXnFMX+oHCvm+xD8nGbfC/RzIOIcBejPGZEh5g9VTH0/crx4olPBhaozx+NtVECKFB 1V8tO8x8FX8O+VF2bcv8b8K/QiIHY4XxLf/jTxraTNmo38rT3DbMl1CjCR+ZZkWh86Ao kICy0hAud9X33DSdp6RMMIBJ2LIZaYpgzIkHlR8tAESx+RhwGen/m/RXVNDh/3yiufvn N1fgOasU24ZsmDnEuulMmLuSwY7uZVv6RcyC+UjtSmDRsN2WcEtAUrGHD8u4zY4tkcWj 2kfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=mWLcirb8; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-170522-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170522-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id i9-20020a05640242c900b00572e6fbab11si3398753edc.166.2024.05.06.17.31.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 17:31:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170522-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=mWLcirb8; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-170522-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170522-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id D10591F24A24 for ; Tue, 7 May 2024 00:31:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9FD2D4A3F; Tue, 7 May 2024 00:31:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="mWLcirb8" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 891AC3209; Tue, 7 May 2024 00:31:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715041864; cv=none; b=F+TMHyPEbVyRp5yHF7Y5TrDkUB98J8S9ojVbynj6kYo9yTFTdwxcgcSNIdR1kMh5Px3TtIcmD/ThG10adDAh5w3shjJnxWR/vvcNbMTCn8eaZIFoX0SEI8UCEWRutTLJBz0NFNlv8pt5qIAnrt9oRqrYnFem6CAk/GfZvJeqBKE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715041864; c=relaxed/simple; bh=6K/qVLxvWM+JIRdXSYZ3gg4O0292aBjfYPKpsDaPkkc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=r9IwFaWtj0XFW+QGM6xWmZ1NtJnwxzyeNdQPR7SltuMINtrzEV8cFOTKuWrgsTLHLKxn5qzFlX9g+DmLvHsU9F3AYP3cn4QpVGpMCR45i9MvlxcNB9t2VUtAgAWz57mQQHwsqXZvVR04aRTGagzSvwk9Dmms7qp2HBir+4PbUGs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=mWLcirb8; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=eVoHe7gki5cWDhouGnejYKP4ZymSrtyZjdYp0G0mgKs=; b=mWLcirb8e/jEqvmhJ5A9D8/csD GZZ6qmjoVb/dLSKXjivspzcuigXDctbMT0xjlSfuxYiNClIYJRz5tk4mOOh/tlTKRSoxpSCb10GEH qxpWb0wEa4LHrM62CK7RezooI1KocproXqycgvEfDhml8xak9raWOh7W36eU2O6VJcj9mqcL0TDt9 Vk6AWv+cSLHqbslgSgK23PX2aNc9yf55LiY3DxSs+6pN9qIMmAiTgMdSeEnxF74MOgXfqXVywu7lm xulB4lhrD0MDVF5NTWxLh+Gxg0ExHXWZlXw0Dsa9sSee5/3frZ+/pvlVLFFTUjlemnyLWuIodKEEM rrcABVHw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1s48jT-00000009A5v-15iX; Tue, 07 May 2024 00:30:59 +0000 Date: Mon, 6 May 2024 17:30:59 -0700 From: Luis Chamberlain To: Andrew Morton Cc: ziy@nvidia.com, linux-mm@kvack.org, fstests@vger.kernel.org, linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, willy@infradead.org, hare@suse.de, john.g.garry@oracle.com, p.raghav@samsung.com, da.gomez@samsung.com Subject: Re: [PATCH 1/2] mm/huge_memory: skip invalid debugfs file entry for folio split Message-ID: References: <20240424225449.1498244-1-mcgrof@kernel.org> <20240424225449.1498244-2-mcgrof@kernel.org> <20240425140126.2a62a5ec686813ee7deea658@linux-foundation.org> <20240429092307.37bf51c79f70bad4922f6277@linux-foundation.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240429092307.37bf51c79f70bad4922f6277@linux-foundation.org> Sender: Luis Chamberlain On Mon, Apr 29, 2024 at 09:23:07AM -0700, Andrew Morton wrote: > On Sun, 28 Apr 2024 21:04:50 -0700 Luis Chamberlain wrote: > > > On Thu, Apr 25, 2024 at 02:01:26PM -0700, Andrew Morton wrote: > > > On Wed, 24 Apr 2024 15:54:48 -0700 Luis Chamberlain wrote: > > > > > > > If the file entry is too long we may easily end up going out of bounds > > > > and crash after strsep() on sscanf(). > > > > > > > > > > Can you explain why? I'm not seeing it. > > > > I couldn't see it either but I just looked at the crash below and > > its the only thing I could think of. So I think its when userspace > > somehow abuses MAX_INPUT_BUF_SZ a lot somehow. > > This isn't a good basis for making kernel changes :( > > Can you investigate a little further please? Sure, this will require some more time, feel free to ignore these two patches for now then. Luis