Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp434599yba; Fri, 3 May 2019 04:48:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFvR1CGXPSYIfhYKp70n8Y5zVSd5IOLoSyNoOojYPxV5uQxnnQk5Y2E6s8EqhsotkryW5Q X-Received: by 2002:a17:902:8483:: with SMTP id c3mr9356114plo.19.1556884117607; Fri, 03 May 2019 04:48:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556884117; cv=none; d=google.com; s=arc-20160816; b=QJ0eTaya4bfS+88L75OY8KMUaYnNON5s1OFwkPg7VoHWmqtMm39uiPxe7FLjoSruFc w7DJHRTEmp7YvjrrCjgDJt9U+8WyZkGORP1o6hdtoYfPEJJDeF7eXXVZGNfGlDLB8V3m qwWAkxM+UyXmbEkoMfShF647Dp6JYD5hxcScAS53Ki5zzwCWJHIiEhmEDzXRyaklJ8gD lHTGfFa4/9lHvb3c3iuSLNq+CebVgenQdgJOJrvHEiLhX1iSRVmr78YwiZz5ON82E7TQ jkTS/Ec7XfZ5gUGdAIoQU/dRJGkxRTCbGGxNmix2ppY5xLB0jbwDaLJmXXW6U3pNKqQw hv2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=eRxp71/SKBgc89Y1urfBQSsLvJX1JUxZouiEqDYdcAI=; b=o3teWEYWjeT00EinZMI94ZHOROnmyhKDLMFoGEkMDpVATTk/Rgxu2pU3T0O8oEeR3I pePPaRQ9zFn6wQ1j+btL5nz6FPBc7mGLnWJ+5Z1/oxp6xCJwUgql+awVGVrTsTCffF8v D7y9F0m87JI0a76rBZlLdw+FJnLN2zTt+d5WCTNox7bz6i7AcZCIaoCnGC7za87Hpid1 8d9fRPWqBks6rxT5KMeWz6Ur/bh2TsePLTd+bCH44MwFTBqnT6npNAT5GrKLeFfZQySF dN+CePF+3+3MBgpCEWsBJNtQ6JZdnYz7igBRFrluPcML8chaG0lsdBFVmiAyacZbLDIy ymVg== ARC-Authentication-Results: i=1; mx.google.com; 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 s9si2008834pfa.282.2019.05.03.04.48.22; Fri, 03 May 2019 04:48:37 -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; 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 S1727745AbfECLrT (ORCPT + 99 others); Fri, 3 May 2019 07:47:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:41892 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727425AbfECLrS (ORCPT ); Fri, 3 May 2019 07:47:18 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A8EBDAD69; Fri, 3 May 2019 11:47:17 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id C5707E0117; Fri, 3 May 2019 13:47:16 +0200 (CEST) Date: Fri, 3 May 2019 13:47:16 +0200 From: Michal Kubecek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Andrea Arcangeli , Jason Gunthorpe , Leon Romanovsky Subject: Re: [PATCH 5.0 25/89] RDMA/ucontext: Fix regression with disassociate Message-ID: <20190503114716.GA15275@unicorn.suse.cz> References: <20190430113609.741196396@linuxfoundation.org> <20190430113611.189238783@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190430113611.189238783@linuxfoundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 30, 2019 at 01:38:16PM +0200, Greg Kroah-Hartman wrote: > From: Jason Gunthorpe > > commit 67f269b37f9b4d52c5e7f97acea26c0852e9b8a1 upstream. > > When this code was consolidated the intention was that the VMA would > become backed by anonymous zero pages after the zap_vma_pte - however this > very subtly relied on setting the vm_ops = NULL and clearing the VM_SHARED > bits to transform the VMA into an anonymous VMA. Since the vm_ops was > removed this broke. > > Now userspace gets a SIGBUS if it touches the vma after disassociation. > > Instead of converting the VMA to anonymous provide a fault handler that > puts a zero'd page into the VMA when user-space touches it after > disassociation. > > Cc: stable@vger.kernel.org > Suggested-by: Andrea Arcangeli > Fixes: 5f9794dc94f5 ("RDMA/ucontext: Add a core API for mmaping driver IO memory") > Signed-off-by: Jason Gunthorpe > Signed-off-by: Leon Romanovsky > Signed-off-by: Jason Gunthorpe > Signed-off-by: Greg Kroah-Hartman > > --- This commit breaks build on s390 and mips, please pick also commit 6a5c5d26c4c6 ("rdma: fix build errors on s390 and MIPS due to bad ZERO_PAGE use"). Michal Kubecek