Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp592755iob; Fri, 13 May 2022 08:19:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+OJCBI2bSCaUSDvx/o9SZVbauQcboxgoHB2WjqlxtIPTyrkbgmE477nMkYKEEEfmpCAKG X-Received: by 2002:a05:600c:2216:b0:394:54e4:ac9 with SMTP id z22-20020a05600c221600b0039454e40ac9mr5091780wml.47.1652455175437; Fri, 13 May 2022 08:19:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652455175; cv=none; d=google.com; s=arc-20160816; b=XQAGhsygU8fSQRdcLGdcnT8g4YDE3OQLN+xGdgpwBqZVI7J0cc82LoM7xsRPd/j0Ag W9QSach5yl3egKvbdDHO8hNBRXKNXmdCrWAgJ1zTvwqSO5GLVifc8LbkQS3AupA8a3K6 t/PD4jFrB2hfvDkmn09GyYzGnlim0xcggIZpQQZIW/3z5IRXviqQ0zcxawHsesi1KkiP e5NALRRIFQaY88qrQmRcONkmXus9oa5VS8LpZlGOzMv1sJU+MmaaV8OfIK9T3q4TPo8B AeZAgjlnftOGBRzPSrYMelk2uOnVnWpmQ2OnhyXEtxmTQz+k1Qat609YLAQXy7pNxDRd 9EJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=LTKi6sAW5Wnn5JxzuBjnHsq9FW1AedE2Tm2sMJNjbuM=; b=K0UVQW08WerYOUYb9Y9BgQp8XnKOFJ2RvpnOLzqDCO7Li8GjoaB6MVePFZ9i6ib7R/ 7KOJ2qnXVRvOR8YwHqGHIKuwd2MqZ1bl4I/ZdHZx52uiSk4Uo3T3ej2iEslIg1TPwSdp vMhGHA9hAKkUDU6PYwoK6PsLUghnlwvY4dN1vMxjgwH44OswBPmwT5Te/OYcKYgffuGB VzONNKXxWTtz3hCz4QH30g5W+bQTOmlW55XlGNkUXiJpiHR3/YkQczgELFDnXWgfUqFV 6krN5fickHXquohx/YUKeGSrXJu+a97ofyAw3u1GUf7ootEdkJ8kjxo2VpupWuPHLVhs +LQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cP2hgRZZ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=BOPHxlmu; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e6-20020a056000178600b0020c4018c252si3010056wrg.520.2022.05.13.08.19.02; Fri, 13 May 2022 08:19:35 -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=@linutronix.de header.s=2020 header.b=cP2hgRZZ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=BOPHxlmu; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376341AbiEMB1b (ORCPT + 99 others); Thu, 12 May 2022 21:27:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352238AbiEMB13 (ORCPT ); Thu, 12 May 2022 21:27:29 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E454E5F8D5 for ; Thu, 12 May 2022 18:27:26 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1652405244; 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: in-reply-to:in-reply-to:references:references; bh=LTKi6sAW5Wnn5JxzuBjnHsq9FW1AedE2Tm2sMJNjbuM=; b=cP2hgRZZ9plq+O0IDo1vTL/H0jE/EJ1Y2NZBsQDfMBpPMcjzlwqJOyRJJvBgduC4fhn4It s82N19W5bKEdOjAASaYozJhL3Yy54FttXUYFHjIaLCmYqao4kp5NCUxbPkeZvpbwFev8Wz wR5cect9useyVtBbWtuvYdBA34RBti4i4y+E66g8qHBWlrNKErBx6YQ4KRF9YeizazgtpA Kld6uymOt/7hkujS8+A4E466kc71OJyQwaVqefmpLVnU79r4sC4SytznDmTFfaPIKNdxfp /VMc6SefkJ0NvzKaFk9ySGgB9zS/c/nRae732sg83j0iVsiUqRo97CpM3xJdcQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1652405244; 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: in-reply-to:in-reply-to:references:references; bh=LTKi6sAW5Wnn5JxzuBjnHsq9FW1AedE2Tm2sMJNjbuM=; b=BOPHxlmulNJXw0lNYAY/ujR+fw7MmSFJ73d3UhTHWAB6nTWKOeF/L5ioXz0e9rVPzWTBj1 gyY8akMvERY14IAg== To: Dave Hansen , "H.J. Lu" Cc: Peter Zijlstra , "Kirill A. Shutemov" , Dave Hansen , Andy Lutomirski , the arch/x86 maintainers , Alexander Potapenko , Dmitry Vyukov , Andi Kleen , Rick Edgecombe , Linux-MM , Catalin Marinas , LKML Subject: Re: [RFCv2 00/10] Linear Address Masking enabling In-Reply-To: <67aef839-0757-37b1-a42d-154c0116cbf5@intel.com> References: <20220511022751.65540-1-kirill.shutemov@linux.intel.com> <20220511064943.GR76023@worktop.programming.kicks-ass.net> <20bada85-9203-57f4-2502-57a6fd11f3ea@intel.com> <875ymav8ul.ffs@tglx> <55176b79-90af-4a47-dc06-9f5f2f2c123d@intel.com> <87o802tjd7.ffs@tglx> <67aef839-0757-37b1-a42d-154c0116cbf5@intel.com> Date: Fri, 13 May 2022 03:27:24 +0200 Message-ID: <878rr6te6b.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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, May 12 2022 at 17:46, Dave Hansen wrote: > On 5/12/22 17:08, H.J. Lu wrote: > If I had to take a shot at this today, I think I'd opt for: > > mask = sys_enable_masking(bits=6, flags=FUZZY_NR_BITS); > > although I'm not super confident about the "fuzzy" flag. I also don't > think I'd totally hate the "blind" interface where the kernel just gets > to pick unilaterally and takes zero input from userspace. That's the only sane choice and you can make it simple for userspace: ret = prctl(GET_XXX_MASK, &mask); and then let it decide based on @ret and @mask whether to use it or not. But of course nobody thought about this as a generic feature and so we have the ARM64 TBI muck as a precedence. So much for coordination and portability... I'm so tired of this short sighted 'cram my feature in' approach of _all_ involved parties. Thanks, tglx