Received: by 10.192.165.148 with SMTP id m20csp8714imm; Thu, 3 May 2018 13:49:16 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr9GR2f9U2sFhK7mpOALgNTBQYQWUiCcbSHl85EikunkKhIn0QiYlPSYOLpMUhfTI8P5EQW X-Received: by 10.98.10.137 with SMTP id 9mr12438100pfk.112.1525380556137; Thu, 03 May 2018 13:49:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525380556; cv=none; d=google.com; s=arc-20160816; b=ROLq9meJm7v3VgM3HBsXDTnaot4rOVy3MqjS6Ql5J/dUUzoWUBq7G5jsUDWTcfHLpt vcXU6DmaYzXeUyKjoSrDPiO3vNwfqSRKOQaSfBwZBhnZ+weK6k78cspF5gtLg1PkQJYS 7GjdmOjhL4DDmh40uIMnP+ZUfMn+nM5aiGWGpKDTf/NfrOONtoGx3GwtL9bN6czQ0u1r nf3BhArC165EmvalkrGhqZh9qrM8n285kq+BIloBvVjGAj7XJPBKDznvZeCdzMpK1kTh SWDHd0EyBYLVYZZjDi647aRmVplOf66cqMGjqJOqN4I1sF1JV8M+IhK0e3RLOwOedmUA VqBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=pSvaYQbjSSWVyPNK0J1aWcOmrG+W8uBm51A0oOI0p7c=; b=R+hjZklQOx7T1+qlJdirM8rNeVjvAlaNX9ILCz0YOe9G0CWZj2UXTZE0xLQ4DEvo2C 2mshKxFSFzoDSOW+J5JUc4k+zp1tmYqABk5D8i20JhPRCwWjre4FGhWQF9ztOWTQ1dVG 1I0q3r64lLWEQ09Qr5WgYwgPIBwO92W3IvLZN5MXTGO/xY6EqUTFyVfIQWx8OS6XvRaM ZP67J0UgCrAc+KcGsByQIggjrWKinclNFBbEe2SylVYm8pX5DzSPAPwnsJUv8A5mjhQF nMZOyS5PzTwM4JWILeqXt+VddbGpTNTFrNupXxu9YT8lfS4GQtnfa06whSw9FfHnEnOc +KWA== 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 q4-v6si13804677plr.407.2018.05.03.13.49.01; Thu, 03 May 2018 13:49:16 -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 S1751196AbeECUr3 (ORCPT + 99 others); Thu, 3 May 2018 16:47:29 -0400 Received: from smtp2.provo.novell.com ([137.65.250.81]:56086 "EHLO smtp2.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750962AbeECUr2 (ORCPT ); Thu, 3 May 2018 16:47:28 -0400 Received: from localhost.localdomain (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by smtp2.provo.novell.com with ESMTP (TLS encrypted); Thu, 03 May 2018 14:47:16 -0600 From: Davidlohr Bueso To: 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, dave@stgolabs.net, stable@kernel.org Subject: [PATCH -next 0/2] ipc/shm: shmat() fixes around nil-page Date: Thu, 3 May 2018 13:32:41 -0700 Message-Id: <20180503203243.15045-1-dave@stgolabs.net> X-Mailer: git-send-email 2.13.6 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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). [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(-) -- 2.13.6