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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2788C83006 for ; Wed, 29 Apr 2020 15:54:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6541B20775 for ; Wed, 29 Apr 2020 15:54:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="p2KjsrRE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6541B20775 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EEA158E0005; Wed, 29 Apr 2020 11:54:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E9A3B8E0001; Wed, 29 Apr 2020 11:54:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DAFEF8E0005; Wed, 29 Apr 2020 11:54:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0156.hostedemail.com [216.40.44.156]) by kanga.kvack.org (Postfix) with ESMTP id C18728E0001 for ; Wed, 29 Apr 2020 11:54:20 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 7D5628248047 for ; Wed, 29 Apr 2020 15:54:20 +0000 (UTC) X-FDA: 76761339480.24.swing89_6013e41bbde16 X-HE-Tag: swing89_6013e41bbde16 X-Filterd-Recvd-Size: 2972 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Wed, 29 Apr 2020 15:54:20 +0000 (UTC) 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> 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: 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)