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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 967AAC05027 for ; Wed, 8 Feb 2023 20:16:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CKL7B7WkYpaH93kgoBAlOI6QeGEEsh3sNEDgSHuxRds=; b=aiPdn9Cz2GipAt 7c1NBYCvfDk/txAUsxyCL4dTQlQWppij0Jnk5+u0DA+gMfsq1OTJ3nusenZLIQxSQcKmoo9ayj5Un g3CdK/6W6orNklr0/UcZZpUYG0P4JQv1sPjWhgBQSjubijeDKx8IOW1DVtN72qmJnA0tPjwXVQyil S20PMe0vK9ZYy8jYJ8LbtQV42YqsOYJ3a/YnNVRArp6b64q1gcDV5OhgUTU1fQG7zP5SVfaI+hEd8 NG3s/vOzkz0tBUBc3rofHbreOKKhW5UOkeyJqUMZcuNMtVPd9guYILPewYegGlZkcFBy+HH7ct1z8 S6bX414ljqhez6no5I4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPqqJ-00GrWf-5l; Wed, 08 Feb 2023 20:14:59 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPqqH-00GrWE-Jy for linux-arm-kernel@bombadil.infradead.org; Wed, 08 Feb 2023 20:14:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=NIGjviOgXze5b7+zeKAQeI0LE6+VOVtjUNzfe8RYYy0=; b=HUelxowCuz4dWmqHwTB3QKjlSs tf0wciqscxac1S3UvZ7Jhas8TSJeQON3QXXM0XK6cNg6zvmnZjUX3S0itElkFZqnIyEP2hnDHaylC a44jnq+Dr+ilueBddMBYyIRaxY7XUZh4pvzEO4DtJwMzuku0XKZtVRGECHnOUYgmbhGRQmYFYGD22 i0KaSRQ5P0RMXbU3HjUVnjjgKVhC7Iz5oFjff6pemC/ArP5bY3QiyzxWYv8fjbiDSN5LgVC07aEn/ 7lSJmUixIT56+vmq6QsSv1mOAkbKV5J3BV08oNI0Nn++CVlr+fsXNF7/zovDf3acVvMx2bpjUhL+g L9m90ehw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPqqD-001W5W-8t; Wed, 08 Feb 2023 20:14:53 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 34A84300446; Wed, 8 Feb 2023 21:14:53 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1DE5120F194A5; Wed, 8 Feb 2023 21:14:53 +0100 (CET) Date: Wed, 8 Feb 2023 21:14:53 +0100 From: Peter Zijlstra To: Dave Hansen Cc: Ard Biesheuvel , linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Kees Cook , Mark Rutland , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen Subject: Re: [PATCH v2 3/3] efi: x86: Wire up IBT annotation in memory attributes table Message-ID: References: <20230206124938.272988-1-ardb@kernel.org> <20230206124938.272988-4-ardb@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Feb 08, 2023 at 07:17:15AM -0800, Dave Hansen wrote: > On 2/6/23 04:49, Ard Biesheuvel wrote: > > --- a/arch/x86/kernel/apm_32.c > > +++ b/arch/x86/kernel/apm_32.c > > @@ -609,7 +609,7 @@ static long __apm_bios_call(void *_call) > > > > apm_irq_save(flags); > > firmware_restrict_branch_speculation_start(); > > - ibt = ibt_save(); > > + ibt = ibt_save(true); > > My only nit with these is the bare use of 'true'/'false'. It's > impossible to tell at the call-site what the 'true' means. So, if you > happen to respin these and see a nice way to remedy this I'd appreciate it. I've often wished for a named argument extention to C, much like named initializers, such that one can write: ibt_save(.disable = true); Because the thing you mention is very common with boolean arguments, the what gets lost in the argument name and true/false just isn't very telling. But yeah, even if by some miracle all compiler guys were like, YES! and implemented it tomorrow, we couldn't use it for a good few years anyway :-/ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel