Received: by 10.192.165.148 with SMTP id m20csp1480643imm; Thu, 10 May 2018 11:20:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoH9bXQ3UapWGhdptyiljmrJq4S539+XaI6111dY1dPRa0orlr3/3jeKni0aEt3np+fMMbd X-Received: by 2002:a17:902:8606:: with SMTP id f6-v6mr2326955plo.258.1525976439250; Thu, 10 May 2018 11:20:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525976439; cv=none; d=google.com; s=arc-20160816; b=g3zVSuTD4SXyOfQixI2T1eYoFFK1cYYvglDJLFsgjtvmeE/wxkGDOp4/uTHL+bs2HF CtRjhAxz5e8ROJUBvbEwmgXhSio2J8Y87ymXZjHTvosg2rSie6S8rQAMmzPNPabdWgEU eJb0eY8DhS6eaJTkVIonpE97Qpt2XK/I6trsPKnPku6SX5JMRKfP54bkk+E6ECTGpcFW nJfkRfAyRNxPQtT99+zMXGhZVO9xwigi51t0ttXKo9jvsQnHeDbQLgHnDElbKQr9PNt6 yc6wMMKN0Ox4eL15nBS6qc3Cbc5PTTGEnB57teBvnzfHTWy5ibmEotQ1OUAa3M570yvD ztqw== 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:from:references:cc:to:subject:arc-authentication-results; bh=d9UPb+/mCxuSzK/1JIRgyXZn5tD+Q8sqqiQEthLju48=; b=ZFiJvF23FxppiZY6LuvDIGyNtT+2LLZJKJQU7tiZ0gg8oRBSXYdAeWgMQrc0gxK69w d1mXS+sfz/mgvyYnjisJX/0Xgt11y0mrnvZ+H3SUGhJNlhFbrV0AHdwd3107qETSt837 pH0UwthB6clyXtMa7dEO1Xr1jzsIOdeF69IZQ4bKZp5O9gSy2hZESdyHPIKGk5FSmWTe Aq343DcTHhuMjlqMseL8TPhvApG45mZweAUvOqmCn3RCL293qiJ7yKLh0MUNYgbw7cCr PUIOFG9mdmFY+qmeE3MU05+6GwovA6bBwfL3DwIZVjjRdMbYPs8DIinXHnJzQLFOLiQc NUaQ== 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 h21-v6si1053769pgv.580.2018.05.10.11.20.23; Thu, 10 May 2018 11:20:39 -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 S966012AbeEJSUB (ORCPT + 99 others); Thu, 10 May 2018 14:20:01 -0400 Received: from mx2.suse.de ([195.135.220.15]:40807 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757182AbeEJSUA (ORCPT ); Thu, 10 May 2018 14:20:00 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 27752AF80; Thu, 10 May 2018 18:19:59 +0000 (UTC) Subject: Re: [PATCH -next 0/2] ipc/shm: shmat() fixes around nil-page To: Davidlohr Bueso , akpm@linux-foundation.org, aarcange@redhat.com Cc: joe.lawrence@redhat.com, gareth.evans@contextis.co.uk, linux-kernel@vger.kernel.org, linux-mm@kvack.org, stable@kernel.org, ltp@lists.linux.it References: <20180503203243.15045-1-dave@stgolabs.net> From: Vlastimil Babka Message-ID: <8addf0c1-26cd-add9-fb9c-292cc3567014@suse.cz> Date: Thu, 10 May 2018 20:17:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180503203243.15045-1-dave@stgolabs.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/03/2018 10:32 PM, Davidlohr Bueso wrote: > Hi, > > These patches fix two issues reported[1] a while back by Joe and Andrea > around how shmat(2) behaves with nil-page. > > The first reverts a commit that it was incorrectly thought that mapping > nil-page (address=0) was a no no with MAP_FIXED. This is not the case, > with the exception of SHM_REMAP; which is address in the second patch. Can you add appropriate Fixes: tags if possible? I guess patch 1 is clear, dunno about patch 2... > I chose two patches because it is easier to backport and it explicitly > reverts bogus behaviour. Both patches ought to be in -stable and ltp > testcases need updated (the added testcase around the cve can be modified > to just test for SHM_RND|SHM_REMAP). CC'd ltp so they know :) Thanks, Vlastimil > > [1] lkml.kernel.org/r/20180430172152.nfa564pvgpk3ut7p@linux-n805 > > Thanks! > > Davidlohr Bueso (2): > Revert "ipc/shm: Fix shmat mmap nil-page protection" > ipc/shm: fix shmat() nil address after round-down when remapping > > ipc/shm.c | 19 +++++++++++-------- > 1 file changed, 11 insertions(+), 8 deletions(-) >