Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755586Ab1FFQmv (ORCPT ); Mon, 6 Jun 2011 12:42:51 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:48926 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751544Ab1FFQmt (ORCPT ); Mon, 6 Jun 2011 12:42:49 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=lr0b+WcB/T9VV/kKFpMSG+P8tcDHtUpEUyLgIoSlzXbahu8NMWYZglGqC8EzfNEdpz kpNbGPPyVOvx83M1n+dl6CZwowyLm/kWTvqnp7X/PYQSTibcTkpiOnYkzFKHxD1K14rI YuJJbqgHRIi3xvWgwO/AsQujfVgVrX0eMKtW4= Subject: Re: Change in functionality of futex() system call. From: Eric Dumazet To: Peter Zijlstra Cc: David Oliver , linux-kernel@vger.kernel.org, Shawn Bohrer , Zachary Vonler , KOSAKI Motohiro , Hugh Dickins , Thomas Gleixner , Darren Hart , Ingo Molnar In-Reply-To: <1307377782.2322.183.camel@twins> References: <1307373819.3098.40.camel@edumazet-laptop> <1307376672.2322.167.camel@twins> <1307376989.2322.171.camel@twins> <1307377349.3098.65.camel@edumazet-laptop> <1307377782.2322.183.camel@twins> Content-Type: text/plain; charset="UTF-8" Date: Mon, 06 Jun 2011 18:42:44 +0200 Message-ID: <1307378564.3098.67.camel@edumazet-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1352 Lines: 36 Le lundi 06 juin 2011 à 18:29 +0200, Peter Zijlstra a écrit : > On Mon, 2011-06-06 at 18:22 +0200, Eric Dumazet wrote: > > Le lundi 06 juin 2011 à 18:16 +0200, Peter Zijlstra a écrit : > > > > > Hmm, wouldn't that still be susceptible to the zero-page thing if: we > > > create a writable private file map of a sparse file, touch a page and > > > then remap the thing RO? > > > > > > > > > > > > > Also I am not sure how MAP_PRIVATE could be affected. If we still try a > > RW gup()... It will allocate a page for us, instead of still pointing to > > shared one. > > > > On previous kernel, the application using read-only mapping could use > > MAP_PRIVATE or MAP_SHARED with same 'behavior' > > But by not forcing the COW you get different behaviour depending on when > you call FUTEX_WAIT, surely that's not correct either? As long as the current process never writes to the page holding the futex, the page stay shared. Behavior should be same with PRIVATE or SHARED ? In David Oliver case, this is needed : He wants to catch a change in a file/memory region written by another process. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/