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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6C7EC05027 for ; Mon, 20 Feb 2023 14:45:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229514AbjBTOpl (ORCPT ); Mon, 20 Feb 2023 09:45:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232206AbjBTOpk (ORCPT ); Mon, 20 Feb 2023 09:45:40 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B4D9A5E4 for ; Mon, 20 Feb 2023 06:45:38 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 2BC7520155; Mon, 20 Feb 2023 14:45:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1676904337; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iLMWt4DJEoLoIGBt435mazCE5HdxhhAENzSaX63u3jM=; b=KU7RwPYRJOdAwPESmRgAUM1oSjXx6AEpdHjHTt5fqHIOCmtLULCjF80EbdWU3UTsldEzq+ Ogdb3DQC8Yn2BfGm7PXtWx+cAs5XiOowEZRLLlbvjJESZg3bWdPFE/upvZS9VGbusPnkAT pvfmjBL8mQxnPW0eWiYmIZ+L0qvK2x8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1676904337; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iLMWt4DJEoLoIGBt435mazCE5HdxhhAENzSaX63u3jM=; b=KxtwDAhwuWxsm3Eh5y8p8kNv/xRl+NgV40zhwBXlwSnKYlsjbnh1xgQLxSP5S1xoDNogqn WSol/nSAaLMlkFDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B060B139DB; Mon, 20 Feb 2023 14:45:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Stp2HpCH82M3PQAAMHmgww (envelope-from ); Mon, 20 Feb 2023 14:45:36 +0000 From: Gabriel Krisman Bertazi To: Wojciech Lukowicz Cc: Jens Axboe , io-uring@vger.kernel.org Subject: Re: [PATCH liburing] test/buf-ring: add test for buf ring occupying exactly one page References: <20230218184618.70966-1-wlukowicz01@gmail.com> Date: Mon, 20 Feb 2023 11:45:34 -0300 In-Reply-To: <20230218184618.70966-1-wlukowicz01@gmail.com> (Wojciech Lukowicz's message of "Sat, 18 Feb 2023 18:46:18 +0000") Message-ID: <875ybwe6pd.fsf@suse.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org Wojciech Lukowicz writes: > This shows an issue with how the kernel calculates buffer ring sizes > during their registration. > > Allocate two pages, register a buf ring fully occupying the first one, > while protecting the second one to make sure it's not used. The > registration should succeed. > > mmapping a single page would be a more practical example, but wouldn't > guarantee the issue gets triggered in case the following page happens > to be accessible. > > Signed-off-by: Wojciech Lukowicz > --- > This is a failing test, needs the patch I sent earlier. Reviewed-by: Gabriel Krisman Bertazi -- Gabriel Krisman Bertazi