Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp763105ybz; Wed, 29 Apr 2020 08:58:31 -0700 (PDT) X-Google-Smtp-Source: APiQypJ62xdGg5p6Y4OhuIsUE4K7yNWsfxfWa1HfWcwh/fyx7lTD52DvhzA+KZSs/SrE7GPjAekY X-Received: by 2002:a05:6402:1d37:: with SMTP id dh23mr3057925edb.287.1588175911757; Wed, 29 Apr 2020 08:58:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588175911; cv=none; d=google.com; s=arc-20160816; b=dK08Whb4j5M0FPrI+SJkp1PuI5jvcVxmeUO3qQMOx66lctnsA/1TQTU7R55KJPTrfc 5gOXwupgJeo25oTjEBvv/wqlonGXohzWLzP0ESFLe+XN528x0WjjCcIhY1ELS3vtpviT Bc4qxydoFdV2vbDUISI7/xB1gFnnI7A5X78qUzfv1WaVgzyyLkKfLR/HvPXcIgoJd3F7 3K1r38dNmpNIyNCPlGKCCfKncYFGNwURAXE6TChUpheapRKcGhZsYzjh7R6XwmPkx6t8 wuDizqEBibLpUJzSZ5ZRlf9gwED83gJWIQEQsitH60EPbJtcE4TGbgevpINo2fhJ3Abe 0AmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Ga1tL7Cb91RHx4h9wCdEYMImUg579CTIGHOnzw0W/7c=; b=uUPtWQecA51Zox17/BBiIPw63HpzZIAfdbht505t5yRiRMQCw5Zak9yZz6I6sVVht5 Gl/4BGPlN/cMhyu0WzakLJfEnwAawyM/d+MhkFPLy6Kh3eLQ5Q5W+v9oeyxnBt36+BHj n99pGda7CPC+LkcfbZmmKBj8GJzOTdW04PdqCM26VMvfTtcFlHBig7DOnof99CoKn1L9 iuEGOBK2l/+C6AgF+WESp5kMgnwvMvmWGBVO5INFE7DtVzBeFA5igySPHoAZr3mBsH4J 3goaNgOfWwgxvKWla6qmXBfTOVSahjS3sFDqpdRqW4OFAvra3m7fMO7QEcXd0VFR3nVC G8ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=p2KjsrRE; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k18si3627837edx.296.2020.04.29.08.58.05; Wed, 29 Apr 2020 08:58:31 -0700 (PDT) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=p2KjsrRE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726885AbgD2PyT (ORCPT + 99 others); Wed, 29 Apr 2020 11:54:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726776AbgD2PyT (ORCPT ); Wed, 29 Apr 2020 11:54:19 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DED5C03C1AD for ; Wed, 29 Apr 2020 08:54:19 -0700 (PDT) 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; bh=Ga1tL7Cb91RHx4h9wCdEYMImUg579CTIGHOnzw0W/7c=; b=p2KjsrREzZAVZyw/NEbtrqNNc8 42bWwCX5h7LQ1qjSqRalLYoc6QRPbs15ScE9qVLQ+Xt/M4JJ+11aY92tCij/q4sCXcTYvW4excMFL O6TmgGfy92NDPtLEwLBkVS2pbCl/EKmgOVSexZMBZJHgawfqo3Jqit+cJLIG6QKLa2upogw/XE99U DpdGbEpAJkjHxxyHi5G2YiPhfSyzm+ZAlxKhGnB/ndkr9zrvQEpez6Vi17fGxsgpBFiq106luVAtc WN/kKs5YMoGlu82+r/AE35fLtMgKJPEdvOQ321YjeO2QbZQzegFnwlHyCYNW3bfxWURJGiUU3c0QF B3YtAKsQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jTp2K-0001Lj-Ma; Wed, 29 Apr 2020 15:54:12 +0000 Date: Wed, 29 Apr 2020 08:54:12 -0700 From: Matthew Wilcox To: Waiman Long Cc: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Kees Cook , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Changbin Du , Markus Elfring Subject: Re: [PATCH v3] mm/slub: Fix incorrect interpretation of s->offset Message-ID: <20200429155412.GT29705@bombadil.infradead.org> References: <20200429135328.26976-1-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200429135328.26976-1-longman@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 29, 2020 at 09:53:28AM -0400, Waiman Long wrote: > As a result, echoing "1" into the validate sysfs file, e.g. of dentry, > may cause a bunch of "Freepointer corrupt" error reports like the > following to appear with the system in panic afterwards. > > [ 38.579769] ============================================================================= > [ 38.580845] BUG dentry(666:pmcd.service) (Tainted: G B): Freepointer corrupt > [ 38.581948] ----------------------------------------------------------------------------- I might trim the timestamp and the === and --- from the commit message ... > To fix it, use the check "s->offset == s->inuse" in the new helper > function freeptr_outside_object() instead. Also add another helper function > get_info_end() to return the end of info block (inuse + free pointer > if not overlapping with object). > > Fixes: 3202fa62fb43 ("slub: relocate freelist pointer to middle of object") > Signed-off-by: Waiman Long But the patch looks great. Reviewed-by: Matthew Wilcox (Oracle)