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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7551AC19F32 for ; Wed, 5 Mar 2025 18:50:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9537428000A; Wed, 5 Mar 2025 13:50:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 90233280006; Wed, 5 Mar 2025 13:50:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 708AF28000A; Wed, 5 Mar 2025 13:50:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 45087280006 for ; Wed, 5 Mar 2025 13:50:55 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 76D6A5193E for ; Wed, 5 Mar 2025 11:43:07 +0000 (UTC) X-FDA: 83187311214.14.F454062 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf18.hostedemail.com (Postfix) with ESMTP id 30A101C000A for ; Wed, 5 Mar 2025 11:43:04 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=ebhiAuDn; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="hwes1V/7"; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=ebhiAuDn; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="hwes1V/7"; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf18.hostedemail.com: domain of hare@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=hare@suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1741174985; h=from:from:sender:reply-to:subject:subject: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:dkim-signature; bh=zJqsz2NVELIZl5yOknUz77xTPiHmarwJyXJIJqXem2Q=; b=in2sNwk04FdSc3TUUPyG+ij82rxDxISY6GRlYvvFh6ArFJ2QsJNCvoz1kxIP4Gs2UQlJUg E259nkl68wt05GYNEfPQhK7sB1mGPqfb9oel3vEEMS/5pj2F5xX9pTbU28YAIN4RSbIDzE McuWlLKabbhnSJW02ECYUKcEHXNLLsY= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=ebhiAuDn; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="hwes1V/7"; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=ebhiAuDn; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="hwes1V/7"; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf18.hostedemail.com: domain of hare@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=hare@suse.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1741174985; a=rsa-sha256; cv=none; b=Kzs1Ozfa0HHxIvbGe28QHxrKVfGkEXQeOp8D7hbq3RGh3z4c9swmxQhaFN65LoMcliz1b2 lhGii2qMddXqtBhLORaaGZXa6li6HGbgBr8prMu1nhdPqL1tnhgadIsV/YGxVZiwPmQkJs vRlFZ5AEEvm7RIQdH0dt/1ulqkSEbu4= Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8D7001F788; Wed, 5 Mar 2025 11:43:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741174983; 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=zJqsz2NVELIZl5yOknUz77xTPiHmarwJyXJIJqXem2Q=; b=ebhiAuDnQS199TjZG8AAJpxugVhPJtLaq30vA2Idc/yDd3qx02vdR4t3zOfAr05bAhMjQj qyAZP+5pK5MWfA++UyOC1xvcpHmJ3sOydM2RAgrMHnG9Y6E2slVb6yCl2PqxFj18CAd0ed PmXkYdeypsVu2hGMkxzhVDsNLuD/qv4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741174983; 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=zJqsz2NVELIZl5yOknUz77xTPiHmarwJyXJIJqXem2Q=; b=hwes1V/7+XDPlkDpuN18RUpOjUnTeIPkVaUJ94Xyo6Awr50qTOEOhnnd0yfpqHP0A4XKnp wxvbnqKFm5PYL/Cg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741174983; 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=zJqsz2NVELIZl5yOknUz77xTPiHmarwJyXJIJqXem2Q=; b=ebhiAuDnQS199TjZG8AAJpxugVhPJtLaq30vA2Idc/yDd3qx02vdR4t3zOfAr05bAhMjQj qyAZP+5pK5MWfA++UyOC1xvcpHmJ3sOydM2RAgrMHnG9Y6E2slVb6yCl2PqxFj18CAd0ed PmXkYdeypsVu2hGMkxzhVDsNLuD/qv4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741174983; 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=zJqsz2NVELIZl5yOknUz77xTPiHmarwJyXJIJqXem2Q=; b=hwes1V/7+XDPlkDpuN18RUpOjUnTeIPkVaUJ94Xyo6Awr50qTOEOhnnd0yfpqHP0A4XKnp wxvbnqKFm5PYL/Cg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 5B8A11366F; Wed, 5 Mar 2025 11:43:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id c+yJFcc4yGfJGAAAD6G6ig (envelope-from ); Wed, 05 Mar 2025 11:43:03 +0000 Message-ID: <7439cb2f-6a97-494b-aa10-e9bebb218b58@suse.de> Date: Wed, 5 Mar 2025 12:43:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Kernel oops with 6.14 when enabling TLS To: Vlastimil Babka , Hannes Reinecke , Matthew Wilcox Cc: Boris Pismenny , John Fastabend , Jakub Kicinski , Sagi Grimberg , "linux-nvme@lists.infradead.org" , "linux-block@vger.kernel.org" , linux-mm@kvack.org, Harry Yoo , "netdev@vger.kernel.org" References: <95b0b93b-3b27-4482-8965-01963cc8beb8@suse.cz> <6877dfb1-9f44-4023-bb6d-e7530d03e33c@suse.com> <27111897-0b36-4d8c-8be9-4f8bdbae88b7@suse.cz> Content-Language: en-US From: Hannes Reinecke In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam04 X-Rspamd-Queue-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u8bN7inkNzb8PEiEieGNnU7IjdBLBxsu2hVwoDVx3pG6dNoTfwZtDhStNphfkiR1tm6mSFfdKSaGBHifxy9K9ye1okiAE5TYpKH/x3PuKLWRDszL47KLVvEYZ/OkgFvGTQaxj4Bc+xjsCrEAS/FzLtS+pMZtLB6qby1mQmKEIEfvg46tRXLEAR39Gn9AJkf1Dfgi1ssVYL3Qd+QF6bxebiKFxfmI1PbCOFqpYHnRtI543e9VdfrE1RRKlJL/yUeaOOlczxkv73xzhvdb5000DkKpPEplvZdF1b47+oYy06pOCZF3vKCSp2zIQAgyz41H14qHiBvXLfXczGaQFut6kTcmnhEAi1fUzNDc7tiTEUTpzaG/tvLRImfFZAYrxIQPiGB910vlTTi83w2Bk06h04mOO/7eOWFyLT8DZ+z9jCP3mSQXDWkq X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 3/5/25 09:58, Vlastimil Babka wrote: > On 3/5/25 09:20, Hannes Reinecke wrote: >> On 3/4/25 20:44, Vlastimil Babka wrote: >>> On 3/4/25 20:39, Hannes Reinecke wrote: >> [ .. ] >>>> >>>> Good news and bad news ... >>>> Good news: TLS works again! >>>> Bad news: no errors. >>> >>> Wait, did you add a WARN_ON_ONCE() to the put_page() as I suggested? If yes >>> and there was no error, it would have to be leaking the page. Or the path >>> uses folio_put() and we'd need to put the warning there. >>> >> That triggers: > ... >> Not surprisingly, though, as the original code did a get_page(), so >> there had to be a corresponding put_page() somewhere. > > Is is this one? If there's no more warning afterwards, that should be it. > > diff --git a/net/core/skmsg.c b/net/core/skmsg.c > index 61f3f3d4e528..b37d99cec069 100644 > --- a/net/core/skmsg.c > +++ b/net/core/skmsg.c > @@ -182,9 +182,14 @@ static int sk_msg_free_elem(struct sock *sk, struct sk_msg *msg, u32 i, > > /* When the skb owns the memory we free it from consume_skb path. */ > if (!msg->skb) { > + struct folio *folio; > + > if (charge) > sk_mem_uncharge(sk, len); > - put_page(sg_page(sge)); > + > + folio = page_folio(sg_page(sge)); > + if (!folio_test_slab(folio)) > + folio_put(folio); > } > memset(sge, 0, sizeof(*sge)); > return len; > > Oh, sure. But what annoys me: why do we have to care? When doing I/O _all_ data is stuffed into bvecs via bio_add_page(), and after that information about the origin is lost; any iteration on the bio will be a bvec iteration. Previously we could just do a bvec iteration, get a reference for each page, and start processing. Now suddenly the caller has to check if it's a slab page and don't get a reference for that. Not only that, he also has to remember to _not_ drop the reference when he's done. And, of course, tracing get_page() and the corresponding put_page() calls through all the layers. Really? Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich