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=-7.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 F3A9BC28CC5 for ; Sat, 8 Jun 2019 03:49:18 +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 C070F20833 for ; Sat, 8 Jun 2019 03:49:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="l1CU+LQ7"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="H67pCnfy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C070F20833 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YoaU08BNsussJ/Ja+toPyw1BU3sqsHgpqe+08FDRDmc=; b=l1CU+LQ7YJgiLH YdvYADMYR59NQRV0K3TUyXe2NPu2XzsIJulqprqgnZq2+ZkvxKVnDs91eJQuKyqx/H6vfEN+Sct1d 4iM4XNtlxheg/zzhAIRsrKnG9OBksy0QgCBY8EWiT5hH3wBVcKyKV8iCxRiBuTskDbJy1IKVkYuwr d1JgCWtqMq1ldkPEDg7FVb8slE8mua0buRWDFn3bXEQdt8/UueTl+siswlbDakvsEOc94GoZ8hmsN olO9SidmO1g3spPfN8j1LoApzlmxhIEeMWkJUnjxl36vBhcj5CeKH7GnBFw1DWF68Bcc5zUAvYFyP VcaMRkKyKd1C1kq02hkQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hZSLv-0007BC-EN; Sat, 08 Jun 2019 03:49:11 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hZSLr-00079t-A0 for linux-arm-kernel@lists.infradead.org; Sat, 08 Jun 2019 03:49:08 +0000 Received: by mail-pf1-x441.google.com with SMTP id x15so2247385pfq.0 for ; Fri, 07 Jun 2019 20:49:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5iFtOAxSpyEwrNGKsnJSAuPHnmB6sZsxY7o3VcURDbs=; b=H67pCnfy+inYwtx7CHiN5h4f1U/pgcnleLkOrUnW4+QdjbqfAr9cQdSkm3W08ImQFl MKpSL+Xxt/SE/t0ZUnbh42ewav3Rgd/mWolnnSDbYBR+Ld/cLmR9BtGJ7sEbWVa+oHPR 1hTMHtgCUOMHLDYeeHgvIO8Lm0UyCIchcEask= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=5iFtOAxSpyEwrNGKsnJSAuPHnmB6sZsxY7o3VcURDbs=; b=rjJziGr+AmS3/oQrg6BP7RvFAUZ2InA7A5JgoLRLEFAyPOzX8lV22BA5EGC1hXTlnF ySWF6ku5Ym7BfrXyEOPwb2yipNlOw3wCdCNo98cpYjND4QgaU1TRLbSMdd7803iAdEfP jNZcNQr7P5GBEgHYea76c0mIBrB7xHgf4gZ8duP6CX+ArEFRfHIgXJ8HSDooJCuf6Fo1 f3ljr+c6UjJInejcR1NybpJRKOQ8gUYC+RNppCVD+mmVBg/nReFx5PoUOfrglRlnZPui OBdZsc5a8BSBvTQEL1pneCHBY/H8F13C1fgnw70DFzAbVe77FJVK87bHhCcNvplQ6xRr gqKg== X-Gm-Message-State: APjAAAXr8CmHqRiKEyWt9IY5h/3UZq+uF4/VyZSciGz3pfHNj+jiyPuP TwYvnsqfgT38dF6Vc8AdsmQ8dw== X-Google-Smtp-Source: APXvYqyjpXWbpUp/M/TNwB1KLrsvdqCimHBytjvPEw0jUB6ar1HA2nI5YlI2gocy+KHTqRtIofNEIA== X-Received: by 2002:a63:5247:: with SMTP id s7mr5637363pgl.29.1559965746908; Fri, 07 Jun 2019 20:49:06 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id y12sm3218417pgi.10.2019.06.07.20.49.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Jun 2019 20:49:06 -0700 (PDT) Date: Fri, 7 Jun 2019 20:49:05 -0700 From: Kees Cook To: Andrey Konovalov Subject: Re: [PATCH v16 04/16] mm: untag user pointers in do_pages_move Message-ID: <201906072049.C71D545@keescook> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190607_204907_354471_5462E0BE X-CRM114-Status: GOOD ( 18.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , kvm@vger.kernel.org, Szabolcs Nagy , Catalin Marinas , Will Deacon , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, Khalid Aziz , linux-kselftest@vger.kernel.org, Felix Kuehling , Vincenzo Frascino , Jacob Bramley , Leon Romanovsky , linux-rdma@vger.kernel.org, amd-gfx@lists.freedesktop.org, Christoph Hellwig , Jason Gunthorpe , Dmitry Vyukov , Dave Martin , Evgeniy Stepanov , linux-media@vger.kernel.org, Kevin Brodsky , Ruben Ayrapetyan , Ramana Radhakrishnan , Alex Williamson , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, Kostya Serebryany , Greg Kroah-Hartman , Yishai Hadas , linux-kernel@vger.kernel.org, Jens Wiklander , Lee Smith , Alexander Deucher , Andrew Morton , enh , 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 Mon, Jun 03, 2019 at 06:55:06PM +0200, Andrey Konovalov wrote: > This patch is a part of a series that extends arm64 kernel ABI to allow to > pass tagged user pointers (with the top byte set to something else other > than 0x00) as syscall arguments. > > do_pages_move() is used in the implementation of the move_pages syscall. > > Untag user pointers in this function. > > Reviewed-by: Catalin Marinas > Signed-off-by: Andrey Konovalov Reviewed-by: Kees Cook -Kees > --- > mm/migrate.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/migrate.c b/mm/migrate.c > index f2ecc2855a12..3930bb6fa656 100644 > --- a/mm/migrate.c > +++ b/mm/migrate.c > @@ -1617,6 +1617,7 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes, > if (get_user(node, nodes + i)) > goto out_flush; > addr = (unsigned long)p; > + addr = untagged_addr(addr); > > err = -ENODEV; > if (node < 0 || node >= MAX_NUMNODES) > -- > 2.22.0.rc1.311.g5d7573a151-goog > -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel