From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail6.bemta7.messagelabs.com (mail6.bemta7.messagelabs.com [216.82.255.55]) by kanga.kvack.org (Postfix) with ESMTP id 7CBCC6B0169 for ; Tue, 16 Aug 2011 15:46:45 -0400 (EDT) Received: from hpaq2.eem.corp.google.com (hpaq2.eem.corp.google.com [172.25.149.2]) by smtp-out.google.com with ESMTP id p7GJkgGx032462 for ; Tue, 16 Aug 2011 12:46:42 -0700 Received: from qwc9 (qwc9.prod.google.com [10.241.193.137]) by hpaq2.eem.corp.google.com with ESMTP id p7GJkbb3013624 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Tue, 16 Aug 2011 12:46:41 -0700 Received: by qwc9 with SMTP id 9so209489qwc.41 for ; Tue, 16 Aug 2011 12:46:37 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20110816194050.GB4484@csn.ul.ie> References: <1313441856-1419-1-git-send-email-wad@chromium.org> <20110816093303.GA4484@csn.ul.ie> <20110816194050.GB4484@csn.ul.ie> From: Roland McGrath Date: Tue, 16 Aug 2011 12:46:17 -0700 Message-ID: Subject: Re: [PATCH] mmap: add sysctl for controlling ~VM_MAYEXEC taint Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-linux-mm@kvack.org List-ID: To: Mel Gorman Cc: Will Drewry , linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton , Peter Zijlstra , Al Viro , Eric Paris , Andrea Arcangeli , Rik van Riel , Nitin Gupta , Hugh Dickins , Shaohua Li , linux-mm@kvack.org On Tue, Aug 16, 2011 at 12:40 PM, Mel Gorman wrote: > They might result in the same system call but one of them creates > the file under /dev/shm which should not have the same permissions > problem. The library really appears to want to create a shared > executable object, using shm_open does not appear that unreasonable > to me. People do use shm_open. Some systems mount /dev/shm with noexec. That's why we're here in the first place. > Which then needs to be copied in each distro wanting to do the same > thing and is not backwards compatible where as using shm_open is. Each distro wanting to set noexec on its /dev/shm mounts has to set the sysctl (or its default in their kernel builds), yes. Otherwise they are not compatible with the expectation of using PROT_EXEC on files opened with shm_open. Thanks, Roland -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org