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 63426C433FE for ; Tue, 18 Oct 2022 09:24:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229892AbiJRJYM (ORCPT ); Tue, 18 Oct 2022 05:24:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229999AbiJRJYC (ORCPT ); Tue, 18 Oct 2022 05:24:02 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FA9EACF4B; Tue, 18 Oct 2022 02:23:51 -0700 (PDT) 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 2796E2002A; Tue, 18 Oct 2022 09:23:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1666085030; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DU9aUKfe8YiSdBMpeyV3GLQ4rLKutE7C4dx+hv01OMA=; b=D5kpcQm7hez0sNUS250ZsyzcaSWlOuOBwJG9lit3I05Nd/OiZUCYSlfz8zuR5p+jxXURLs wxle+PgXojzSsvryNl2RZQREddF9ApdaQyGwwfJuT2OdPsVmh9ces+hoqsZCc1kSN+w33w TiEBC8Bx7ifq2rCzB9KznbQz1XcaJto= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1666085030; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DU9aUKfe8YiSdBMpeyV3GLQ4rLKutE7C4dx+hv01OMA=; b=GKP62Khoi8ff8rvlt5e3xjTGfC3MxZUlCsNI+gWmPw3lnmvdgAa52QxddcTrhgfbtYQsLq KEQx3IEuu25sIgBQ== 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 6B91413480; Tue, 18 Oct 2022 09:23:49 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ghoWGaVwTmPWBwAAMHmgww (envelope-from ); Tue, 18 Oct 2022 09:23:49 +0000 Message-ID: Date: Tue, 18 Oct 2022 11:23:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH AUTOSEL 5.4 10/13] kmsan: disable physical page merging in biovec Content-Language: en-US To: Eric Biggers , Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Alexander Potapenko , Alexander Viro , Alexei Starovoitov , Andrey Konovalov , Andrey Konovalov , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Christoph Hellwig , Christoph Lameter , David Rientjes , Dmitry Vyukov , Eric Dumazet , Greg Kroah-Hartman , Herbert Xu , Ilya Leoshkevich , Ingo Molnar , Jens Axboe , Joonsoo Kim , Kees Cook , Marco Elver , Mark Rutland , Matthew Wilcox , "Michael S . Tsirkin" , Pekka Enberg , Peter Zijlstra , Petr Mladek , Stephen Rothwell , Steven Rostedt , Thomas Gleixner , Vasily Gorbik , Vegard Nossum , Andrew Morton , linux-block@vger.kernel.org References: <20221018001102.2731930-1-sashal@kernel.org> <20221018001102.2731930-10-sashal@kernel.org> From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On 10/18/22 02:22, Eric Biggers wrote: > On Mon, Oct 17, 2022 at 08:10:59PM -0400, Sasha Levin wrote: >> From: Alexander Potapenko >> >> [ Upstream commit f630a5d0ca59a6e73b61e3f82c371dc230da99ff ] >> >> KMSAN metadata for adjacent physical pages may not be adjacent, therefore >> accessing such pages together may lead to metadata corruption. We disable >> merging pages in biovec to prevent such corruptions. >> >> Link: https://lkml.kernel.org/r/20220915150417.722975-28-glider@google.com >> Signed-off-by: Alexander Potapenko >> Cc: Alexander Viro >> Cc: Alexei Starovoitov >> Cc: Andrey Konovalov >> Cc: Andrey Konovalov >> Cc: Andy Lutomirski >> Cc: Arnd Bergmann >> Cc: Borislav Petkov >> Cc: Christoph Hellwig >> Cc: Christoph Lameter >> Cc: David Rientjes >> Cc: Dmitry Vyukov >> Cc: Eric Biggers >> Cc: Eric Biggers >> Cc: Eric Dumazet >> Cc: Greg Kroah-Hartman >> Cc: Herbert Xu >> Cc: Ilya Leoshkevich >> Cc: Ingo Molnar >> Cc: Jens Axboe >> Cc: Joonsoo Kim >> Cc: Kees Cook >> Cc: Marco Elver >> Cc: Mark Rutland >> Cc: Matthew Wilcox >> Cc: Michael S. Tsirkin >> Cc: Pekka Enberg >> Cc: Peter Zijlstra >> Cc: Petr Mladek >> Cc: Stephen Rothwell >> Cc: Steven Rostedt >> Cc: Thomas Gleixner >> Cc: Vasily Gorbik >> Cc: Vegard Nossum >> Cc: Vlastimil Babka >> Signed-off-by: Andrew Morton >> Signed-off-by: Sasha Levin >> --- >> block/blk.h | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/block/blk.h b/block/blk.h >> index ee3d5664d962..3358ef4244fe 100644 >> --- a/block/blk.h >> +++ b/block/blk.h >> @@ -79,6 +79,13 @@ static inline bool biovec_phys_mergeable(struct request_queue *q, >> phys_addr_t addr1 = page_to_phys(vec1->bv_page) + vec1->bv_offset; >> phys_addr_t addr2 = page_to_phys(vec2->bv_page) + vec2->bv_offset; >> >> + /* >> + * Merging adjacent physical pages may not work correctly under KMSAN >> + * if their metadata pages aren't adjacent. Just disable merging. >> + */ >> + if (IS_ENABLED(CONFIG_KMSAN)) >> + return false; >> + >> if (addr1 + vec1->bv_len != addr2) >> return false; >> if (xen_domain() && !xen_biovec_phys_mergeable(vec1, vec2->bv_page)) > > So KMSAN is being backported to 5.4? No, AUTOSEL is drunk and should drop the random kmsan patches for random stable versions. > - Eric