Message ID | 1437891661-32007-1-git-send-email-noamc@ezchip.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-fsdevel-owner@kernel.org> X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4EC109F44C for <patchwork-linux-fsdevel@patchwork.kernel.org>; Sun, 26 Jul 2015 06:21:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 81DA9207A1 for <patchwork-linux-fsdevel@patchwork.kernel.org>; Sun, 26 Jul 2015 06:21:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C9B6207AA for <patchwork-linux-fsdevel@patchwork.kernel.org>; Sun, 26 Jul 2015 06:21:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932184AbbGZGVk (ORCPT <rfc822;patchwork-linux-fsdevel@patchwork.kernel.org>); Sun, 26 Jul 2015 02:21:40 -0400 Received: from mail-db3on0087.outbound.protection.outlook.com ([157.55.234.87]:50315 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751353AbbGZGVi (ORCPT <rfc822;linux-fsdevel@vger.kernel.org>); Sun, 26 Jul 2015 02:21:38 -0400 Received: from HE1PR02CA0050.eurprd02.prod.outlook.com (10.163.170.18) by HE1PR02MB1147.eurprd02.prod.outlook.com (10.163.173.141) with Microsoft SMTP Server (TLS) id 15.1.225.19; Sun, 26 Jul 2015 06:21:34 +0000 Received: from AM1FFO11OLC001.protection.gbl (2a01:111:f400:7e00::132) by HE1PR02CA0050.outlook.office365.com (2a01:111:e400:5350::18) with Microsoft SMTP Server (TLS) id 15.1.225.19 via Frontend Transport; Sun, 26 Jul 2015 06:21:34 +0000 Authentication-Results: spf=fail (sender IP is 212.179.42.66) smtp.mailfrom=ezchip.com; synopsys.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of ezchip.com does not designate 212.179.42.66 as permitted sender) receiver=protection.outlook.com; client-ip=212.179.42.66; helo=ezex10.ezchip.com; Received: from ezex10.ezchip.com (212.179.42.66) by AM1FFO11OLC001.mail.protection.outlook.com (10.174.65.76) with Microsoft SMTP Server (TLS) id 15.1.231.11 via Frontend Transport; Sun, 26 Jul 2015 06:21:33 +0000 Received: from localhost.localdomain (10.1.3.132) by ezex10.ezchip.com (10.1.1.4) with Microsoft SMTP Server (TLS) id 14.3.224.2; Sun, 26 Jul 2015 09:21:09 +0300 From: Noam Camus <noamc@ezchip.com> To: <linux-kernel@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>, <viro@zeniv.linux.org.uk> CC: <Alexey.Brodkin@synopsys.com>, <vgupta@synopsys.com>, <adilger@dilger.ca>, <giladb@ezchip.com>, Noam Camus <noamc@ezchip.com> Subject: [PATCH] fs: heap/bss calculation ignore section above STACK_TOP. Date: Sun, 26 Jul 2015 09:21:01 +0300 Message-ID: <1437891661-32007-1-git-send-email-noamc@ezchip.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.000.1202-21704.005 X-TM-AS-Result: No--7.045100-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11OLC001; 1:qTNm0csmtCgpKwsTpr9zygvs4RmthQtvF+iWAHQN4YqKkNyCotf8r9943RlJ6ZcjNhPLtLpieJaYR/4GSMbuBGf8OYHb1S8B6fwsXjhxnK0FN2NOGDI/qSn3ScuASr+1KGmnbjC/65IXSZL9GIXeNPF0g4lAAKf/C4l3BD1BJnHzZAs40/JZBY4D2ySca8XGJ+JpSnyfcMQ6PjLR0wcE2mGfKD1iKOOezcyqCbvG/aaz6vrAgHlDXFMOsx7rckmRdVBvvwddNAuO7hrvHJv3r+i8x/ktMm/3AEO2W+JpcfqLYrmizUVvPsaIMAomlb5Y X-Forefront-Antispam-Report: CIP:212.179.42.66; CTRY:IL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(6009001)(2980300002)(339900001)(199003)(189002)(87936001)(36756003)(229853001)(33646002)(105606002)(5003940100001)(77096005)(47776003)(106466001)(104016003)(62966003)(5001770100001)(77156002)(189998001)(85426001)(86362001)(2201001)(46102003)(5001920100001)(5001970100001)(50986999)(49486002)(50466002)(92566002)(19580405001)(6806004)(48376002)(107886002)(50226001)(19580395003)(4001430100001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR02MB1147; H:ezex10.ezchip.com; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:ezmail.ezchip.com; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; HE1PR02MB1147; 2:Ofys0VIGFX81DFvon1KUdJg+4zIFiF/JOg5fKA3rGzHFRwjD9qptAl3Pcs4LKRIjvBvbKPNTe2RS6uKDwsXTzQVJwzoHvYF/E1Q98E7M3Fv5H+d3ILVFLDEkEWuzP83LnRF/+JpfbB8N3ufHAjUb3R/oAeCrrx9HCT8qdHFDGAY=; 3:pmbrCMpXfk8te3YQwtAchfhVZrFBilQfs5aeH/HpzMFvdJtFF47TcnsuffWSzSQcv4owhc5lCcnj5hInIF7brTFPA6GVAxlmOaIZ4yDmZESyIu7SdVXr/+J6o1oD3owLdCUMrBupqfaLI9xLOEF3ZvnajndwwFhDe/YeblY5rZa/CzW/bVSTWT2ngj+22bmzMYNgQtRvIBh6DQ81z0pe120HsT+oF8VUkn1EUYh0CIU=; 25:zSl5ryLM1XDqM1R9LueeqdKj/EaMqfPhTkoEZwrclkRrssVIvZcUphCVoHa9aLtW00nFbTUFupm5i+n5+mEMVMNN1UOWfGYVZPOb6LUPNXpVi+o0Rt+eRZBpfdsRU02JZCZLW+myR1ARJgk3Hi6vZLlBY+wCZpiBBgbq0YR3PzyajP4VTUFVP5yBklEsMQgRyrrqBkFLxr72PqYiha2OcsA1JsQbSD1nAO8TxMfUSNsp7DNZHGw57pcP0jBk4ORb; 20:tvKpNlRxyzIAXxbQlQT4X5gxpFBUZIXIFZe7Wm3Fnc4/jw+zGImxf6HPiHnjvCJq02RjYi7AiRgKU/KGOEkQ8/A7j8AXzAojAf21WID5TbR42WC2UzbnL5i2DttDCnYalbXu6oW45gHcIPCVPxESmM6HCBJNR9HG0bKYvFMJO2Q= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HE1PR02MB1147; HE1PR02MB1147: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: <HE1PR02MB114793E7078343217B9FF6ADD68F0@HE1PR02MB1147.eurprd02.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:HE1PR02MB1147; BCL:0; PCL:0; RULEID:; SRVR:HE1PR02MB1147; X-Microsoft-Exchange-Diagnostics: 1; HE1PR02MB1147; 4:MFcL/nUmNPFyat/tSuO5Vds/M0QQnqnx2DhUvu9YOTRAPTNOgTPvzAYpotV+/NdnxIEKfHB0XRvpLFA4TRr8YwWprg6BmBAUMdluc1KCPJW7cfdpJhvk4GNoVZbKZJX+YRkWE+O1h8YFLSUCMP8qMqv2nPkFHgYM0qJAO0LZeqrvCEWl4EADhSKGHCS1cP8xXzcNOM2t2VlfBhd0C+ntcQT8cIjOrM5FFeA7GQ+YFiMPdLeSMBJtN+PGrCNKXwtJALHpJPnHxQFcajkGxRz4EkB188OUIVW4oebm0z7pxFY= X-Forefront-PRVS: 064903DDDC X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR02MB1147; 23:wMQzFsF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hjj2PuV0zqH3x9soGfNyFY0Yvsfjka4GruF6831HlU+Ocv/BnSoTy?= =?us-ascii?Q?vEMtCUPd0PIiIp0RYLUjWcLf0KbjSS4Iopj89RhrMHpdCt/uaUb1O1EZnf47?= =?us-ascii?Q?x5zMdHWDxFzY9EGjiS8S0SB5/EA3VmcCdUiSdunQqsmhFe3JJQDunE9xn+cD?= =?us-ascii?Q?VE3XquH29y77i4Or1PAqNg7EUlY?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR02MB1147; 5:4CGNVOz0VYas2378/YpRVrg65OvE0ss6MlITYeVE/dA5KNw7D7mgHfAhLkFNMowYDH7Y8ujCE/zTNkJHk9DCwGsR8YHUK0YIHXQtcAl6xKjr7taIG5S/F56VOCQw1711ZHW/71nKPbfnKisLbVaYDg==; 24:IEpHhdJbxmP8LiMiMjX1FVcsT8nsDyLnHQspD6cEZa1KlQQT/UASaHCIR9RhJWOLfXIDvIIk86+5VoFKJe/O4jBggyDTCQd3RCEdWSxDBO4=; 20:DiBKAbVwXAYnil4+7TIq3eX5k7m770/GNKI8uzFcfZSwLdWG209gUAaX35iHAVKK/j3/U2RJUrMSm6m7oYzODg== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2015 06:21:33.8173 (UTC) X-MS-Exchange-CrossTenant-Id: 0fc16e0a-3cd3-4092-8b2f-0a42cff122c3 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=0fc16e0a-3cd3-4092-8b2f-0a42cff122c3; Ip=[212.179.42.66]; Helo=[ezex10.ezchip.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR02MB1147 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-fsdevel.vger.kernel.org> X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 6b65996..e445886 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -962,6 +962,9 @@ static int load_elf_binary(struct linux_binprm *bprm) k = elf_ppnt->p_vaddr + elf_ppnt->p_filesz; + if (k >= STACK_TOP) + continue; + if (k > elf_bss) elf_bss = k; if ((elf_ppnt->p_flags & PF_X) && end_code < k)