Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp50758rwb; Tue, 27 Sep 2022 22:27:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4MGEI2wfPWaVqS8AqTcecj9gePmyFAPZ9SWAd850FKnVF4C+QX8W7EZ8O2IMIEqri8mSKC X-Received: by 2002:a05:6a02:190:b0:43c:7997:4d69 with SMTP id bj16-20020a056a02019000b0043c79974d69mr18434357pgb.15.1664342863881; Tue, 27 Sep 2022 22:27:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664342863; cv=none; d=google.com; s=arc-20160816; b=PwwSUOjF1XWnQUiIqGRFNdPpBt/rFZAnIZPp/+nxwRdovWIwpKESD8Gz8K8MPW7Fp/ BmveFb+fVmWDeumlJ5ocx0gqWV6CTAm0dapjj83gVi496wCr5Q4a8BZd+GMynrR93m5y ZTnLf5KULBqfIXafcSFe5iEvmzkrBjVFxxq7mrX3a9H+UDJUKoSIWsiy3G496+WAxdrz MDUaedtf7y2eHsZLAOWY567waeJJs+1/kJyLvAImyIO0nifKmbxaSOqRfeW7Cu7PTthm NZTZsP1vdiRpft68qjXGMRqGHO6O4pTb/KWoKHWxZGiT+rcDfQoTf/pnDvdKHNL+w2aS tsLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=RRxMxuisd8lNkNGWBlf9ZKEk1omHCIF/OzgSnFJx1kM=; b=NQCFOztcrQtj9iy8OQwkykCvtysLZpsQtgC0Qj9+Hof3jJ5J6IBluqg0rl2DFHv8IM 1e05Ue1VZPw72HK1+cWIpR6TXL6Msj2/nSvT+WHL6iByykDcHkKEffGBlwSggDAm1etB WjMLNC/nvD0PNFwbGiFCokJw2QDPj++nsoaID7o64V4uj9ZWjPYTL1unX3iLLo1FGvLl d9FU4repmhZEObBs4t7/BqLigVU1UbZVwbKqM7bsO066qsKF1dG3KLwz1oPXLQzmt+x2 j11xmE+E4zrZwx18sqfCkb/+BP4fFbasHdwphrLPaf37l1y1pEk5LsAJJ3oPUJJcHoYe Wn5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=rp3aMO0g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a3-20020a631a03000000b00434a7d015ddsi4582603pga.204.2022.09.27.22.27.32; Tue, 27 Sep 2022 22:27:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=rp3aMO0g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S232069AbiI1FQs (ORCPT + 99 others); Wed, 28 Sep 2022 01:16:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231642AbiI1FQq (ORCPT ); Wed, 28 Sep 2022 01:16:46 -0400 Received: from mail-oa1-x33.google.com (mail-oa1-x33.google.com [IPv6:2001:4860:4864:20::33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAEBA127C9C for ; Tue, 27 Sep 2022 22:16:45 -0700 (PDT) Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-131a17bf7fdso1323637fac.3 for ; Tue, 27 Sep 2022 22:16:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:message-id:subject:cc:to:from:date:from:to:cc:subject :date; bh=RRxMxuisd8lNkNGWBlf9ZKEk1omHCIF/OzgSnFJx1kM=; b=rp3aMO0gAAhK0s2GVDrsTX/gwBmv9vZ3TFYoRHevkUoy9MkVX+I1yOVHL2U+wScbD3 a4Iu0r7SxbTXEQwzbBoZotEQ4SXYXNn9iUmyFlUxqyCmRZN4Kbm2xqd6f6dFNjiPuyB3 jdUvgYFtYBIDqfDNZgg4N/aFo2WUQzp96+1+1PTKz7p9Qa9H86j2OxuffAhEqyzPvh3J I+BvstOwG6UAnBYqKE2CW9ZXw42ycTphdbRCqVp8/lewnvDIwfOHR1LyGlrrnA8Noqr7 KDmEIYBn6ZmUCKQBmbNp8Pczg76HqN9FdijVfr11GfCtPvQthYMEEnTlZ2ohWkIOiJ3C OXmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date; bh=RRxMxuisd8lNkNGWBlf9ZKEk1omHCIF/OzgSnFJx1kM=; b=Z6mvlyzbEBwIeK/M18fFYDAKS+sbluaey2sDCM7a1WAxM9/p5xVRSfnvVuNx22kRIR HlJ3a4pB0NTXgNHxnLZRtwhxMWVw3gZOV6EkWDFxwUkPQoPgEafh5TCUTCOCfumbQ9gN jfPLNTtB/EnykUXKi/SxAyLPqFXhg7bigVooTy3JVm5Cs4TZ/T9OMVrvN0YnK2zS+yHz 9atYcYu8dQumzbEUaGubGSZFqyn2a3uyRmv4IGJoglLZdf1ioGFOSe3wkeEXktdbuN06 JFGmwtxpiy9dJyBBVGsBQ4XZ4cBfeEedEumKZuNdXQhgjCD1GB4qhkfxRy/F8k9HbFVX t1qw== X-Gm-Message-State: ACrzQf3Mvl/RNGqdNTD49Ja1LIvb5+x8D+sqY7HOSh8vYn2aOLQ4peYq DpA4WofFHLHhNErRNk4wqmZsj3sJcoC1Sw== X-Received: by 2002:a05:6870:80d3:b0:126:1e6c:f01c with SMTP id r19-20020a05687080d300b001261e6cf01cmr4613620oab.17.1664342204582; Tue, 27 Sep 2022 22:16:44 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id q5-20020acac005000000b0034fddfc5922sm1466958oif.36.2022.09.27.22.16.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 22:16:44 -0700 (PDT) Date: Tue, 27 Sep 2022 22:16:35 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@ripple.attlocal.net To: Matthew Wilcox , Vlastimil Babka cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: amusing SLUB compaction bug when CC_OPTIMIZE_FOR_SIZE Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's a bug in linux-next, but taking me too long to identify which commit is "to blame", so let me throw it over to you without more delay: I think __PageMovable() now needs to check !PageSlab(). I had made a small experimental change somewhere, rebuilt and rebooted, was not surprised to crash once swapping and compaction came in, but was surprised to find the crash in isolate_movable_page(), called by compaction's isolate_migratepages_block(). page->mapping was ffffffff811303aa, which qualifies as __PageMovable(), which expects struct movable_operations at page->mapping minus low bits. But ffffffff811303aa was the address of SLUB's rcu_free_slab(): I have CONFIG_CC_OPTIMIZE_FOR_SIZE=y, so function addresses may have low bits set. Over to you! Thanks, Hugh