Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2475453pxu; Mon, 7 Dec 2020 07:33:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZNzf8aF/+anWB9N10VPL4ADOhCApPVAaQqnP53JTX01DQ0pTo6UzCSIG8ivfRulLCMeuN X-Received: by 2002:a17:906:ce21:: with SMTP id sd1mr14513773ejb.396.1607355211330; Mon, 07 Dec 2020 07:33:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607355211; cv=none; d=google.com; s=arc-20160816; b=cHMyzVcoiYmgFDTKrcsEVAkR+ZoLit5oszxxzMDnZCjOHwnFHjRc8XqaisVyGo3+hu MoIzE+qQJnKNo7fRQse9SzyPoFiAJtohYIVD8+95l+ldyf+lB3i5Sa0dpNuuVBNQs0Fw 1o+qqrgHfQDUW3CSUMofvYgp9nTulWlT+nk/zJOXKvfROlJLHVgA4+ujt7VJpNlZLKek lcp89SYwyY9CJ9an55AaQS7KnOSM39QUiPY2U6zjV4E+h60yHOFi3cKW3M0FEwxbOQJM zixjJNKoZiOFDdclRmrmmmney55JhQhrO3Xj8KHmIEdpd5RaMSW3ZFNooHfPQA3HhG+a 2wbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=30JlR8LoPyZrlzeEVzTals0j/Hp1YhgKcUquSFNFM9o=; b=d1vggFL9SJbzC+APbyitUeecgM37/nD4+rE5ulSV8fjyNSf1uJ+Zy3VIWNJYlpKyQm BTUp5itxZNI7I6nAqxZbNOwsJr53ca6b9AOmoURePcMJvrefBdo6d4eoYtAZcZ3a0CbR V3z9p2YvLUi4TZh0jhp1HBj1S+J/6p2PdcUUG+mO8d8kv0Bg8jvtFPx2XWWxZj0tr2l9 I4+ick+BVpq9B6OxWMExuX9Loob/Ei4/opZp9Sc5DVgQjxb7sCj+ST49VcFKEfpLIW+X Um43j8oLXQD+j2elCUV3KwnXWp1WtQA8ItXtqf5h8pvnAAfC8Vvos/arCaN/AlEcFoO2 Vxew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=io+c5w0X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j14si6832292ejy.327.2020.12.07.07.33.05; Mon, 07 Dec 2020 07:33:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=io+c5w0X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726960AbgLGPa4 (ORCPT + 99 others); Mon, 7 Dec 2020 10:30:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726112AbgLGPa4 (ORCPT ); Mon, 7 Dec 2020 10:30:56 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05914C06138C for ; Mon, 7 Dec 2020 07:30:16 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id i2so13175645wrs.4 for ; Mon, 07 Dec 2020 07:30:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=30JlR8LoPyZrlzeEVzTals0j/Hp1YhgKcUquSFNFM9o=; b=io+c5w0Xg2SyICnmX3kUsLyOL9a5kCVV8+3Mnr+/zRsTv62oBhFzyXRoIiBctrPUAb ELIQIu1yuMjTxLKz042n0IaOCT3I8Y4eIOWQgNrMh/zXf222/crNrw8n7FGVSNw340fs E2oVwH4TSXHpOcuOrEzrUDQQTIreZMQFGx7dMsqcb/8mi2h1zcPtqDycEqnL+Bh67fOg 8Ay+d/sOd6zAO/Yy9ezbfetUCzE377RqOQimPNnu3NRun2HUpfddpuugJObwQZPpO2TL LmA6pLthgq41dEqwkID4q6u5/UFAyAGX5E6vvaU2+F8w6f3i9WJ3F4r/9nGkVmyKqjJB L0XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=30JlR8LoPyZrlzeEVzTals0j/Hp1YhgKcUquSFNFM9o=; b=fiy51KGzQs6RxZR40fjDS7mgbXwZGsV7EhK6u7IwPRCrXDca+LiolioPUg4d//Ji9o jP4JKVZFnA03mKrGthqkiWr1zlrAQYzXiz1cfOCwEa7D7LXkcETPyStOYpYctXKmN5Bs /yU8Waq4cn0yf1yESdLcmAgY0d5dZeGBbrGvJcUeyinKnWeW7wo/6Kb+10t9MjO8td/v dFqTSXmfRbAeTAbvfBH8rxuiTkcfe8z60IAwYa85HelX7UVeIoLEMcAO+t3ogDNsEfaU +d6EXxDl2OOD//HT8JGTdPYjBB9pu3JEehjHPFZQJt/32exxkYWdUGi1mQxPx7mKEhzI EE7g== X-Gm-Message-State: AOAM531bKbfj0ryB/FqVr+Rw5Xbc5yO8kVUOvtUqrKzivc8Z1gmycjUN n+2XHPV70zmUXD092DrxD+EyAw== X-Received: by 2002:a5d:6250:: with SMTP id m16mr20552083wrv.400.1607355014462; Mon, 07 Dec 2020 07:30:14 -0800 (PST) Received: from elver.google.com ([2a00:79e0:15:13:f693:9fff:fef4:2449]) by smtp.gmail.com with ESMTPSA id q73sm9175382wme.44.2020.12.07.07.30.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 07:30:13 -0800 (PST) Date: Mon, 7 Dec 2020 16:30:07 +0100 From: Marco Elver To: Eric Dumazet Cc: Eric Dumazet , netdev , Andrew Morton , David Miller , Dmitry Vyukov , Alexander Potapenko , Jann Horn , Jakub Kicinski , LKML , Stephen Rothwell , syzkaller-bugs , Willem de Bruijn , syzbot Subject: Re: WARNING in sk_stream_kill_queues (5) Message-ID: References: <000000000000b4862805b54ef573@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.2 (2020-11-20) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 03, 2020 at 07:01PM +0100, Eric Dumazet wrote: > On 12/3/20 6:41 PM, Marco Elver wrote: > > > One more experiment -- simply adding > > > > --- a/net/core/skbuff.c > > +++ b/net/core/skbuff.c > > @@ -207,7 +207,21 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask, > > */ > > size = SKB_DATA_ALIGN(size); > > size += SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); > > + size = 1 << kmalloc_index(size); /* HACK */ > > data = kmalloc_reserve(size, gfp_mask, node, &pfmemalloc); > > > > > > also got rid of the warnings. Something must be off with some value that > > is computed in terms of ksize(). If not, I don't have any explanation > > for why the above hides the problem. > > Maybe the implementations of various macros (SKB_DATA_ALIGN and friends) > hae some kind of assumptions, I will double check this. I looked at some of these macros and am wondering why SKB_TRUESIZE() uses SKB_DATA_ALIGN(sizeof(struct sk_buff)). Because I don't understand how the memcaches that allocate sk_buff are aligned or somehow always return SKB_DATA_ALIGN(sizeof(struct sk_buff)) sized objects -- a simple BUG_ON(ksize(skb) != SKB_DATA_ALIGN(sizeof(struct sk_buff))) triggers. Alas, doing something like: --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -235,7 +235,7 @@ /* return minimum truesize of one skb containing X bytes of data */ #define SKB_TRUESIZE(X) ((X) + \ - SKB_DATA_ALIGN(sizeof(struct sk_buff)) + \ + sizeof(struct sk_buff) + \ SKB_DATA_ALIGN(sizeof(struct skb_shared_info))) does not fix the problem. Still trying to debug, because I don't want this to block the SLUB enablement of KFENCE, even if it turns out it's not KFENCE. :-/ Thanks, -- Marco