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 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.lore.kernel.org (Postfix) with ESMTPS id AD651CCD1BB for ; Wed, 22 Oct 2025 14:24:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wi8KxLCah8lcbhmWr7PuINCokAxKVgBZ5HcczVu1ZQc=; b=MDDLRmH+4WZ3mt yhAaR0iJdWBPN3FQcraNLBvfbs3xRD1VlGVpMHExeBngVFJzaeEmS2X082yLX1yUoy3Tzt2Vc0HVH +NGpGrnh1u+Yqcxlm1QZksgqoOS1EKETQhLEp0A77U3j0cRMc404OnbV3qZK4ygVdX8/miPd8b6OY 8Y/JBEfbyv+isk0iwshUPmCW+CKFfT2q4JMvd33mlDu2sr/b+rtY0+eXoA2IzTrvnhR/VXl2U/Xk/ bFnGJYGEOwTQCQufycEuexMz7wiqVlzmTbJnUXli2QvItRrjNew1TkJ5DHUkSwOoFDRwd4Z0AOb5p BsgkgwlUiSSDAMsPRuDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vBZl2-00000003Chi-0dpp; Wed, 22 Oct 2025 14:24:08 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vBZkz-00000003Cgf-3IBj; Wed, 22 Oct 2025 14:24:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=dctXkstECTenaZhiUiTAEPs/+u3lBJ+4oLit/DWtNCs=; b=W+uMC0i8lkaiKuhkl8eUM+csMP zH9Alfil/ggkWS+mff98nPo9bDIMkuW8K5C5+KY2e8934/ExnLSA4XSDvs16qF9TmynNu52oe7tVO alhtY8gr8526Ul/GMwiNjT57GxRn6C1/yPzHIibpvNmoPRJeplLP1368i919MkX3vMD0TfWO58XqB EaUXdGG6nfjfQNZR1hVFszBgQD2CFgdZfn+DgZnjBkiVlcKh5kkIe9C65p09XP2z5JubaB3DW+xwx QnSnO4coWaBJMspnjlZNpjlij/u6mnQPePfu4Nb2uYSAp9cc5ZSqjPHhLdI24izWy1wkOQRbI8Bdl /7A8lvtg==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vBZkt-00000007mfm-1HRN; Wed, 22 Oct 2025 14:24:00 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 542B830039F; Wed, 22 Oct 2025 16:23:59 +0200 (CEST) Date: Wed, 22 Oct 2025 16:23:59 +0200 From: Peter Zijlstra To: David Laight Cc: Thomas Gleixner , LKML , Christophe Leroy , Mathieu Desnoyers , Andrew Cooper , Linus Torvalds , kernel test robot , Russell King , linux-arm-kernel@lists.infradead.org, x86@kernel.org, Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , linuxppc-dev@lists.ozlabs.org, Paul Walmsley , Palmer Dabbelt , linux-riscv@lists.infradead.org, Heiko Carstens , Christian Borntraeger , Sven Schnelle , linux-s390@vger.kernel.org, Julia Lawall , Nicolas Palix , Darren Hart , Davidlohr Bueso , =?iso-8859-1?Q?Andr=E9?= Almeida , Alexander Viro , Christian Brauner , Jan Kara , linux-fsdevel@vger.kernel.org Subject: Re: [patch V4 07/12] uaccess: Provide scoped user access regions Message-ID: <20251022142359.GQ4067720@noisy.programming.kicks-ass.net> References: <20251022102427.400699796@linutronix.de> <20251022103112.294959046@linutronix.de> <20251022152006.4d461c8b@pumpkin> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20251022152006.4d461c8b@pumpkin> X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Wed, Oct 22, 2025 at 03:20:06PM +0100, David Laight wrote: > I think that 'feature' should be marked as a 'bug', consider code like: > for (; len >= sizeof (*uaddr); uaddr++; len -= sizeof (*uaddr)) { > scoped_user_read_access(uaddr, Efault) { > int frag_len; > unsafe_get_user(frag_len, &uaddr->len, Efault); > if (!frag_len) > break; > ... > } > ... > } > All the scoped_* () things are for loops. break is a valid way to terminate them. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv