Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp693224lqo; Fri, 10 May 2024 11:43:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWvjxlwiTRjK3BJJOCpsFWYYCZbjR5FLLxw8GYuBCz6kZA1lFIBRsxyUy3X8LnSZZheWkL4T+3E+r9zWv1qi+Ejt9ikSQ8nK0ZXcQgtgw== X-Google-Smtp-Source: AGHT+IHMBH3q557ra0BwwofmqbHLD4HXXgshecqIsjg+F1rKvWI5Er+NP0V6kVn1YFP+MadLduNN X-Received: by 2002:a19:7410:0:b0:521:7846:69d1 with SMTP id 2adb3069b0e04-5220fa71b8fmr2159520e87.6.1715366584189; Fri, 10 May 2024 11:43:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715366584; cv=pass; d=google.com; s=arc-20160816; b=kA6s/NTL5AGxy18bsbbbymB4IwHiVCBh6fjBztAheyMf/UwD/0ZEfYo1pYgzw3mNqJ U/n/C73dcRgn99slsvMMH+KCX1VB34D8Q1/eMFnDrBeAQR9vUOQtlRYvIF8MOfODv5cB nhB1/OJlE9EDdnctKYdODDSV8VfWd2mf9HSZawMpI/Y/3o+E0M5kquWwiE7e+9h6xYg1 MOuCFsjY7siu++4ylfu9GypxLMJmWXcz6m9a/1iw399zfgz28K1I9Lapaa5id6Pg47aI yzqFumCdmA0SJk/aB5EfhiEZttt8tFBv5pZRlVJsAq5sQFfUkZmwDfgW45cxyG3/eloE I1Wg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=J3oWdN9YWIIW3kYVAROI1Ro46768bem/3Y4bbZGnkWM=; fh=ibdFeplQ8Q2GvtN3isCJ0d/5S8LTZa2dXZuQJo7RNQ0=; b=dglYUynucKym6mUCn98+rNYVHC/NelN8TBoavE3tz5unC9XowCMY95QpW2WcmZjYUh qziO/HHf2wBKEJwuUcZlmcOAyeao9PicLAaJd1e3yeGutRV/hL1oF22NX/vIeugjcxAo cCU5hheg223scO3h5B86ii8eKdLeD/r3PKtO94CHpwZxKiFHf6jUP/5AIhc8oSItKZ8V P1X56mB+cC9IfrcgzpZnbdFob3WL1G0aOlTtDrnKEWQ0aeRJTqXUdo3+WL/IVVp5u6s6 ROTEA+odPAuX0pRwcfKIoJsBdubY3lBFrXvBIctXntV4bW+/u+E929MVoHRxWp245fbY vF2A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-176111-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176111-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17b21edasi231728366b.398.2024.05.10.11.43.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 11:43:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176111-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-176111-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176111-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 E29571F21FBE for ; Fri, 10 May 2024 18:43:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3DAE43ADF; Fri, 10 May 2024 18:42:56 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4B7E01C6B8; Fri, 10 May 2024 18:42:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715366576; cv=none; b=IYBIk8w47GzJ6fWrm3EER+/ad43vKamYN1XTiLuxkkzCI+0gmx4sctRYlAcf3Me4eI2CUpNp1mYMxX96vZqo2R+KW3lGnQGwjJIwVBpP4inpifWsz2pqM8QfFQTlfk/m22zl7rOaTAQ3TZi3C4hsM0UDSu7u0nb9LaV5+Ss7VoQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715366576; c=relaxed/simple; bh=gms4cnzhR0dzSd+wzL/32mivfCz+W751yaMNuoAxlII=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QEe8V3CREX//w6EOLjE5MC898aGqW7kmF3L8bIJLsFKKqCwzp9EAfwBImkwP0PppW/ItTAOxXRF6Z7tEmEdB3Olw3Pp19MrlioM1ZIn87WXNyoe9TJJtExu0VUMxKG/9jKpMNVfj6q+gA91FwoAjOqiTjZ5oBuveeUWhtCCQLkI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C08CC113CC; Fri, 10 May 2024 18:42:55 +0000 (UTC) Date: Fri, 10 May 2024 14:42:53 -0400 From: Steven Rostedt To: Vincent Donnefort Cc: David Hildenbrand , mhiramat@kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, mathieu.desnoyers@efficios.com, kernel-team@android.com, rdunlap@infradead.org, rppt@kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v22 2/5] ring-buffer: Introducing ring-buffer mapping functions Message-ID: <20240510144253.4b865a40@rorschach.local.home> In-Reply-To: References: <20240430111354.637356-1-vdonnefort@google.com> <20240430111354.637356-3-vdonnefort@google.com> <20240507223402.206d6ddc@rorschach.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Fri, 10 May 2024 12:03:12 +0100 Vincent Donnefort wrote: > > I'm not particularly happy about us calling vm_insert_pages with NULL > > pointers stored in pages. > > > > Should we instead do > > > > if (WARN_ON_ONCE(s >= nr_subbufs)) { > > err = -EINVAL; > > goto out; > > } > > > > ? > > I could also nr_pages = p in the event of s >= nr_subbufs... but that > really that shouldn't happen so let's return an error. I'm good with this. It should never happen anyway. -- Steve