From patchwork Tue Aug 24 22:03:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Luck X-Patchwork-Id: 127661 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7OM3XTg006629 for ; Tue, 24 Aug 2010 22:03:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932252Ab0HXWDG (ORCPT ); Tue, 24 Aug 2010 18:03:06 -0400 Received: from mga01.intel.com ([192.55.52.88]:9618 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932244Ab0HXWDD (ORCPT ); Tue, 24 Aug 2010 18:03:03 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 24 Aug 2010 15:03:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.56,264,1280732400"; d="scan'208";a="831342725" Received: from agluck-desktop.sc.intel.com ([10.3.52.238]) by fmsmga001.fm.intel.com with SMTP; 24 Aug 2010 15:03:02 -0700 From: "Luck, Tony" To: "Linus Torvalds" Cc: linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, linux-ia64@vger.kernel.org Subject: [PATCH] hide guard page for stacks that grow upwards Date: Tue, 24 Aug 2010 15:03:02 -0700 Message-Id: <4c74419664798b8c9@agluck-desktop.sc.intel.com> Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 24 Aug 2010 22:03:36 +0000 (UTC) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 439fc1f..ef262f6 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -210,7 +210,7 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma) int flags = vma->vm_flags; unsigned long ino = 0; unsigned long long pgoff = 0; - unsigned long start; + unsigned long start, end; dev_t dev = 0; int len; @@ -223,12 +223,15 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma) /* We don't show the stack guard page in /proc/maps */ start = vma->vm_start; + end = vma->vm_end; if (vma->vm_flags & VM_GROWSDOWN) start += PAGE_SIZE; + if (vma->vm_flags & VM_GROWSUP) + end -= PAGE_SIZE; seq_printf(m, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu %n", start, - vma->vm_end, + end, flags & VM_READ ? 'r' : '-', flags & VM_WRITE ? 'w' : '-', flags & VM_EXEC ? 'x' : '-',