From mboxrd@z Thu Jan 1 00:00:00 1970 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 1852E2F5B; Tue, 18 Nov 2025 05:05:25 +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=1763442329; cv=none; b=KoWukFQ+duASjNUbtoAR28PxJ5XTFjeM2LaedhBOMFEtGlo5Qka8DpSbtR0RAg4vssyN98H9xRl9Wk/0eVYEOpMKDzJgjSs7RMx3xfduZufdEfGMXJ27U5oiG7o1OlH9jYFk3xf/VPcAcrYOV4MA4MvoJK/GOPFffWhdgAphwws= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763442329; c=relaxed/simple; bh=SHlkRhp66jJGKPW3LKbgMCk7sBsIBS9CAsVB7PG2kfE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Dx0+RNPHWigfMDxSPRdUHmvfEzCFMtNO1he8zKsk68AH1T+RQPC81O4yl3+FCkntdjmRdoto+1FnQqysUUKz/y6ROpbNINOR/69Iqc5p3dUDaNAjZZMF7y0uzDjN8t+ILGd48iVfJ8O9B2jKTty8ll2N7juzknDqmtcoSwH0VMk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=3FLsg8oc; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="3FLsg8oc" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=HNapumT3u3cvg+LB7F7jDnuORw7Am+MenBUILnbf34A=; b=3FLsg8oc/8SF/EtTA96c5fyT3M 4DeoEqtENiNgzKY1vcGzYH+/o+gsVgYU3B/3LP3UZhd+MKzEpOKB4aHyZ6JSl5nMLVMLolfilj/Vn V4ECNZnEH02rbw4uR2hVs1d1NXUxksldq9n1m500Hw1z7sKEAIR/1xsjZeSqjddazSY9npmFNJnb2 ZXDUGHaILXo8NljKBcWAxKr7KsiO2wixMvya3QizH2aulIcTAFYBzbkSrYd6XCnCXAlNhoqEDTJ9D RLqQjiyQMyp5ik7gte1/pEnIa03haz5iZNQSedAeVA7Be3cfcWM2B7AKu4l5AGe1DDZQpe06jqGK2 wvV4Qa9Q==; Received: from hch by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1vLDu1-0000000HPKf-2dew; Tue, 18 Nov 2025 05:05:17 +0000 Date: Mon, 17 Nov 2025 21:05:17 -0800 From: Christoph Hellwig To: Matthew Wilcox Cc: SHAURYA RANE , akpm@linux-foundation.org, shakeel.butt@linux.dev, eddyz87@gmail.com, andrii@kernel.org, ast@kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linux.dev, skhan@linuxfoundation.org, david.hunter.linux@gmail.com, khalid@kernel.org, syzbot+09b7d050e4806540153d@syzkaller.appspotmail.com Subject: Re: [PATCH] mm/filemap: fix NULL pointer dereference in do_read_cache_folio() Message-ID: References: <20251114193729.251892-1-ssranevjti@gmail.com> Precedence: bulk X-Mailing-List: linux-fsdevel@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: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Sun, Nov 16, 2025 at 10:32:12PM +0000, Matthew Wilcox wrote: > I don't think it's necessarily all that hard to make buildid work > for DAX. It's probably something like: > > if (IS_DAX(file_inode(file))) > kernel_read(file, buf, count, &pos); > > but that's just off the top of my head. The code should just unconditionally use kernel_read(). Relying on ->read_folio to just work is only something file system code and library code called by the file systems can assume. Something reading ELF headers has no bunsiness poking into this layer.