Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1299490ybl; Fri, 23 Aug 2019 17:15:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1taUbQgwtQzbkL3ble7IJpdsueoWlcCVaqD32HXndzSB8T8P5BO2PvfDo7wubC/JryaTr X-Received: by 2002:a65:5889:: with SMTP id d9mr6090832pgu.380.1566605702891; Fri, 23 Aug 2019 17:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566605702; cv=none; d=google.com; s=arc-20160816; b=Scdjt+h3my4XOov2cTlKx23nNcxObQAO08bg9ru4ZUURHZiy8BrElx0GxfTmmT3JBQ WdcXDBYpcPoa1NuneO3p6y6HG8Mog1/2x3o4r7ZcKU68UJETPyylx7TdsF3frVokVJ5n 9c3LzYMRtYeBUCaitrIog5Lml6JwPGP3iaIcJwFElsYz3Bxpc8rU5jOzROyCJE6GrDGM kOLoEwUK798F9YNfYrvGGkW9BXHc+70NAHvHoxN2VWwYrZlT4BTtChuRWhrxv2KRo2ek mx697tbPg9SzliBfSsMx8y1IltZ00/8vDVUpHllrDFdpfGxjyGdvWvMYwQZdVfnLbD31 oguw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=VWU0ylJDr+29uUzAcujtRyKx7Kjb8w7X0k3narASjMo=; b=Esw/YPklCMidRP4m2mhjk8FDZynx3Nu3S5Qfv4aPF+XcISpggsVGnTe7MMSWlbZGik 33y59aBoBmmd/H8CmSSu8CZREQy5uWN1L0LIp1Psbg7PQX/YXIB6kqtv5hIIPG+4OSO9 aeuuNHMU7z5kasmxjGL+sXIbf9pXdzLDr9GLF5H8Rebw6H/rlrg+UkvRQoFU1SIZycPs +d0oBOE2QyI/oqosO5WDy7KpwBwNlinjklSnyOn5AFCABcyp02Mqe/aFpS0vhD+Evcg2 K43YxJEdmTrf1dUNCCT6f4orauBeIdCWtp4SOO2ArigeymzaU7Fqrf+dgxPSWNeB11Bz qW9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=o9tVnigb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p9si3540213plk.47.2019.08.23.17.14.47; Fri, 23 Aug 2019 17:15:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=o9tVnigb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726142AbfHXAN2 (ORCPT + 99 others); Fri, 23 Aug 2019 20:13:28 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:40109 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725844AbfHXAN2 (ORCPT ); Fri, 23 Aug 2019 20:13:28 -0400 Received: by mail-pl1-f196.google.com with SMTP id h3so6470840pls.7 for ; Fri, 23 Aug 2019 17:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=VWU0ylJDr+29uUzAcujtRyKx7Kjb8w7X0k3narASjMo=; b=o9tVnigbLk97XJLHLQcayUDShA0hBJ1b1BjdETiro3WRqrfhLDmAdbAiVJI/8dm1z8 JcmZdMNcekRPghSCDOh53hvRmubAUsRLnFREuLxy3fI00GkivqPZOfZkeZOdT0wNZ7Mq DnKBgA4u8+RQPcR2ykru6JQT2iD8cTLUZQ1nX0dp7oEatjC9q3jO6SW8it5oZLNmiPFj jn2QtzvellHHIC0vCtVvjN/gfd5y1N2CQBwwqNNhNrehI5nc/jP5THEBYoZGws9a9Bl9 YsDQvthBeYpWUQHWq1R1CY0U1UJwV5Op0xQui+wUl+CpT5Tl7sI0zIgwa2p7ffPCA9T0 AxrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=VWU0ylJDr+29uUzAcujtRyKx7Kjb8w7X0k3narASjMo=; b=DBMlv4o3YNa/f/bjo2ET/mlpKN3VTgS+oI9Rr7dUcGR9GJS+ywkDLDBVubIQasK9NV mu3OZoIscf90s3P/QSsepb2ZzM8vf7kmaG8XYtv6zz9HiwabtusltHEobjHWHVaci5uo I9HDJGTNM4M/zXTHgmGO/pGRuPtM+MbjsWxqtBBCb/RjSToCm/xPCBs5u7RMFrPAIwfw rOOIyiCuWUtZJuxKZYzoxOAGYiY7jUW0ef9Vk0cuszyfC1QK1I5lnwq9tU753mnCawvf EXylcIh6U7vMx5fVWNa7xdrOV/mkws3nsN/wSw8HAov5YQawHdeyjyP9/CG9NukW2nZt zX8g== X-Gm-Message-State: APjAAAVpQbcpjoW817/6t9gU34uvCU5tX9fQ5MJRlEh+8loZpq7I5wuh LOFWWllRvZkAAAOXKYC5p0Pucg== X-Received: by 2002:a17:902:9b90:: with SMTP id y16mr7523314plp.17.1566605607633; Fri, 23 Aug 2019 17:13:27 -0700 (PDT) Received: from ?IPv6:2600:1012:b064:e620:ac21:e025:1693:952e? ([2600:1012:b064:e620:ac21:e025:1693:952e]) by smtp.gmail.com with ESMTPSA id a10sm4952222pfl.159.2019.08.23.17.13.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Aug 2019 17:13:27 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] uprobes/x86: fix detection of 32-bit user mode From: Andy Lutomirski X-Mailer: iPhone Mail (16G77) In-Reply-To: Date: Fri, 23 Aug 2019 17:13:25 -0700 Cc: Sebastian Mayr , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, LKML , Masami Hiramatsu , Andy Lutomirski , Peter Zijlstra , Dmitry Safonov , Oleg Nesterov , Srikar Dronamraju Content-Transfer-Encoding: quoted-printable Message-Id: References: <20190728152617.7308-1-me@sam.st> <32D5D6B1-B29E-426E-90B6-48565A3B8F3B@amacapital.net> To: Thomas Gleixner Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Aug 23, 2019, at 5:03 PM, Thomas Gleixner wrote: >=20 >> On Sat, 24 Aug 2019, Thomas Gleixner wrote: >> On Fri, 23 Aug 2019, Andy Lutomirski wrote: >>>> On Aug 23, 2019, at 4:44 PM, Thomas Gleixner wrote= : >>>>=20 >>>>>> On Sat, 24 Aug 2019, Thomas Gleixner wrote: >>>>>> On Sun, 28 Jul 2019, Sebastian Mayr wrote: >>>>>>=20 >>>>>> -static inline int sizeof_long(void) >>>>>> +static inline int sizeof_long(struct pt_regs *regs) >>>>>> { >>>>>> - return in_ia32_syscall() ? 4 : 8; >>>>>=20 >>>>> This wants a comment. >>>>>=20 >>>>>> + return user_64bit_mode(regs) ? 8 : 4; >>>>=20 >>>> The more simpler one liner is to check >>>>=20 >>>> test_thread_flag(TIF_IA32) >>>=20 >>> I still want to finish killing TIF_IA32 some day. Let=E2=80=99s please n= ot add new users. >>=20 >> Well, yes and no. This needs to be backported .... >=20 > And TBH the magic in user_64bit_mode() is not pretty either. >=20 >=20 It=E2=80=99s only magic on Xen. I should probably stick a cpu_feature_enable= d(X86_FEATURE_XENPV) in there instead.=