Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2069421ybm; Thu, 23 May 2019 10:54:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqFPDSyu8z/3cwhLptS/Gu0323yRVxvSMFp4M1R51q+iL1SHKzuc5hGWUHPikrlFaUD6Xx X-Received: by 2002:a17:90a:1916:: with SMTP id 22mr3048796pjg.118.1558634044709; Thu, 23 May 2019 10:54:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558634044; cv=none; d=google.com; s=arc-20160816; b=pIul792IVyFJTB6kiIJCcieFn4yKgLsdGwoQa8qVHq5SiegEfmiVZj1vo1Z+9l4rSJ djJ7ttaLEfIhh0xuTLbwS/FBrIv4lNoq09E0kJRdFWa8O97IPePMV8Y1AAbIiuWKBq/m uVSyQAG6fYzJyBI/TChskXXk+pv1hElYVfd7Uz+LdxKHzVIuEWNU7AqZzKneHNnYM2kx v2O/bjJH2tw3U6qa4NJ2P27YXPXnd4sG2k+reozw5+ByEmvR143Ssz2hTS3TPA2AKoCo TjM63TIYMkImzmMNNgNUI9wksO6WcAJdZJaOVgK5YBA5Hy6KfZOmjmGNpmXVbXUgHHFo yGjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :dkim-signature; bh=2Qeh79aDTooqgUiqrhLo6Vy7tycJTudTXGs6zz5dfRs=; b=OjLiXZAReqIH/19QRE2SizJQXdp+b9bBZBJ4M8LhgsmwrVQ6QfaZ8kIJhxPtpYrDna yqH830X1rtqHss/LnH8nhRMiwdBEkSSCG/b4TL0atXpqA1rpbZFwnmiU/bIbMUZETcYE 6jr4eIlJXm6lQH58NGt3qd9X2JTySIgUNiIDmlIrbxZXDN+lk+gmV5brF2h+tGfavF6E PiVja+dwbu90NJGZK9+c2EmuuEXIqdpMHS/A6WOBmSpcLAzNy54fT8tIVEiegnI05WjC yOR5CeUFkE0ZWpECpzgaryfQgVfSjiqti8PJgoTXd8i76GOy4n5p8rw1E7RJemU/eEQN d/0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=vDS9uTH4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be11si166094plb.303.2019.05.23.10.53.48; Thu, 23 May 2019 10:54:04 -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=@oracle.com header.s=corp-2018-07-02 header.b=vDS9uTH4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731439AbfEWRwb (ORCPT + 99 others); Thu, 23 May 2019 13:52:31 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:49208 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730928AbfEWRwb (ORCPT ); Thu, 23 May 2019 13:52:31 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x4NHcV4s194594; Thu, 23 May 2019 17:51:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=2Qeh79aDTooqgUiqrhLo6Vy7tycJTudTXGs6zz5dfRs=; b=vDS9uTH4+Zc8nPFLnuUvRu142pBiqAxGE5BbMuCn+MA1cOmcParAIWPYB10Gy4C7hxOT CRf7KLq6LlEZK+PTvChfiuPo3LEMa9ckzl+/kAdOakkMJYpGPlnCYhLx+3+n6Ntz8J6i 3fNosLO+WWxHrhBnbE6IQD52DA+Q7+ZHzBvkxtJ6IhCd+FH3wqHlFGg3maBxYupT10pT epJuSNSnm8akAZ06VD98fPXl3vSfL7K8WT0tE28XcUzOExtBXHl5878ViO1cXVVBk4Tq 4+ZzcfJ8p6oqlalneN0hlMs1txpq4s5U0HxUj4eJGEhRr1s4PIHpmSUBA5IcjIQCgxcH gg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 2smsk5c473-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 May 2019 17:51:53 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x4NHpCpe145061; Thu, 23 May 2019 17:51:52 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 2smshfd4y8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 May 2019 17:51:52 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x4NHphUB003086; Thu, 23 May 2019 17:51:44 GMT Received: from [192.168.1.16] (/24.9.64.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 23 May 2019 17:51:43 +0000 Subject: Re: [PATCH v15 00/17] arm64: untag user pointers passed to the kernel To: Kees Cook , Catalin Marinas Cc: Evgenii Stepanov , Andrey Konovalov , Linux ARM , Linux Memory Management List , LKML , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, linux-media@vger.kernel.org, kvm@vger.kernel.org, "open list:KERNEL SELFTEST FRAMEWORK" , Vincenzo Frascino , Will Deacon , Mark Rutland , Andrew Morton , Greg Kroah-Hartman , Yishai Hadas , Felix Kuehling , Alexander Deucher , Christian Koenig , Mauro Carvalho Chehab , Jens Wiklander , Alex Williamson , Leon Romanovsky , Dmitry Vyukov , Kostya Serebryany , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Robin Murphy , Luc Van Oostenryck , Dave Martin , Kevin Brodsky , Szabolcs Nagy , Elliott Hughes References: <20190517144931.GA56186@arrakis.emea.arm.com> <20190521182932.sm4vxweuwo5ermyd@mbp> <201905211633.6C0BF0C2@keescook> From: Khalid Aziz Organization: Oracle Corp Message-ID: <6049844a-65f5-f513-5b58-7141588fef2b@oracle.com> Date: Thu, 23 May 2019 11:51:40 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <201905211633.6C0BF0C2@keescook> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9265 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905230119 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9265 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905230119 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/21/19 6:04 PM, Kees Cook wrote: > As an aside: I think Sparc ADI support in Linux actually side-stepped > this[1] (i.e. chose "solution 1"): "All addresses passed to kernel must= > be non-ADI tagged addresses." (And sadly, "Kernel does not enable ADI > for kernel code.") I think this was a mistake we should not repeat for > arm64 (we do seem to be at least in agreement about this, I think). >=20 > [1] https://lore.kernel.org/patchwork/patch/654481/ That is a very early version of the sparc ADI patch. Support for tagged addresses in syscalls was added in later versions and is in the patch that is in the kernel. That part "Kernel does not enable ADI for kernel code." is correct. It is a possible enhancement for future. -- Khalid