Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4382017ioa; Wed, 27 Apr 2022 02:32:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCtIn3hT5xfxz7YSqmhJPg90a1lOXDXoQA9CLoqSIxIn+kfOL62eV05sGL6nB3L5Z1JdbA X-Received: by 2002:a17:90b:384a:b0:1d9:7835:8c with SMTP id nl10-20020a17090b384a00b001d97835008cmr16494594pjb.167.1651051944944; Wed, 27 Apr 2022 02:32:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651051944; cv=none; d=google.com; s=arc-20160816; b=K9kqcBLKphSgvJDpQlRhO8/OlfV9E0eea7YXRPGLzshgmEY9PTJBUL5nRnbYe4uyEj f02WZPX/CUFXK3id8pe4lpnfFH2qgp+FclNIJS2PMtKfOTd8RHJuFUOPl+iUj6RLcfM0 VEP9EleC/MQNW3vNQ5bgmqy2uZ4I0ye2xR5epI/M9aPuFUQYbuqYCJDWKMJ+VcGADapG Xp8mDT+axsDy0ghKOlU6aDxZKAykURi9iFMaw6r1nL4lqw+UEFiA6TWukWhq1dpqaOvs dJv9wOj2yWDn4r9mAEKAVnnejHlNlJMJal/6nkd360D0EuAxI1IeHsM2y7cbeRaPpQ6e K+tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=tLEXJAA00IeUn92g+4KPqheiYchRzNk1CErI3hE/2ek=; b=Rwcrc7igDuXdHsnJvpcmyl1I1ISKe22eJdULeRMVclYg6D8uVqKeNMH4v/JXrgi/Cs QwmbjnOhhIEkbbKqUE5QdVVhBcZL0sE4uEfOT8rPiCUjRJCx75et9/tEwlH8rqkqkLHo 1gxQnZ+wrsNgH3QNIW6TeelgJylLTgBrzmLHh/x4J0yh2KeHvhro/2wZ1tqV+rNpd5uS jyfTtkVevwLqYksLUcKjaAFm2ckUlFbFRaBmFT9pXuOQc0sC4k69tKNy3fg35REfKs8c BZZ1vsxFrfx9aqZCwqRTwpzy2e0AAF/W/2fPHunxWohg2WEHAyp85kTESebidiRkj25Y M66g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tessares-net.20210112.gappssmtp.com header.s=20210112 header.b=GZTVe7N8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t191-20020a6381c8000000b003820d821f00si979998pgd.473.2022.04.27.02.32.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 02:32:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@tessares-net.20210112.gappssmtp.com header.s=20210112 header.b=GZTVe7N8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7A621254CD4; Wed, 27 Apr 2022 02:12:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354459AbiDZULR (ORCPT + 99 others); Tue, 26 Apr 2022 16:11:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239766AbiDZULQ (ORCPT ); Tue, 26 Apr 2022 16:11:16 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E99E1594BF for ; Tue, 26 Apr 2022 13:08:07 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id dk23so14978350ejb.8 for ; Tue, 26 Apr 2022 13:08:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares-net.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=tLEXJAA00IeUn92g+4KPqheiYchRzNk1CErI3hE/2ek=; b=GZTVe7N8eI4UTdUZ9Tjai6ca3oa5nN6rkKqDwJU5o1VwzHSMXgIHJRjjZsQACU5uBr GlkbgtWhXlTBtH3QXpvEoPAkUzhX7wHNUHEaLjFraK4Fxtf4kIrosSkKY/VWdTxIs6pf 5j3hctG+fUcS4QoW3bLZ0xoaJyYh9V/s3+zsgtxv2L2OcFOc1uHBT5Q7sglwvPcZZZdv bavXpvLDh9qLJjqRuhTKl+u9s40qyzYO9BnYYSieFdcxtSESEFvW2YK+MMlVYbi0SMeb Fc/sEvZjRZVKC3V11zRIwjbWtuJxw1dSkIWhUS+sK4rScXto270+v/jPojKThfYXG71w +PLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=tLEXJAA00IeUn92g+4KPqheiYchRzNk1CErI3hE/2ek=; b=pRoWMVPzanu+/C6DOeXy5Ic0XOKdvosyDwtu0cogWcJ7kfefY2+bwgDXVoDQIobDcb hkNAKLOtQ84uhstkI6mjsYf+bB55qfTzxnvgjgkKuBhHHOSZFRzWFCDRr3ZRjQ7tDUiV oNssuZ3h0YP1fpDJ9zUEXmsD5LPMkq9M0M2K/nDUAJ73DSP0kwo4Bl9HY3j6vPyoHhTc JHK4gcWNHI4qRHdlH8vrKkmA17fK5PRGI9gR4q8YKhvNQjNA6eHQkoZ/eGri7E5HI5DT lS4D93DYVOQzey1qcfCx9yu5gnkgSKCMiXT+8yNT7oKHp1WyFeW70zh3LiRJ0nB9/ySa k5+A== X-Gm-Message-State: AOAM530upMkkaqU+3mmNT/2hIUFZ/TaIXxzgiS/2o9hu33+HJdIm/7wB vDtNGz8Db6M3H25KN7jksXg1mg== X-Received: by 2002:a17:907:62a6:b0:6ef:8118:d3e2 with SMTP id nd38-20020a17090762a600b006ef8118d3e2mr22587094ejc.605.1651003685427; Tue, 26 Apr 2022 13:08:05 -0700 (PDT) Received: from ?IPV6:2a02:578:8593:1200:d053:7ae:ded9:ba66? ([2a02:578:8593:1200:d053:7ae:ded9:ba66]) by smtp.gmail.com with ESMTPSA id kt24-20020a170906aad800b006f37988318esm4074017ejb.48.2022.04.26.13.08.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Apr 2022 13:08:02 -0700 (PDT) Message-ID: <645fe7b9-4751-f94a-2ae7-37e6c1a7165a@tessares.net> Date: Tue, 26 Apr 2022 22:08:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH v2] x86/pm: fix false positive kmemleak report in msr_build_context() Content-Language: en-GB To: Borislav Petkov , "Rafael J. Wysocki" Cc: Pavel Machek , Thomas Gleixner , Ingo Molnar , Dave Hansen , the arch/x86 maintainers , "H. Peter Anvin" , Chen Yu , Pawan Gupta , Catalin Marinas , Linux Memory Management List , Mat Martineau , Ingo Molnar , "Rafael J. Wysocki" , Linux PM , Linux Kernel Mailing List References: <20220423182410.1841114-1-matthieu.baerts@tessares.net> From: Matthieu Baerts In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE 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 Hi Borislav, Rafael, Thank you for your reviews! On 26/04/2022 19:27, Borislav Petkov wrote: > On Tue, Apr 26, 2022 at 06:24:04PM +0200, Rafael J. Wysocki wrote: >> So can the comment be dropped entirely? > > Looks like it to me. All the accesses in wakeup_64.S are done through > those offsets which are computed at build-time so they should always be > valid. > > OTOH, I wouldn't mind having there some text making any future person > touching this, aware of where to look when making changes. > > Some changes like removing a struct member are nicely caught, ofc, > see below. But for something else which is a lot more subtle having a > comment say "hey, have a look at where this is used in wakeup_64.S and > make sure everything is still kosher" is better than having no comment > at all. IMHO. Good point, let me update the comment and the commit message in a new v3. Cheers, Matt -- Tessares | Belgium | Hybrid Access Solutions www.tessares.net