Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751218AbWIWK33 (ORCPT ); Sat, 23 Sep 2006 06:29:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751223AbWIWK33 (ORCPT ); Sat, 23 Sep 2006 06:29:29 -0400 Received: from mail.aknet.ru ([82.179.72.26]:37897 "EHLO mail.aknet.ru") by vger.kernel.org with ESMTP id S1751218AbWIWK32 (ORCPT ); Sat, 23 Sep 2006 06:29:28 -0400 Message-ID: <45150CD7.4010708@aknet.ru> Date: Sat, 23 Sep 2006 14:30:47 +0400 From: Stas Sergeev User-Agent: Thunderbird 1.5.0.7 (X11/20060913) MIME-Version: 1.0 To: Andrew Morton Cc: Linux kernel Subject: [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps Content-Type: multipart/mixed; boundary="------------020409000404040800080705" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2859 Lines: 59 This is a multi-part message in MIME format. --------------020409000404040800080705 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Andrew. I am not sure at all whether this patch is appreciated or not. The on-list query yielded no results, but I have to try. :) This patch removes the MNT_NOEXEC check for the PROT_EXEC mappings. That allows to mount tmpfs with "noexec" option without breaking the existing apps, which is what debian wants to do for sequrity reasons: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=386945 More details here: http://uwsg.ucs.indiana.edu/hypermail/linux/kernel/0609.2/1537.html Signed-off-by: Stas Sergeev --------------020409000404040800080705 Content-Type: text/plain; name="mapx.diff" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="mapx.diff" LS0tIGEvbW0vbW1hcC5jCTIwMDYtMDEtMjUgMTU6MDI6MjQuMDAwMDAwMDAwICswMzAwCisr KyBiL21tL21tYXAuYwkyMDA2LTA5LTIxIDEzOjE5OjE1LjAwMDAwMDAwMCArMDQwMApAQCAt ODk5LDEwICs4OTksNiBAQAogCiAJCWlmIC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hFQykgewotCQkJaWYgKHByb3QgJiBQUk9UX0VYRUMp Ci0JCQkJcmV0dXJuIC1FUEVSTTsKLQkJfQotCQllbHNlIGlmICgocHJvdCAmIFBST1RfUkVB RCkgJiYgIShwcm90ICYgUFJPVF9FWEVDKSkgeworCQlpZiAoKHByb3QgJiBQUk9UX1JFQUQp ICYmICEocHJvdCAmIFBST1RfRVhFQykpIHsKIAkJCS8qIGhhbmRsZSBpbXBsaWNhdGlvbiBv ZiBQUk9UX0VYRUMgYnkgUFJPVF9SRUFEICovCiAJCQlpZiAoY3VycmVudC0+cGVyc29uYWxp dHkgJiBSRUFEX0lNUExJRVNfRVhFQykgewogCQkJCWlmIChjYXBhYmlsaXRpZXMgJiBCRElf Q0FQX0VYRUNfTUFQKQo= --------------020409000404040800080705-- - 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/