Received: by 2002:a05:7208:31d3:b0:81:e143:7c29 with SMTP id v19csp400996rbd; Fri, 5 Apr 2024 07:52:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWRywV1YjPcEQi5IGG704h8mXtW/HbuyY91IJkzJksoQdnyKfRlVt8OeeNHmhNFqSzMMGt7JeDeck+14De71sz4wvzFLvnDMPHq4qIVrg== X-Google-Smtp-Source: AGHT+IFigNah0XJ0qdJ0e4hirXpftLPaoi6et9rwCpGoRmujI51vgvvTbFkYZNgUR1wSaCgBzXGK X-Received: by 2002:a05:6512:3e17:b0:513:5dc3:9ebb with SMTP id i23-20020a0565123e1700b005135dc39ebbmr1672086lfv.4.1712328779534; Fri, 05 Apr 2024 07:52:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712328779; cv=pass; d=google.com; s=arc-20160816; b=sdyAZukbjIlTAxQ6vQCb6WmJIbYAEbXm8+qfzEkxuCa94lGdojOCyMfgcoO1uVfrEt sGvsC+lOUvH2ndcKITOsKG/F9AtadWGQdDPn9eCd3sqAlgYRpfUb5mkcmx7VM6Af31in EIMKj9A7iDaKnsQqdnV9X9HJ43lGgxCaCD4PhEs6uwZNmJVWpvaCmpuJt3NRh6tB8zwU 9y4CQamMb9rdT6UTwSCtJHIcbT3zgjCeeMTJISLtGe34NSPrPa8XY8Jv30w0Kj251s1I IDWfYXfybNcB4jZAPRBt/fsvN28TG0QYH62uYlbhZPbGtXFaRFK8RkL3vYPayuD+H0YL /+cg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=v/ZOR02BUVvzffOIFYkY8SUnWa86XSYNrTvHpc/hi4Q=; fh=ZRwcMFEPjeDv0TApyTTrIsSBcD1GrdpxGLwmdr0BfzA=; b=JTR1yeM7Y36+iZ/lNb7TkwpKLIc9DY8YKNKwVMLiPsEl8mwQS1oNjbv2ozl4BqVwG0 +NlOlWQLANhifA3PelYeaDBo6XWMdpltd9Md1DPuvjmXI0PJb5r0/PvArkRwhvQqc82j OLp7Fe0aOLY40VnT8JeeX9IVC+Wf3Kq9i1VYdFAEbGbW1o634NwaUx7kqF/ha53otV6e 0lqN4iIGGpwX728skzXs1Azqol0pMnKDQgyLXOVHBvnABB6vZYUYgfKD8tfBSQzfceHD hQ1jc+Yq8PiJVxzN6hEGo/TDeRMZpEWEFSgbCM3rqunraQIyRGenaixt8CxplO+rYbvD gkwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-133196-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133196-linux.lists.archive=gmail.com@vger.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 ds13-20020a170907724d00b00a519ff0c0a1si811741ejc.513.2024.04.05.07.52.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 07:52:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133196-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; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-133196-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133196-linux.lists.archive=gmail.com@vger.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 833791F22838 for ; Fri, 5 Apr 2024 14:52:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3242616F82C; Fri, 5 Apr 2024 14:52:48 +0000 (UTC) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (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 3744716DEAB; Fri, 5 Apr 2024 14:52:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712328767; cv=none; b=QulPvWPx2+GlWsptP0WorpQQmZxR0fbi9rWbl3AQPhtcLik97wQGVUxekxpFQ9JCYIrmc086FB1PurYoCzcJJM1gW2M6h+pfk/GUzcPx++m4N+N2UVrbtbLxMyyc5AhC94kIxU0NnXIcV3AbunvhheCKwEYqlw2WJZ58829LtDc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712328767; c=relaxed/simple; bh=bL2giRgf/f1M6TVUVmUCOeofYNHANZ5VQjcrrlLM6V0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GBNxoIoekZUBuOOKU3r8uYqcIuh8Z79bpLjBhp5Id0aaqP1rflW3Z/2yQpV06noLPSW3ImXz4uEbV3B9PssQArnLYYre7bDjeYsLlcTsq1ilRNsI0j5UdSNFRN/QRV18aNYG0a25vuh3o+gOSwtlU/tjkhhVEQM5q7h93+e64NQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 354FD68D08; Fri, 5 Apr 2024 16:52:41 +0200 (CEST) Date: Fri, 5 Apr 2024 16:52:40 +0200 From: Christoph Hellwig To: Christian Brauner Cc: Christoph Hellwig , Amir Goldstein , Al Viro , syzbot , gregkh@linuxfoundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, tj@kernel.org, valesini@yandex-team.ru, Jan Kara , Miklos Szeredi Subject: Re: [syzbot] [kernfs?] possible deadlock in kernfs_fop_llseek Message-ID: <20240405145240.GA6931@lst.de> References: <00000000000098f75506153551a1@google.com> <0000000000002f2066061539e54b@google.com> <20240404081122.GQ538574@ZenIV> <20240404082110.GR538574@ZenIV> <20240405065135.GA3959@lst.de> <20240405-ozonwerte-hungrig-326d97c62e65@brauner> <20240405-liebschaft-effekt-ca71fb6e7699@brauner> 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: <20240405-liebschaft-effekt-ca71fb6e7699@brauner> User-Agent: Mutt/1.5.17 (2007-11-01) On Fri, Apr 05, 2024 at 03:48:20PM +0200, Christian Brauner wrote: > * There's early_lookup_bdev() which deals with PARTUUID, > PARTLABEL, raw device number, and lookup based on /dev. No actual path > lookup involved in that. > > * So the only interesting case is lookup_bdev() for /sys/power/suspend. > That one takes arbitrary paths. But being realistic for a moment... > How many people will specify a device path that's _not_ some variant > of /dev/...? IOW, how many people will specify a device path that's > not on devtmpfs or a symlink on devtmpfs? Probably almost no one. That's not the point. The poins is that trying to do the dumb name to bdev translation in early_lookup_bdev is wrong. Distro had and have their own numbering schemes, and not using them bypasses access control. We should never use that at runtime. > So /sys/power/resume does systemd ever write anything other than a /dev/* path in to there? > Hmm? You never do that? It only accepts devno. > > So that takes away one of the main users of this api. So I really > suspect that arbitrary device path is unused in practice. Maybe I'm all > wrong though. I'm all fine with just accepting a devno and no name. But I fear it will break something as someone added it for whatever use case they had (and we should not have allowed that back then, but that ship has sailed unfortunately)