Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp811392pxu; Wed, 7 Oct 2020 17:12:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaDdpiR49am6a1AExK78XVuKltQhSSLeZ9LI3PVERiIkzF+uh/P+awC/SSlBVftgMIgrKq X-Received: by 2002:a05:6402:1515:: with SMTP id f21mr6555572edw.175.1602115963533; Wed, 07 Oct 2020 17:12:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602115963; cv=none; d=google.com; s=arc-20160816; b=wHgerhgnikokV/gj7jhrJpCZ8Otc6bLE65shNn4txwOLN/kxc/sqwGuu8L8zYUYKlE N2TiNiN9p4TEuHqM5krwl9psQjJNztO4UPzX8326vkG9Wl1CPi716XH7hmH3n4SWVYwa i+Dqm1vdImQXO8q3XsQAK1X4CVkCZzuBSiywcyVloLvTWJt+7+JOf0aDeO083hGxu1w8 3BbFlH0Uz5Q8qkFg5VzvGmuy5u7cCr26y4ZsukFC8efRwOdtkyOll7hb59ihSA4PJibM oVXhbG7sE52PXIKLNtaqxXHscDYWSibrh5pk8LE7yi44mnDggL8d75qOtNulHwH3Ytde Y+Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=n0gLEBQyKqZHkw4MpU+58J3CU58020EaCbMmWHSAR1o=; b=hbeS6fcqpkhOj71BuAhNvJ8/UKOttg8JtafmoSvNH4kq+FMMOBSqKvfj6xgZr2UgU+ PeYBD+HI7GKUoGre3KmyKdWf5N4+mau66e/ktyfuT7UrRpmARX5Lu6/E0/t5up4XmQOu j06TscyZEMMomILdvWmb0IjxlIWoUm0cvRfQPU6qC+pJYKOvF+vhWiTVO3z0JJHOEUg8 PMEvWIDECtOy1xTE3yf6Exfl3wHMJ2Oug4sZFLqpHxDTbGhXV8Y3Tl8L3TpMclagK3rv E0oPYAjB98M9QVQI33FxGyjA9x7hMGMX6Qox0Dw1LvUCq+42XH4FUEmJZy6KzOWR3m42 spIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zP7G0tPK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t26si2497841ejy.420.2020.10.07.17.12.19; Wed, 07 Oct 2020 17:12:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zP7G0tPK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727430AbgJHAHv (ORCPT + 99 others); Wed, 7 Oct 2020 20:07:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:46388 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726129AbgJHAHv (ORCPT ); Wed, 7 Oct 2020 20:07:51 -0400 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 762492177B for ; Thu, 8 Oct 2020 00:07:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602115670; bh=SFKYXAM/6wL1kNkLhG1rEA3Coy5dc1T0O5EbE8h9jL0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=zP7G0tPKMtP8RwB8+wKwEIHVMmHCJBKZ6E5BBRqDAauDdxfvd6R7VC6TkLPNI2sYE xBNqxgr3RZl2V7i/Vo85dnMWYGsfEKLXK2DjpN68u2wzfXST8XK7R9vM8wOCroLRo1 4cQMSDkF6in5wC63IQN4auejf6KkO7D65pF2OP4c= Received: by mail-wr1-f42.google.com with SMTP id n6so4036736wrm.13 for ; Wed, 07 Oct 2020 17:07:50 -0700 (PDT) X-Gm-Message-State: AOAM531DtnRiYIt7dLkVuYEj4Ymo2k0uqaaz35/8EQfAW9d0eUF3kf19 aO3Tjz1tdw9MpXdWbYyALDxyjGoCuoX22lacKolvqA== X-Received: by 2002:adf:a3c3:: with SMTP id m3mr6011139wrb.70.1602115668829; Wed, 07 Oct 2020 17:07:48 -0700 (PDT) MIME-Version: 1.0 References: <20201004032536.1229030-1-krisman@collabora.com> <20201004032536.1229030-10-krisman@collabora.com> In-Reply-To: <20201004032536.1229030-10-krisman@collabora.com> From: Andy Lutomirski Date: Wed, 7 Oct 2020 17:07:37 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 09/10] x86: Convert mmu context ia32_compat into a proper flags field To: Gabriel Krisman Bertazi Cc: Andrew Lutomirski , Thomas Gleixner , Christoph Hellwig , "H. Peter Anvin" , Borislav Petkov , Robert Richter , Peter Zijlstra , Ingo Molnar , X86 ML , LKML , Dave Hansen , "Christopherson, Sean J" , kernel@collabora.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 3, 2020 at 8:26 PM Gabriel Krisman Bertazi wrote: > > The ia32_compat attribute is a weird thing. It mirrors TIF_IA32 and > TIF_X32 and is used only in two very unrelated places: (1) to decide if > the vsyscall page is accessible (2) for uprobes to find whether the > patched instruction is 32 or 64 bit. In preparation to remove the TI > flags, we want new values for ia32_compat, but given its odd semantics, > I'd rather make it a real flags field that configures these specific > behaviours. So, set_personality_x64 can ask for the vsyscall page, > which is not available in x32/ia32 and set_personality_ia32 can > configure the uprobe code as needed. > > uprobe cannot rely on other methods like user_64bit_mode() to decide how > to patch, so it needs some specific flag like this. Acked-by: Andy Lutomirski There are still issues with vsyscall control, but they were pre-existing and I'll try to get them fixed up. --Andy