From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2D4BC04AB6 for ; Fri, 31 May 2019 16:24:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 793D326BFD for ; Fri, 31 May 2019 16:24:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZeZopxWA"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="WkbNgEwA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 793D326BFD Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WcwS5R2xIltyXoLngOVMZooBHG8hxda4TtVuOgpRRPM=; b=ZeZopxWAF2nro3 ZnpaE5N/z9m2h1G6fOXiOcuaeuUHAjFx3WxInbIeZeBIfkhfeC27nfQ0y0SCpmIPPQTTRSCX1Q5in J0MCQsE6fOR9Xg06iDkYtDifnfKflTOe1ATPAs5/Zus7DI+y+oyq9Ca2YGAC627EdmYDylaKdsXM3 BJTSkfqQ+aFzAoRXhCHintq3pYURAXdA9IhRaO57f5W+a/FnRsj2aVwOQGoSIkkx8gft9uyMtiwr1 0CMbo1XsddymH4GeDZSFZpymjcftl50tU1yjNgAbX+EwHKIeSwf9avO3ANnPd0VFvD5VJm4nMQSmH A7PulSzQ25lPxzz8xnhA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hWkKN-0000Am-2H; Fri, 31 May 2019 16:24:23 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hWkKK-0000AJ-AY for linux-arm-kernel@lists.infradead.org; Fri, 31 May 2019 16:24:21 +0000 Received: by mail-pg1-x542.google.com with SMTP id h2so1077126pgg.1 for ; Fri, 31 May 2019 09:24:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=h/x2RsdaGEeomdfj9zckwm1ZuXHc7ti1LUsxVKWauDI=; b=WkbNgEwAtHoOpsgf2n/OOj9tvUzmqxkk0wFQPqMbZDhKXrycKmph8DKGky42GC+koN LJDEln958wkwnmRH28ZEap3NrGgf1V1D0g9IZCcP3z1+J4jMqALHLTOUy5KwiFNCWFFp J5Vof1T/5pKxOH0N8kkgt3VneNxkghx7TLiVO3NO5Dfw0XE9zLDEnv4oejnEpiTXZOeJ tDxDbRBsv0ZCYRogl5V2uwQD8iTi3aUBJXQrVEho7perE1vFrdRi0BvQ0ve9Pq7qowuL FRZuY21tQBRvNHvnsPyF6is+8mWCTar820ssvKvNtiwoTjNWK3ZyaVAaR6TMz/HMowZi esrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=h/x2RsdaGEeomdfj9zckwm1ZuXHc7ti1LUsxVKWauDI=; b=ULFPDg2y2JpZ750MHq7WXeIIFFTOW71mhagjkQX0DLxk9oZ8IfjtLeNAGFnXXW4xcW u76ETePmlgj05gHQ8uwY3FSsjBfJ2d+Sa/+sM8kXA3oETwN9OvgwYaJs8e+H/9907679 EcPmupyAnZhPE/6W9iN+haCVGxoD2FxhN8AT4WdXrA/aqD94jxHkWgp1nQOdE2VpUulJ +HtVHmyDYNamAXMq4RGKKiHlZ8wtOJXhekHOBGqJyiZXtwUcbOMJcPhCuJ8tsobr70M1 8BGKYHBTKjtkVVeyo6UXla+jNlhILCrbdZZL8shh5524kd4NJOttDSccrxL6gDeNFgSJ /icQ== X-Gm-Message-State: APjAAAXne17HB1lArscV2RmbEyYSZhYVkZopLV1aI9CAuMHpo6k7eB36 yvR7os3lYZowZgKqyuvRgBy6Gvz/mUoGPZiCNueEQw== X-Google-Smtp-Source: APXvYqxuY1CYuxd04Kewq/lINHwhx4xTvJLFZIhJ6+qsHKD7HtPQ0W1vOSTfUsi9VyOoypjJcb2qINRGGNrlijbQeNg= X-Received: by 2002:a62:2c17:: with SMTP id s23mr11223321pfs.51.1559319859023; Fri, 31 May 2019 09:24:19 -0700 (PDT) MIME-Version: 1.0 References: <20190521182932.sm4vxweuwo5ermyd@mbp> <201905211633.6C0BF0C2@keescook> <6049844a-65f5-f513-5b58-7141588fef2b@oracle.com> <20190523201105.oifkksus4rzcwqt4@mbp> <20190524101139.36yre4af22bkvatx@mbp> <20190530171540.GD35418@arrakis.emea.arm.com> <20190531161954.GA3568@arrakis.emea.arm.com> In-Reply-To: <20190531161954.GA3568@arrakis.emea.arm.com> From: Andrey Konovalov Date: Fri, 31 May 2019 18:24:06 +0200 Message-ID: Subject: Re: [PATCH v15 00/17] arm64: untag user pointers passed to the kernel To: Catalin Marinas X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190531_092420_439681_7CF70C9F X-CRM114-Status: GOOD ( 23.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , kvm@vger.kernel.org, Szabolcs Nagy , Will Deacon , dri-devel@lists.freedesktop.org, Linux Memory Management List , Khalid Aziz , "open list:KERNEL SELFTEST FRAMEWORK" , Vincenzo Frascino , Jacob Bramley , Leon Romanovsky , linux-rdma@vger.kernel.org, amd-gfx@lists.freedesktop.org, Dmitry Vyukov , Dave Martin , Evgenii Stepanov , linux-media@vger.kernel.org, Kevin Brodsky , Kees Cook , Ruben Ayrapetyan , Ramana Radhakrishnan , Alex Williamson , Yishai Hadas , Mauro Carvalho Chehab , Linux ARM , Kostya Serebryany , Greg Kroah-Hartman , Felix Kuehling , LKML , Jens Wiklander , Lee Smith , Alexander Deucher , Andrew Morton , Elliott Hughes , Robin Murphy , Christian Koenig , Luc Van Oostenryck Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, May 31, 2019 at 6:20 PM Catalin Marinas wrote: > > On Fri, May 31, 2019 at 04:29:10PM +0200, Andrey Konovalov wrote: > > On Thu, May 30, 2019 at 7:15 PM Catalin Marinas wrote: > > > On Tue, May 28, 2019 at 04:14:45PM +0200, Andrey Konovalov wrote: > > > > Thanks for a lot of valuable input! I've read through all the replies > > > > and got somewhat lost. What are the changes I need to do to this > > > > series? > > > > > > > > 1. Should I move untagging for memory syscalls back to the generic > > > > code so other arches would make use of it as well, or should I keep > > > > the arm64 specific memory syscalls wrappers and address the comments > > > > on that patch? > > > > > > Keep them generic again but make sure we get agreement with Khalid on > > > the actual ABI implications for sparc. > > > > OK, will do. I find it hard to understand what the ABI implications > > are. I'll post the next version without untagging in brk, mmap, > > munmap, mremap (for new_address), mmap_pgoff, remap_file_pages, shmat > > and shmdt. > > It's more about not relaxing the ABI to accept non-zero top-byte unless > we have a use-case for it. For mmap() etc., I don't think that's needed > but if you think otherwise, please raise it. > > > > > 2. Should I make untagging opt-in and controlled by a command line argument? > > > > > > Opt-in, yes, but per task rather than kernel command line option. > > > prctl() is a possibility of opting in. > > > > OK. Should I store a flag somewhere in task_struct? Should it be > > inheritable on clone? > > A TIF flag would do but I'd say leave it out for now (default opted in) > until we figure out the best way to do this (can be a patch on top of > this series). You mean leave the whole opt-in/prctl part out? So the only change would be to move untagging for memory syscalls into generic code? > > Thanks. > > -- > Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel