Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp846586iol; Thu, 9 Jun 2022 15:43:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPMK36xeqCX1as+iNG1sLygRENW2r1j+1JcRLAXCRwYWFs8xDeINfyBGZUtN15DxTf82CG X-Received: by 2002:a05:6402:4301:b0:42d:e8fb:66f7 with SMTP id m1-20020a056402430100b0042de8fb66f7mr48479346edc.229.1654814604680; Thu, 09 Jun 2022 15:43:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654814604; cv=none; d=google.com; s=arc-20160816; b=waWW8NQeprnPxGe3Eq0Axd61UJKPN60xISuyeQoWvnKYLwAs5JlcuEYDOiCJmqYyLB cVhndAgqznAiPLuFt6Mm5i+Zi3kvc/KCv8Q7Gos6yJRONsmp4UTt8NLKevuv2PlJBhmZ opHwFA37U+ee577dO+EaGsKxVGjVytdCbbIBRank/uRSOh96vLUrxr007T/PzoMiQ49s zE7KhmcJPcXZ+auFX+AY+50f8AzlB3+i4rJfUHcjbkTefQca7h8LMOnJDAFUeklQmjiL 3i937ucjRi6TkOLMhqB13Cht1VD98mOSAr7WnQs8WCdjmGIa+zLOAN7DfVRUTwtcHzNA FIYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=a7HKcIF+i0T4+qY1S/nBDjlBN8LZbn3HajfMjAd6pgE=; b=niK0pQcxYo1XjeeuEHkTJWz6pVGQH2rvI8Qb/gvKvQsgwcXzGi3/xOssxRa/UxKs9i PNH8mmM0oGdPAU6s6CXmUvd/1hdJQ0V4tkrcGh4aUnKRoTkAGF6q/r4Ic5UVgo4CHlpW WEFRMad3o7w6+Mw7KX63aEyqIcqkt3UWdUzc594scDRbELt9tXjgo13+3bNHc9lySPdg PARmkeb1DVucCRdEuuJ2bAIAFyol2sTJX6/DSOdgRo2eIB0oanvew4fWhFi2MxANjaQz BH751/dEpoZY49eaDhTXaSx4uk18ucB+YNKhhLtwYG04i+iymbDTtsvzaZ9V+bPMPNRk YNjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=myr+KdqG; 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 sh10-20020a1709076e8a00b00710eb87ef4csi16221754ejc.1003.2022.06.09.15.42.58; Thu, 09 Jun 2022 15:43:24 -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=myr+KdqG; 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 S236283AbiFIWQ4 (ORCPT + 99 others); Thu, 9 Jun 2022 18:16:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233876AbiFIWQy (ORCPT ); Thu, 9 Jun 2022 18:16:54 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 437CB1203EB for ; Thu, 9 Jun 2022 15:16:52 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id c2-20020a25a2c2000000b0066288641421so15477792ybn.14 for ; Thu, 09 Jun 2022 15:16:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=a7HKcIF+i0T4+qY1S/nBDjlBN8LZbn3HajfMjAd6pgE=; b=myr+KdqGBf+8fU62rrrc6vdWLC4zQ+EyY6QFdgZ42GfmTyENhLo1IAw3h2RNkQhUwn 0XIlmFI5we6dPTmcL5OoVRYkNlg1LkiEp4m7TTvZUlR6ue+fe982BLupBD9KlWv7xdeq tEyC52lTuBzUzYKgufcIPK7Ci1BaDygPGjKQT8u6/zm5afnc2zO7GbJDlDaelSa5C9I6 m1gTG8o78bI6STaoseXyxF12CneUqy+nHYwCQMj9r7YNbTeNrJ/xKj0EQk+nA9+z1UEj WUT+SwL4WoBwN+LsZ0RrnI0mPP8hfuMvwOWrNlfSbRwkDqmNF92nH57ZSUm5tqv4Qcz4 Lc7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=a7HKcIF+i0T4+qY1S/nBDjlBN8LZbn3HajfMjAd6pgE=; b=CvDLjylZgUzt3ryIQVpATFsKvvB7Wjqc9zY1lI2EiHnvntDHh9xCvKBrKAfB5gJHvV T5dqn+UZhNzDWotc0+mTbM2I/QiUIMZtmgLJmV81JIaxjSgk22eWt+cHWTOtPUpcHOEU mqELH8WkVFe2N3zbXzeYKmVrQbWl3qRxtWR4a2V3eRDDTE9XQxaDt5xHzK5YjIVWjKmb qZivViC5+W7066FhwFY4lm3pSXBaRgTVe4Fg6+bseowNFRN0E73ILj0vvqQReoLv81m/ AN/EGAJ4aVJ7kwQEVowWtJ4joc9wpAqE9OjOoHACsa/xTaaGTlpCQUYgv/LxfWuyQnqB AmzA== X-Gm-Message-State: AOAM531jkRPIjgYF+WCH3tgpsNP4RE7itRudIeUgn5zZCHaMM/nhZQFE KzrkiYUdEi4j7FhPnTO+LdHcTpNJkIQTtw== X-Received: from shakeelb.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:28b]) (user=shakeelb job=sendgmr) by 2002:a25:2003:0:b0:663:e799:4ab5 with SMTP id g3-20020a252003000000b00663e7994ab5mr13476183ybg.403.1654813011398; Thu, 09 Jun 2022 15:16:51 -0700 (PDT) Date: Thu, 9 Jun 2022 22:16:47 +0000 In-Reply-To: Message-Id: <20220609221647.lqxljj4wlb6mcuvr@google.com> Mime-Version: 1.0 References: <20220609191221.rv3lqbhipnvvzt67@google.com> Subject: Re: [next] arm64: boot failed - next-20220606 From: Shakeel Butt To: Roman Gushchin Cc: Naresh Kamboju , Linux-Next Mailing List , open list , regressions@lists.linux.dev, lkft-triage@lists.linaro.org, Linux ARM , linux-mm , Stephen Rothwell , Andrew Morton , Ard Biesheuvel , Arnd Bergmann , Catalin Marinas , Raghuram Thammiraju , Mark Brown , Will Deacon , Vasily Averin , Qian Cai Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=unavailable 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 On Thu, Jun 09, 2022 at 03:05:08PM -0700, Roman Gushchin wrote: > On Thu, Jun 09, 2022 at 07:12:21PM +0000, Shakeel Butt wrote: > > On Thu, Jun 09, 2022 at 10:56:09AM -0700, Roman Gushchin wrote: > > > On Thu, Jun 09, 2022 at 10:47:35AM -0700, Shakeel Butt wrote: > > > > On Thu, Jun 9, 2022 at 10:27 AM Roman Gushchin wrote: > > > > > > > > > [...] > > > > > +struct mem_cgroup *mem_cgroup_from_obj(void *p) > > > > > +{ > > > > > + struct folio *folio; > > > > > + > > > > > + if (mem_cgroup_disabled()) > > > > > + return NULL; > > > > > + > > > > > + if (unlikely(is_vmalloc_addr(p))) > > > > > + folio = page_folio(vmalloc_to_page(p)); > > > > > > > > Do we need to check for NULL from vmalloc_to_page(p)? > > > > > > Idk, can it realistically return NULL after is_vmalloc_addr() returned true? > > > I would be surprised, but maybe I'm missing something. > > > > is_vmalloc_addr() is simply checking the range and some buggy caller can > > provide an unmapped address within the range. Maybe VM_BUG_ON() should > > be good enough (though no strong opinion either way). > > No strong opinion here as well, but I think we don't have to be too defensive > here. Actually we'll know anyway, unlikely a null pointer dereference will be > unnoticed. And it's not different to calling mem_cgroup_from_obj() with some > random invalid address now. > Sounds good. You can add my ack when you send the official version of the patch.