Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2496694ybe; Tue, 3 Sep 2019 13:54:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTEVnp4ESLwiP/9GhKe9ka/cUgvkJH7APbksAaz9gIIxiA21eZpL+PxqfkAkGrs6FF4W2r X-Received: by 2002:a65:684a:: with SMTP id q10mr32348473pgt.417.1567544094111; Tue, 03 Sep 2019 13:54:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567544094; cv=none; d=google.com; s=arc-20160816; b=z34XyvNMsE1BAQhXIi2ZLovomAha8kb53K35xL9vVRy3ijpQtB7Q6pKC+BJ7gY9bes jkqpdORk821a4V869M2JHpMmxOzqVrDXmY3du822VZjvhSG6w9M+X7vTT3e31d0P3ru9 VvabEljsiUlNoOKjMIjhmGB6Up0l3XrpvRNESw6ov7Xq49z2QWMDiSV+fUUjbgzczfsI ffn1NhHzAZDh7DNbRA6TdAB16HconCStOHt1jo1cZiegZE0QGK9/UAp+uj7GqNWKiZSl BTADYVK4zRcvrYFPnhkpxJX6IKwJ3jwSceJWzrxZ3p7Di4eJP4YlOXqWxof2EvPtW9Zo GbsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9j9Ys3SKrunuUdWnpddWrlF3hlzVX+dYskTpGsMVRdg=; b=OwOMXXj8Xq8j4BQaPug1PcoVp1in8jLD4O4wQUn7VYirPh8Z9hqdXKKfsxwlTN1v6l z8mMbqJrvbadv2noATYJssYCz5b05kGS10tMD9MiLOm2mcQ2rfgp6F/zIXIklLq6fIt+ CeCPJ98VuEplToZQJHQTldIQAVXS/vPcOoBcdBeRFxFqeVq3J/vcHb8ix3gJVlwNb7Id FBItmLe5lZWGu7ybAg1CaguVT4v1ZO9Q2Q5iiLQy84jjjO06NHS2TRMkLbz4kfRtnKyZ 9q6LBbT4OvXMk55lSRtCsxnlLkglXGUaSZiMzJ+2NeaYiRmQS2mo7eSVVx6bIIkBPPeu v5ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=q6PKtm2q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6si15467974pgp.391.2019.09.03.13.54.38; Tue, 03 Sep 2019 13:54:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=q6PKtm2q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727043AbfICUxR (ORCPT + 99 others); Tue, 3 Sep 2019 16:53:17 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:39632 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726005AbfICUxQ (ORCPT ); Tue, 3 Sep 2019 16:53:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9j9Ys3SKrunuUdWnpddWrlF3hlzVX+dYskTpGsMVRdg=; b=q6PKtm2qHXC4ZxDd1oWAesGqt mkef31ksS0DE/m+V94xxk8mY4E4NK7/D6yceAd4IMOYEtng6UUMmitBiFDXkmyC3VsZShsSIDhDxA spbPZghZh0gaSPUEaq9m2Id0riRmEJzPcniu1pE5CxkkCA32WDRJ3NzR/05hgewKmdlszxQcADztH z19osbBcPHxeseNqIEdEFRXQ1AGIdZ5S6kJBEUtzqgvVeooolY2oxTjjKG+adYErsSQPK+86v+0qP AK7u61q/Rmd8W04N+VU/Ik4OalyMQ207Yu/0eA5EaNXbWRdvGCZGHdJNie5vvkiHaECkD4l0efUVb n2xH0iMQA==; Received: from willy by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1i5Fnc-0005w9-SY; Tue, 03 Sep 2019 20:53:12 +0000 Date: Tue, 3 Sep 2019 13:53:12 -0700 From: Matthew Wilcox To: Christopher Lameter Cc: Michal Hocko , Vlastimil Babka , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Pekka Enberg , David Rientjes , Ming Lei , Dave Chinner , "Darrick J . Wong" , Christoph Hellwig , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, James Bottomley , linux-btrfs@vger.kernel.org Subject: Re: [PATCH v2 2/2] mm, sl[aou]b: guarantee natural alignment for kmalloc(power-of-two) Message-ID: <20190903205312.GK29434@bombadil.infradead.org> References: <20190826111627.7505-1-vbabka@suse.cz> <20190826111627.7505-3-vbabka@suse.cz> <0100016cd98bb2c1-a2af7539-706f-47ba-a68e-5f6a91f2f495-000000@email.amazonses.com> <20190828194607.GB6590@bombadil.infradead.org> <20190829073921.GA21880@dhcp22.suse.cz> <0100016ce39e6bb9-ad20e033-f3f4-4e6d-85d6-87e7d07823ae-000000@email.amazonses.com> <20190901005205.GA2431@bombadil.infradead.org> <0100016cf8c3033d-bbcc9ba3-2d59-4654-a7c2-8ba094f8a7de-000000@email.amazonses.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0100016cf8c3033d-bbcc9ba3-2d59-4654-a7c2-8ba094f8a7de-000000@email.amazonses.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 03, 2019 at 08:13:45PM +0000, Christopher Lameter wrote: > On Sat, 31 Aug 2019, Matthew Wilcox wrote: > > > > The current behavior without special alignment for these caches has been > > > in the wild for over a decade. And this is now coming up? > > > > In the wild ... and rarely enabled. When it is enabled, it may or may > > not be noticed as data corruption, or tripping other debugging asserts. > > Users then turn off the rare debugging option. > > Its enabled in all full debug session as far as I know. Fedora for > example has been running this for ages to find breakage in device drivers > etc etc. Are you telling me nobody uses the ramdisk driver on fedora? Because that's one of the affected drivers. > > > If there is an exceptional alignment requirement then that needs to be > > > communicated to the allocator. A special flag or create a special > > > kmem_cache or something. > > > > The only way I'd agree to that is if we deliberately misalign every > > allocation that doesn't have this special flag set. Because right now, > > breakage happens everywhere when these debug options are enabled, and > > the very people who need to be helped are being hurt by the debugging. > > That is customarily occurring for testing by adding "slub_debug" to the > kernel commandline (or adding debug kernel options) and since my > information is that this is done frequently (and has been for over a > decade now) I am having a hard time believing the stories of great > breakage here. These drivers were not tested with debugging on before? > Never ran with a debug kernel? Whatever is being done is clearly not enough to trigger the bug. So how about it? Create an option to slab/slub to always return misaligned memory.