Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1164895iob; Wed, 4 May 2022 16:22:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxJZP/5fRY8vuRKuCZ3LEYLSYIQxbra/keroDDqgtagD437B83EKXxcwohC7rYu2UjGCiP X-Received: by 2002:aa7:cc02:0:b0:411:487e:36fe with SMTP id q2-20020aa7cc02000000b00411487e36femr25973767edt.338.1651706539937; Wed, 04 May 2022 16:22:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651706539; cv=none; d=google.com; s=arc-20160816; b=hHdSaUW5e8J0vSl49dlOpbC7dd+723gNx/4vsAA0jZq8+5lRfVqG+UQNtraNI6GE44 IAKmB2gsCAlyHCfFTZwvkRahzyAcpdlsNId0PoO7k1kHy++GLK6c9a8t7Oc4gTzY4pZq YIYNnA29LwePLECbUdZ69QYUDlwl8wMOEomdtXZtvqyjgU8Rlt43HDs8FE1u8VPbW8Sh gkpa/cQ18F3EprVMcF6Otl9CbXblLZwLiiw9elFLsmncrAEoDBHMo2j4gIiyJnxJXm+p qeEDAuq1nsLeo3oB2Wout3RxqmT07gfpfV9vADGzgGh+YL/RvPZ+S2PM+y7rIiErN4Sc 898g== 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=s/3cncJOU4qM0gcfLHppWGqYw6qMtIl+q32RQ0tTaLg=; b=QCDCQXxnnIBkzjk6AXu1TJ/PBPlxaXGVE1+Z6wq2QOlbKJTRqiFuU6SKi5z1GLsz/c /LsHS/XwSfRLS0qIlF4nP6Q7+iPuhhtc5D1P8da1g268prBqF1hYFTvaE3qVC1I49k96 Goe5vQ2zeF8UE0RbHjx6AJlHRn4vI4s6znt7PIki+Yl4dQol1+tG4A2FNf7TM3hEWLuT qe0GI7ZaqZrE59M/t8r+/VD6GDr7jExbJwypQmKSdI5P6U69pq/mlOhAg6fwnGymalgO ZrrqZFomij4olKkd5ONNeswlFAQKBSO4OII/ztnen1t0u9XkHnfj7jQql5gx6k1yY24q GBTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=S4uCDmhv; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o4-20020a170906860400b006ef57f5e94esi140591ejx.1006.2022.05.04.16.21.55; Wed, 04 May 2022 16:22:19 -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=@alien8.de header.s=dkim header.b=S4uCDmhv; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347639AbiEDKHT (ORCPT + 99 others); Wed, 4 May 2022 06:07:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229952AbiEDKHS (ORCPT ); Wed, 4 May 2022 06:07:18 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BDB827FDD for ; Wed, 4 May 2022 03:03:42 -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 F3F881EC0455; Wed, 4 May 2022 12:03:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1651658617; 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=s/3cncJOU4qM0gcfLHppWGqYw6qMtIl+q32RQ0tTaLg=; b=S4uCDmhv3rGIw+PB4eH6XR2CsSs7u0TZ7oZEtAqMdOHOOjHHh7ettK57tHeO66fHZQ7H8d 3QouXbXAYgnZLhOCJtKr3Bia32Ypn31Lns00iXEror4RaSD0d8qjZYY+b67Hg1ueew4NoN 0M26cKxDNPZyddAlggZoicY8HohObcU= Date: Wed, 4 May 2022 12:03:35 +0200 From: Borislav Petkov To: Josh Poimboeuf Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra Subject: Re: [PATCH] x86/mm: Simplify RESERVE_BRK() Message-ID: References: <0e001c79794c46d619714d122c262147ed83f658.1651176151.git.jpoimboe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <0e001c79794c46d619714d122c262147ed83f658.1651176151.git.jpoimboe@redhat.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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, Apr 28, 2022 at 01:04:25PM -0700, Josh Poimboeuf wrote: > RESERVE_BRK() reserves data in the .brk_reservation section. The data > is initialized to zero, like BSS, so the macro specifies 'nobits' to > prevent the data from taking up space in the vmlinux binary. The only > way to get the compiler to do that (without putting the variable in .bss > proper) is to use inline asm. > > The macro also has a hack which encloses the inline asm in a discarded > function, which allows the size to be passed (global inline asm doesn't > allow inputs). > > Remove the need for the discarded function hack by just stringifying the > size rather than supplying it as an input to the inline asm. > > Signed-off-by: Josh Poimboeuf > --- > arch/x86/include/asm/setup.h | 30 +++++++++++------------------- > 1 file changed, 11 insertions(+), 19 deletions(-) Nice. Reviewed-by: Borislav Petkov -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette