Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4399817ioa; Wed, 27 Apr 2022 03:03:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+SfTEmUznSlAosnkOpUh799GYezUHNp5bb1qMai1lbWgHGxMEZ/py8x64ljdEjv9W//FN X-Received: by 2002:a65:6e88:0:b0:39d:2647:f75d with SMTP id bm8-20020a656e88000000b0039d2647f75dmr23569573pgb.523.1651053800001; Wed, 27 Apr 2022 03:03:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651053799; cv=none; d=google.com; s=arc-20160816; b=UOMCiLn6gaHjnPXJeMeVN7rULhKswMTFHQncHMeCqH9P3qzykyDxFzdfPAHpCJZRxW p6HgaXRlSWfzBNSqyAXZaduQS5Izn3tj0wF8VRqtmg+f5C+r7YSXH9+8lngoFm7Q9M+X RobBqCI6g+1U66aSrYBX4gqK1IQ0YSOhXVsdHqRcSWduU4H3rkY1thL1FoMZVlBdkChN /TxMgAmzbG6GRMabFsLOl4n2QN2asJgsdtd+MjabelUTffP1SH3CGBmkrAPR6Wh1rYAy 0o4YV+F91OuPTC0Nwq1sc1oB+Jnf/f9KpdVcAQ18Zuzv5e3vrHkD3NslWqp8ATDJbaLP nzmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=MiyVowPK2hZlIKasSYAvE3SnRxXRBC3uvjngpKcSNns=; b=Xjq5E4raNHTve4tHqKvh0oyNBsohOQTqX2q6EySfV5f6W4byve4K8agXpsOn4oe5wN OlqaZA7NzA8GHqB099c4ITuJQFe7dAWNH6CCqZSc9y6BeQTdo+a+oI1Qsour3vH/xHmc PK4xYolibSV8Ev3G1VOuwmUFHDIIKgjPUIl3o1HpECXAbAzvf3NhsPLA9Qm/9jXveJMc g/1K3fkR/+pzGZLzHLKBv5RERa2YJdvk4YHvig0qU2Qzxn+jSDINbjBmulv2DWriICGu NKoihMEtfKnRKyauGkd5SOu89YSFUPJ/7JTDTwCrIOWq7Zx5bRWvBA7+pUgSo19T7EWp 0Rhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=PMojOBU+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l19-20020a056a00141300b0050d80e4935fsi945262pfu.256.2022.04.27.03.03.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 03:03:19 -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=@alien8.de header.s=dkim header.b=PMojOBU+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D4E2C2E027E; Wed, 27 Apr 2022 02:29:25 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234281AbiDZPZ6 (ORCPT + 99 others); Tue, 26 Apr 2022 11:25:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347763AbiDZPZ4 (ORCPT ); Tue, 26 Apr 2022 11:25:56 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 470FE140B4; Tue, 26 Apr 2022 08:22:48 -0700 (PDT) Received: from zn.tnic (p5de8eeb4.dip0.t-ipconnect.de [93.232.238.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 991441EC050D; Tue, 26 Apr 2022 17:22:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1650986562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=MiyVowPK2hZlIKasSYAvE3SnRxXRBC3uvjngpKcSNns=; b=PMojOBU+k5aEJqxWh5hhGrd66DheMBQyYIe5EzbwXn0aux6LMi2JD/r0SB3la5wWJY23tR BtJR7dkdu94HUM0Iitc9EUzx96lXlqZsYbBt5hgdq325zYkkV+c+0caUm08/KbtNuqEHzh 20ZBQDXPy90GfpaRhP7ol+LiNQBtkIQ= Date: Tue, 26 Apr 2022 17:22:39 +0200 From: Borislav Petkov To: Matthieu Baerts Cc: "Rafael J. Wysocki" , Pavel Machek , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Chen Yu , Pawan Gupta , Catalin Marinas , linux-mm@kvack.org, Mat Martineau , Ingo Molnar , "Rafael J. Wysocki" , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] x86/pm: fix false positive kmemleak report in msr_build_context() Message-ID: References: <20220423182410.1841114-1-matthieu.baerts@tessares.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220423182410.1841114-1-matthieu.baerts@tessares.net> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no 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 Sat, Apr 23, 2022 at 08:24:10PM +0200, Matthieu Baerts wrote: > diff --git a/arch/x86/include/asm/suspend_64.h b/arch/x86/include/asm/suspend_64.h > index 35bb35d28733..bb7023dbf524 100644 > --- a/arch/x86/include/asm/suspend_64.h > +++ b/arch/x86/include/asm/suspend_64.h > @@ -14,9 +14,13 @@ > * Image of the saved processor state, used by the low level ACPI suspend to > * RAM code and by the low level hibernation code. > * > - * If you modify it, fix arch/x86/kernel/acpi/wakeup_64.S and make sure that > - * __save/__restore_processor_state(), defined in arch/x86/kernel/suspend_64.c, > - * still work as required. > + * If you modify it before 'misc_enable', fix arch/x86/kernel/acpi/wakeup_64.S Why does before misc_enable matter? arch/x86/kernel/asm-offsets_64.c computes the offsets and there is a member like saved_context_gdt_desc which will get moved after your change but that's not a problem because the offset will get recomputed at build time. Hm? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette