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=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_NONE 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 96D9AC433F5 for ; Tue, 14 Sep 2021 19:38:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 74558610CE for ; Tue, 14 Sep 2021 19:38:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232999AbhINTjq (ORCPT ); Tue, 14 Sep 2021 15:39:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232983AbhINTjn (ORCPT ); Tue, 14 Sep 2021 15:39:43 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C52DC061762 for ; Tue, 14 Sep 2021 12:38:25 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id h16so725572lfk.10 for ; Tue, 14 Sep 2021 12:38:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YSeP+SZFtkEJy4ZaKy/cigl2Oc8Bbz9AhqLyEsdn6ls=; b=ZKg5V6al9TUVnuClTBJc+c6AZow3uufBTv1h/0WiWYy24OFTEkjr1EP8aogrcyDBm+ 8g0J3o5Lml2fPzZNj3xLe+red1+Q3skWtCy2ht7pffCiyfF7PJ2JDk+DlnwMW2+jFx5F kkl268btaSsMQHet+Up8JA0um/uIUglJ5+ncs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YSeP+SZFtkEJy4ZaKy/cigl2Oc8Bbz9AhqLyEsdn6ls=; b=z4zm4kn5zjWYfTJWE1a46mfDBIjZau4dcItGlV2Z0MUBEZjdrGGT14ETt1ph46JxBN eTaBEwbgO5u4eyOmFXxG6iJl8H6AgO+9795IvEnGzXg/Whq4hvV5CULJ5+we/yOAXWDP tLY37CUJ457TgLf1T7E89K4CRT75YyU9dTGUfu7V1LdSnkhqzysbUhOqt6ZsW4dDJlWL f8HUtn10uYVCn3mG1OUBDFKn9wXllvJ8qBBYqZHXjrKL2Br3AC2i6aLDZXPC9LIsy7hO 5oFE9lK9pJgjBPhD+cbmzsVr8GAkNCs0ULhLoyuCWWcOZAppNhnVgds8U0oJa8ZC1g1C 0c9A== X-Gm-Message-State: AOAM531MlEt8aqsRQlnG9V/M03owryQ48rjWBREKENsYI/Bk7544fcQW J/xe+ADj8kcETQ5nlU1HyxObg4/YV1DgKRcVKN0= X-Google-Smtp-Source: ABdhPJxbsq27jvoNKBCv7SUntORFqHKuZnQxEVDRgYAw3MgXFI6cLuMrrz2yrk1DxrtRVMrwofUdkw== X-Received: by 2002:a05:6512:1510:: with SMTP id bq16mr14979252lfb.571.1631648303333; Tue, 14 Sep 2021 12:38:23 -0700 (PDT) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com. [209.85.167.46]) by smtp.gmail.com with ESMTPSA id v23sm133488lfp.236.2021.09.14.12.38.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Sep 2021 12:38:22 -0700 (PDT) Received: by mail-lf1-f46.google.com with SMTP id i4so798598lfv.4 for ; Tue, 14 Sep 2021 12:38:22 -0700 (PDT) X-Received: by 2002:a05:6512:3da5:: with SMTP id k37mr14634897lfv.655.1631648302398; Tue, 14 Sep 2021 12:38:22 -0700 (PDT) MIME-Version: 1.0 References: <20210914105620.677b90e5@oasis.local.home> <20210914145953.189f15dc@oasis.local.home> In-Reply-To: From: Linus Torvalds Date: Tue, 14 Sep 2021 12:38:06 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] tracing: Fixes to bootconfig memory management To: Steven Rostedt Cc: Mike Rapoport , Andrew Morton , LKML , Ingo Molnar , Masami Hiramatsu , Linux-MM , Vlastimil Babka Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 14, 2021 at 12:23 PM Linus Torvalds wrote: > > Actually, never mind. I'll just do the automated replacement, it will > fix that NULL pointer thing too. Sadly, the automated replacement isn't quite as simple as the sed-script I planned on using. Because this: sed -i \ 's:memblock_free(__pa(\([^)]*\)),:memblock_free_sane(\1,:' \ $(git grep -wl memblock_free) does actually mostly work, but because "__pa()" takes either a pointer or a integer value, the end result is that sometimes we call memblock_free_sane() with things that aren't pointers. Very annoying. That "__pa()" macro has the two underscores for a reason. It shouldn't be "use this thing willy nilly". So I'll do a minimal conversion that adds "memblock_free_ptr()" and hope that people start using that. And then we can later try to move "memblock_free()" to a name that isn't so misleading. Linus 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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 02D94C433F5 for ; Tue, 14 Sep 2021 19:38:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 84428610CE for ; Tue, 14 Sep 2021 19:38:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 84428610CE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id A83E06B006C; Tue, 14 Sep 2021 15:38:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A32BC6B0072; Tue, 14 Sep 2021 15:38:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8FB5C6B0073; Tue, 14 Sep 2021 15:38:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0225.hostedemail.com [216.40.44.225]) by kanga.kvack.org (Postfix) with ESMTP id 818EF6B006C for ; Tue, 14 Sep 2021 15:38:26 -0400 (EDT) Received: from smtpin34.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 3A66C181A0D9D for ; Tue, 14 Sep 2021 19:38:26 +0000 (UTC) X-FDA: 78587190612.34.59B07A2 Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) by imf21.hostedemail.com (Postfix) with ESMTP id 02CB6D02E2BD for ; Tue, 14 Sep 2021 19:38:25 +0000 (UTC) Received: by mail-lf1-f51.google.com with SMTP id k13so823842lfv.2 for ; Tue, 14 Sep 2021 12:38:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YSeP+SZFtkEJy4ZaKy/cigl2Oc8Bbz9AhqLyEsdn6ls=; b=ZKg5V6al9TUVnuClTBJc+c6AZow3uufBTv1h/0WiWYy24OFTEkjr1EP8aogrcyDBm+ 8g0J3o5Lml2fPzZNj3xLe+red1+Q3skWtCy2ht7pffCiyfF7PJ2JDk+DlnwMW2+jFx5F kkl268btaSsMQHet+Up8JA0um/uIUglJ5+ncs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YSeP+SZFtkEJy4ZaKy/cigl2Oc8Bbz9AhqLyEsdn6ls=; b=jU0DHU7BSs9NmQ+t33r3MhypfhNjPU3sO58I2gDmk/KAS4QFRgXJOCPDOow+hnrA4z DRTKVAQrFmw9sEzVgNrfrpM40p79wZCEt/zMHrnkbyoR75kygDYU0KXV0flcn3bHctTB 44Sm1LwSxHL5jKHCN4XHT/2nSiDstTRNii8kcO5C1mFfytRsuJtcpCeeoRRa0h/Dp/eb EsFd/LzbOknZywhfMvqlOT4MliQYEiMp1xmTLiSEcNB0bB3zPV5wEyNZZ49RFl2urptw bR5uxL5Ph2DEfe+4+pYDQi/vLJy8EBKVerafIeB/tQ6bmxrjXGkIW+jIUoY3U8eBn29j QFtQ== X-Gm-Message-State: AOAM533NJkn08IbX5qXxHJm73UQHeF6oTTzmnr5Gon1x54LyInK8142e vowt13bC3uQwjoOb/WrmkdL5XJR2AMAmbgKhcu0= X-Google-Smtp-Source: ABdhPJxQ5pZ/lHMJU2ShAvakXl4AL5HsjrPlojmVpnC8AdyA+mCtxl0DfCs5nOZoN6fO79vbYjPzlg== X-Received: by 2002:a19:550c:: with SMTP id n12mr7268763lfe.511.1631648304219; Tue, 14 Sep 2021 12:38:24 -0700 (PDT) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com. [209.85.167.43]) by smtp.gmail.com with ESMTPSA id h3sm340694lfu.3.2021.09.14.12.38.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Sep 2021 12:38:24 -0700 (PDT) Received: by mail-lf1-f43.google.com with SMTP id l11so841309lfe.1 for ; Tue, 14 Sep 2021 12:38:22 -0700 (PDT) X-Received: by 2002:a05:6512:3da5:: with SMTP id k37mr14634897lfv.655.1631648302398; Tue, 14 Sep 2021 12:38:22 -0700 (PDT) MIME-Version: 1.0 References: <20210914105620.677b90e5@oasis.local.home> <20210914145953.189f15dc@oasis.local.home> In-Reply-To: From: Linus Torvalds Date: Tue, 14 Sep 2021 12:38:06 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] tracing: Fixes to bootconfig memory management To: Steven Rostedt Cc: Mike Rapoport , Andrew Morton , LKML , Ingo Molnar , Masami Hiramatsu , Linux-MM , Vlastimil Babka Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=ZKg5V6al; spf=pass (imf21.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.167.51 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org; dmarc=none X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 02CB6D02E2BD X-Stat-Signature: rjoc6zef4mpazwm818yg3w6njdb4ddef X-HE-Tag: 1631648305-310742 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 Tue, Sep 14, 2021 at 12:23 PM Linus Torvalds wrote: > > Actually, never mind. I'll just do the automated replacement, it will > fix that NULL pointer thing too. Sadly, the automated replacement isn't quite as simple as the sed-script I planned on using. Because this: sed -i \ 's:memblock_free(__pa(\([^)]*\)),:memblock_free_sane(\1,:' \ $(git grep -wl memblock_free) does actually mostly work, but because "__pa()" takes either a pointer or a integer value, the end result is that sometimes we call memblock_free_sane() with things that aren't pointers. Very annoying. That "__pa()" macro has the two underscores for a reason. It shouldn't be "use this thing willy nilly". So I'll do a minimal conversion that adds "memblock_free_ptr()" and hope that people start using that. And then we can later try to move "memblock_free()" to a name that isn't so misleading. Linus