Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1056000iob; Fri, 13 May 2022 21:22:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7jp88YLK4zmIGfv1IodDHaszkwy3P7FvhfZC5DgNM/qEYJaAhQhEx3wIItX5bJ8EBFuVi X-Received: by 2002:a5d:5152:0:b0:20c:dbc2:8d9c with SMTP id u18-20020a5d5152000000b0020cdbc28d9cmr6133845wrt.259.1652502145535; Fri, 13 May 2022 21:22:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652502145; cv=none; d=google.com; s=arc-20160816; b=rXcxcACFm8avM1rUX7wset9tcqZmF+jesK2qqbKICoS3ORzzhoxO02vKbeF0oMo0d6 QEABshuBrTe/yPYMB2RF5F1US8ecoyxUMJakwdUq8BIac+BUadM1PsnCjPKx0Lrmgmko 7CY1Rt5KchEPif2pqunbtJKEj7CJ6xlBMmrtp8NCygfzJAN1amBx6iRqR36VuIij8sep TN7dyP3HK0vo7O6JWxkKQoyJq36cdK46qvFpdQYZp+71tNcJHIUVu04RTguSnoPsrYTy 8LoX00eXsdIOCIhL/2BjCXm2ycWMze/k6zyaCtzgPjFPipK2s9GWDBBM76hhWgzDJTPl Wx7Q== 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=Dx6PECeRnBdEb9dEEN4beplAAH/dKacBJDTCm559TWk=; b=vkzOb813axacIMX6s7yN1K1/KpEy/vIpL78LccjbhZJX7EZU9NpRb8f2X0U1pGLvtN BIO29fU3nKTnO4ZCp9NVPXdtG9YTTYkqCv32eGH+BvFKQEBiAuAhu4s20XCgpfBoWzNh 8yxwB/hCFP8fXOYNilT5nrFk1ItXKmLuxj+T1hPtzh9Fc0P8CEoL5LJ+/Cpyw72fjnfB b3+3n+ankECQf23PnqW1Zv/4hVRLTQESGv8B3ANU9Y7GS7BIpvAoQJ9ECv2/c7FmpjfI YOj5Re8tSCKUimCKf5EDs3DpszvaE0neAFOfQGmjaEVaPIFBOQoTLKhpIMQO8ecK2RP7 tB9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="bMvlic/C"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k14-20020adfe3ce000000b0020cdbc51228si3281756wrm.176.2022.05.13.21.22.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 21:22:25 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="bMvlic/C"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4FED75076A4; Fri, 13 May 2022 17:52:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384915AbiEMW7z (ORCPT + 99 others); Fri, 13 May 2022 18:59:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1384927AbiEMW7u (ORCPT ); Fri, 13 May 2022 18:59:50 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73FE25DBDA for ; Fri, 13 May 2022 15:59:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652482782; x=1684018782; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=S0PigX2MDUeA1FsxOZTsaM1CtoD0SV42JUS/vyCyeIc=; b=bMvlic/C1Fbk9W+R+JOcXdcIO6+HYrlUXJKHzaPbsbG7dKIZu+Qa1jy0 WJVvqGL7UTDexnfPZq3YWuRrv+zHO6317+h1zNGzrjdyIJ6v08yxgcQoE tKX9ycuTT8iHKUEmdqtfAnJX2hY/FCtM7fcvut2f6qmDURdFoGd9lKwUu BQB9lZvJuqNI5h2bL2QKPVbQftZfhsQ76HZPuGJmA8FjEM2ETYgfFwVkW TtVcHQnHNzrFyEPmjDMT8qttvJL1/BLpt62WKqV6q2K2jcTco7utNRAWE 1mJNyzjTSw1IQESIpsdukZ9aFMplOYXspN4xKNjpcAUt2B+Q/PNczYTwx Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10346"; a="295691406" X-IronPort-AV: E=Sophos;i="5.91,223,1647327600"; d="scan'208";a="295691406" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2022 15:59:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,223,1647327600"; d="scan'208";a="698684291" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga004.jf.intel.com with ESMTP; 13 May 2022 15:59:38 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id CAE73A8; Sat, 14 May 2022 01:59:36 +0300 (EEST) Date: Sat, 14 May 2022 01:59:36 +0300 From: "Kirill A. Shutemov" To: Thomas Gleixner Cc: Dave Hansen , Peter Zijlstra , Dave Hansen , Andy Lutomirski , x86@kernel.org, Alexander Potapenko , Dmitry Vyukov , "H . J . Lu" , Andi Kleen , Rick Edgecombe , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFCv2 00/10] Linear Address Masking enabling Message-ID: <20220513225936.qo4cy6sijqpzmvpt@black.fi.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> <87zgjmtpf8.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zgjmtpf8.ffs@tglx> X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 11:24:27PM +0200, Thomas Gleixner wrote: > On Thu, May 12 2022 at 21:39, Thomas Gleixner wrote: > > On Thu, May 12 2022 at 10:22, Dave Hansen wrote: > >> One of the stated reasons for adding LAM hardware is that folks want to > >> use sanitizers outside of debugging environments. To me, that means > >> that LAM is something that the same binary might run with or without. > > > > On/off yes, but is there an actual use case where such a mechanism would > > at start time dynamically chose the number of bits? > > This would need cooperation from the application because it has to tell > the magic facility whether it intends to utilize the large VA space on a > 5-level paging system or not. > > I have no idea how that is supposed to work, but what do I know about > magic. > > >> It's totally fine with me if the kernel only initially supports LAM_U57. > >> But, I'd ideally like to make sure that the ABI can support LAM_U57, > >> LAM_U48, AMD's UAI (in whatever form it settles), or other masks. > > > > Sure. No argument here. > > Assumed that the acronym of the day, which uses this, has a real benefit > from the larger number of bits, we can support it. > > But we are not going to make this a per thread selectable thing. > > It's a process wide decision at startup simply because it does no buy > thread A anything to select U57 if thread B selects U48 before thread A > was able to map something into the U48 covered address space. Same issue > the other way round as then B has to fallback to U57 or NONE. That does > not make any sense at all. > > I'm all for flexible, but not just because we can. It has to make sense. Some JVMs arn javascript engines are known for using tags in high bit of pointers (and clearing them manually on dereferencing as of now). One use-case I had in mind was having a thread that runs VM/JIT, like javascript/JVM/LUA/whatever that serves the rest of the application. The thread uses LAM while the rest of the application does not. Leaking tagged pointer into into thread that does not use LAM would indicate an issue and SIGSEGV would be deserved. No idea if it is practical. -- Kirill A. Shutemov