Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp46122iob; Thu, 12 May 2022 18:07:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfVlIZINQ6sYYVAUT+zApL9DbF1cIhD4VBrh7vAIErPZrsB/+7yhC2YvCqQjVAoRkwK8R/ X-Received: by 2002:a05:6402:5205:b0:427:b431:e0ed with SMTP id s5-20020a056402520500b00427b431e0edmr38526000edd.186.1652404043118; Thu, 12 May 2022 18:07:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652404043; cv=none; d=google.com; s=arc-20160816; b=LjwWA8yl5iBc+k6/3DVPzuWdfVBJpjlxsNMoJh+pFCChOk25chK3Td9xiv9HL0arHf zxzuwlz1gDT4pp8YX6VfGGaAl4CVSqDUJwDV+8FalMyT0Z+5OoVQL/FUGF4G6GqlH5rT xXNoxA9QnLTMREX67zsZcgBEv4ELMeaOryxk///hOHX+msQcXsK49SS5IGrsovXUgu/g fOMQ78mKFPbKQSPIsJGCGpqHXMO0FCAhkD+0l2wVZK3KTglFDYXST2izq9nRfOmYNYJF d4aM26g51D1DwplOT/ZMXpXW9I1k8z8eGaEoQ5zfIzzxBVbq6Fy0z9NHiBqf0fdw97pj 5FvA== 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=9py6ogGa9oM8eFz+r/oJ/gtHX4WV1rBXNn56XWgDhJo=; b=y2r3XtbnmNOxaIHN98+nG51tyA2pXFrriSydH8iPzTFOmnhTeGbX9q1tqc9lmAlRUt oD0wRCk+Rw/Gr5K60V9ur9rgQKJg2KTedj/3X2y6STdRmcPCtynXjllK8bOycDEUi+x3 6ScJoceroiuOnkedpuuJyA4BHQohHjjFdQr112ZnjrDyl0tmGhByYiOua422nnlximbB dXXIRKBgBswa7XMJ3Oplid4+U6mqNlB/K3WeRk+eJmY+BlG0VsbsCV3q0aSTT2bmBHLR 6faZNB0xyaYMm+9P7vAroOu1tE2AnOacZ4H8XS6mi7ePTw5bEeqaxd1eP8i78EQHdihn EYSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="g3/9RZGp"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa40-20020a17090786a800b006f52254149bsi813291ejc.447.2022.05.12.18.06.57; Thu, 12 May 2022 18:07:23 -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=@infradead.org header.s=casper.20170209 header.b="g3/9RZGp"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355029AbiELOHn (ORCPT + 99 others); Thu, 12 May 2022 10:07:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354732AbiELOHl (ORCPT ); Thu, 12 May 2022 10:07:41 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99A0D35DCB for ; Thu, 12 May 2022 07:07:40 -0700 (PDT) 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=9py6ogGa9oM8eFz+r/oJ/gtHX4WV1rBXNn56XWgDhJo=; b=g3/9RZGpqQT7hqtylUfNmBua4h npUP84ab6kqiLc+k1Ydo7u75/73h9GflPgoI3VkeczSc0mDGWDqpRl+PhLvM8kg/TKY8p+Dmg9+UJ CHMFo0A18xag9YhjdRI6CR7an5D6mc5yAkL4LaIFsHdkAjX/KXgOlL4O5nJZOQpsiHXOoLi2d04dy YvWLOUtY5gzzf4d4LK/PGwVBPFi7KVttAo0JTdGlZKzP0vymaIrUs+RNjqVfM0vby3RYXipjNAA0I iBh0rFa7Ks9ZHEliknjtMg1WP+MFijg4jmaODnJfWz8JlVo3OzwKjEoYJZ9FEQSe11EF67rHeOLfi rLk2+u5g==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1np9TN-006SMQ-Hk; Thu, 12 May 2022 14:07:21 +0000 Date: Thu, 12 May 2022 15:07:21 +0100 From: Matthew Wilcox To: David Laight Cc: "'Kirill A. Shutemov'" , Dave Hansen , Andy Lutomirski , Peter Zijlstra , "x86@kernel.org" , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , "H . J . Lu" , Andi Kleen , Rick Edgecombe , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] x86: Implement Linear Address Masking support Message-ID: References: <20220511022751.65540-1-kirill.shutemov@linux.intel.com> <20220511022751.65540-2-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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_NONE,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 01:01:07PM +0000, David Laight wrote: > > +static inline int64_t sign_extend64(uint64_t value, int index) > > +{ > > + int shift = 63 - index; > > + return (int64_t)(value << shift) >> shift; > > +} > > Shift of signed integers are UB. Citation needed.