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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9F3BC433EF for ; Fri, 22 Apr 2022 13:24:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4918E6B0098; Fri, 22 Apr 2022 09:24:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 43EB26B0099; Fri, 22 Apr 2022 09:24:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 29C816B009A; Fri, 22 Apr 2022 09:24:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id 168D46B0098 for ; Fri, 22 Apr 2022 09:24:44 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id B6CD0205A5 for ; Fri, 22 Apr 2022 13:24:43 +0000 (UTC) X-FDA: 79384584846.11.88D7ED3 Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) by imf09.hostedemail.com (Postfix) with ESMTP id 7B717140029 for ; Fri, 22 Apr 2022 13:24:41 +0000 (UTC) Received: by mail-lf1-f51.google.com with SMTP id p10so14272603lfa.12 for ; Fri, 22 Apr 2022 06:24:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Uh/i7pONWs9zNhFkmIOXxH8K9rX2pqq3+dxTkHV4IDc=; b=jaaEpWQcqbaEyYdutWZeZdjw+QQcJSdbCS9SFtmkIjJKr2AaQYFmeKaXsRSZNqL/du 5uA3obMPxfFyjez258m1b1o3+55hDt6FJiMIMDWDq4Wcce1C2cvATWGciaROy62EMuEf F6qX6s4f12Eef6QMWAdbw2PzdFVAkvZ/6g9u6GJeE7ms2M0vZyA6a7eXbsB8WedPWvuF +FcQspQ/1qjQqM/t+unssU2WbArmsbheEoBeA+Gq2TWwJR2DCcRugpRMkubOnFbxiUbD vPq3O5uD/3VmxTCRiieDxY5FMecKZkf+z9RQ8DqinlJg182Sn3YFbeJs3VVUD1Hne/cw /oMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Uh/i7pONWs9zNhFkmIOXxH8K9rX2pqq3+dxTkHV4IDc=; b=Drm9rlKJOthriKjWSUbK4C9Ye0VGkoW/nzfd7yWtUI/rO35c5Ky8/KhABZiCZXXFDr MxyfUoteo6+YlKfnqd4A2L48jVspELHiVy9oZLOrqnOCGbYnKF2c+uzkENnDmssbHHYD CJ3mV0QEfQzSe9Rmscfsk7A/b6KVhhBeiNb05R+OOuBePSKZtO3mkIx5djQcHXdhseIK WtLOTLckYpKHKKUhit4Wog0FK9FViPXLruEISuecMpFjpu3gvYX/J+fQtjKIlBWdSOaq 4QUDqVR9Q+2+CJswGQwj7/YvbMxt239/++Hoka3ln2Unh6Ao66n5wh6HjlmuG7WMtG7y x07A== X-Gm-Message-State: AOAM530zCe+yQOgjBj4miyqZVGp/Qsmv4FAXguV9aJwUg54ENsy+6ciM 0++TXbiKkOCtJdRP+pRswVMGmw== X-Google-Smtp-Source: ABdhPJzZtxkAjlCvb/TUt3cLoRv5l+ol9ToRYGDDMNmm0Vv66uA83/NBrnntGKbTm/BO4hUpHvgFow== X-Received: by 2002:a05:6512:228d:b0:471:c287:9715 with SMTP id f13-20020a056512228d00b00471c2879715mr3171748lfu.660.1650633881512; Fri, 22 Apr 2022 06:24:41 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id w23-20020a197b17000000b0046d1729e7d9sm224621lfc.294.2022.04.22.06.24.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 06:24:40 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id 1CD12104429; Fri, 22 Apr 2022 16:26:19 +0300 (+03) Date: Fri, 22 Apr 2022 16:26:19 +0300 From: "Kirill A. Shutemov" To: Borislav Petkov Cc: "Kirill A. Shutemov" , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Ard Biesheuvel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , Varad Gautam , Dario Faggioli , Dave Hansen , Brijesh Singh , Mike Rapoport , David Hildenbrand , x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv4 3/8] efi/x86: Implement support for unaccepted memory Message-ID: <20220422132619.54e754fyzeaaoqog@box.shutemov.name> References: <20220405234343.74045-4-kirill.shutemov@linux.intel.com> <20220418155545.a567xnxa6elglapl@box.shutemov.name> <20220418202431.whvql4w57c7l5vpw@box.shutemov.name> <20220418235015.mnujtlmmlyin7y6m@box.shutemov.name> <20220422002124.lwd7b56zko24gbll@box.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=shutemov-name.20210112.gappssmtp.com header.s=20210112 header.b=jaaEpWQc; dmarc=none; spf=none (imf09.hostedemail.com: domain of kirill@shutemov.name has no SPF policy when checking 209.85.167.51) smtp.mailfrom=kirill@shutemov.name X-Rspam-User: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 7B717140029 X-Stat-Signature: c8uu7fheptbaaa6qph5iehtax1cq8p3e X-HE-Tag: 1650633881-513454 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 Fri, Apr 22, 2022 at 11:30:11AM +0200, Borislav Petkov wrote: > On Fri, Apr 22, 2022 at 03:21:24AM +0300, Kirill A. Shutemov wrote: > > There's still #include in misc.h. You removed one, but > > there's a second one for some reason. > > I don't know which tree you're looking at but latest tip/master has: > > $ git grep -E "efi\.h" arch/x86/boot/ > arch/x86/boot/compressed/acpi.c:6:#include "efi.h" > arch/x86/boot/compressed/kaslr.c:25:#include "efi.h" > arch/x86/boot/compressed/misc.h:40:#include "efi.h" > arch/x86/boot/compressed/pgtable_64.c:7:#include "efi.h" Sorry for the noise. I read 'elf.h' as 'efi.h' :/ But it also includes indirectly: In file included from include/linux/elf.h:6: In file included from arch/x86/include/asm/elf.h:8: In file included from include/linux/thread_info.h:60: In file included from arch/x86/include/asm/thread_info.h:53: In file included from arch/x86/include/asm/cpufeature.h:5: In file included from arch/x86/include/asm/processor.h:22: In file included from arch/x86/include/asm/msr.h:11: In file included from arch/x86/include/asm/cpumask.h:5: In file included from include/linux/cpumask.h:12: > > Any plans for ? It includes : > > So if misc.h is including linux/bitmap.h indirectly, you can simply > include misc.h right? Yes. > And then you'll slide under the closing door, as you say below. :) Is it sarcasm or clearance to go? > > I also underesitmated what is required to be copied because of the > > indirect include. The list was only to compile bitmap.c. mem.c (former > > unaccepted_memory.c) would require more. > > More like? for_each_clear_bitrange() is pain to unwind. > Maybe I can help out converting some of the stuff. You could push your > current state somewhere - even if it doesn't build - so that I can take > a look... I will push what I have a bit later today. > > BTW, do we have a white list of linux/ includes that allowed? minmax.h? > > math.h? What is the line. > > Well, that's the thing. Even if those look innocuous now, if they get > new includes added to them, that has an influence on the decompressor. > > So I'm thinking copying the required bits would be the proper way > forward. I understand where you comes from. But on my side I face suddenly higher entry bar. Yes, it is bad excuse, I know. > > Maybe allow what is included directly or indirectly now? (Yes, it is my > > poor attempt to slide under closing door.) > > That's basically saying, can I get this done so that I can mark my > checkbox that my task is done - you can deal with the crap later > yourself. > > How about we take our time and solve this properly instead of hurrying > constantly? I'm okay with this. But I lack coherent understating on how you want it to look like. Like, looking on your new "efi.h", I see it still implicitly depends on and . Why is it okay? Is it temporary? What is criteria of what is okay to keep for now? You mentioned having as we do . But has non-trivial dependencies on its own. Okay, we can move them into asm/shared as well, but how to deal with asm-generic/ things? And linux/ dependencies? Do we create a copy in x86/include? -- Kirill A. Shutemov