Message ID | 1437892030-890-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@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7EC97C05AC for <patchwork-linux-fsdevel@patchwork.kernel.org>; Sun, 26 Jul 2015 06:28:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AD252203EB for <patchwork-linux-fsdevel@patchwork.kernel.org>; Sun, 26 Jul 2015 06:27:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B90242039E for <patchwork-linux-fsdevel@patchwork.kernel.org>; Sun, 26 Jul 2015 06:27:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932146AbbGZG1n (ORCPT <rfc822;patchwork-linux-fsdevel@patchwork.kernel.org>); Sun, 26 Jul 2015 02:27:43 -0400 Received: from mail-db3on0079.outbound.protection.outlook.com ([157.55.234.79]:31472 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751475AbbGZG1m (ORCPT <rfc822;linux-fsdevel@vger.kernel.org>); Sun, 26 Jul 2015 02:27:42 -0400 Received: from HE1PR02CA0070.eurprd02.prod.outlook.com (10.163.170.38) by DB4PR02MB189.eurprd02.prod.outlook.com (10.242.159.12) with Microsoft SMTP Server (TLS) id 15.1.225.19; Sun, 26 Jul 2015 06:27:39 +0000 Received: from AM1FFO11FD009.protection.gbl (2a01:111:f400:7e00::182) by HE1PR02CA0070.outlook.office365.com (2a01:111:e400:5350::38) with Microsoft SMTP Server (TLS) id 15.1.225.19 via Frontend Transport; Sun, 26 Jul 2015 06:27:39 +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 AM1FFO11FD009.mail.protection.outlook.com (10.174.65.98) with Microsoft SMTP Server (TLS) id 15.1.231.11 via Frontend Transport; Sun, 26 Jul 2015 06:27:38 +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:27:15 +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:27:10 +0300 Message-ID: <1437892030-890-1-git-send-email-noamc@ezchip.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1437891661-32007-1-git-send-email-noamc@ezchip.com> References: <1437891661-32007-1-git-send-email-noamc@ezchip.com> 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; AM1FFO11FD009; 1:cKLYmw8SHC7/NmB+K7N/r8yw60S08cQoxGYB/MkZjl1GcsEz9l8VX8G40jRpcgu9QlhiGcdhcmxLMsVC/7BedFGWUoY4fxZs5Wl/A2EYK5Mc1074xYGmNd36BWyY9eREUEx/o5NrOLb+CHNyneZ3yhyYmihu0LsgK5HLxZR9m00ZNLn7Hf6UexMrP+adLGpecNip9rMNdAaTLFiexnXrb4ltaBAaZYKSngxlKhYz2bKUMN/DIbRanVkB1eWBFFk2cGOmlFHKHdDscLtnJBhJiqrHEFL9B5Q+ddKc23VVOuVt3m7/AKR3/D2XNk+jdnDw X-Forefront-Antispam-Report: CIP:212.179.42.66; CTRY:IL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(339900001)(189002)(199003)(19580405001)(106466001)(104016003)(76176999)(6806004)(33646002)(62966003)(87936001)(77156002)(47776003)(46102003)(229853001)(5001770100001)(50986999)(49486002)(5001920100001)(77096005)(189998001)(107886002)(2950100001)(2201001)(5001970100001)(86362001)(50466002)(36756003)(19580395003)(92566002)(48376002)(4001430100001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR02MB189; H:ezex10.ezchip.com; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB4PR02MB189; 2:TbUeaRyw/4mCHXrWIdoYcnDOh9CrUyJZvYYvQfQMCouuY7WishywEgYrxOzzlkCW0oJyyJPmFEx18xCw1TLynsg823UuhmVE0nUD+ku0uFDkkSex8XeNXeK6uZHF7UlB3SpTIjaiL2POBcfwuCNTsUQjbpVV3jZU/EZNmqzj8JM=; 3:0zFYs7shEhRs3Jb4GNMGcsBsCR+cYd01FfMFs3UwiZQymlUQn98vzEgVvjX4Eu7RtReXiGaZFTHGGLNQdVXyUnBQhwwDFQgZgg0BNs9mLyoztkRx143eU8pUuulVzW2Fd6VsnmY+J3GaajtYs5fUzo4wJ3lqJj7I3jSJDg4tIoefSCpRGTqh6A7jtjqxwGgxYjzT+Vuy0h30BSOulCU5R0fLdCha45TUnrROxoZjQ6E=; 25:8gPbMB25KXfPWuVBO4uee6kRmE+mCpmnycVMj/6TsSacr0OwbnPu+AW5cAPDGYb8yM4TYwA5gK6felTUBhTiDrAQKeX7cgI2tGoxq7gUfzvs2RRgzw3ZVIfnDeEmPNROWh82wQ6umterrBiR3T9aRNrsd5eNSNI1zyS9p8B81S5ADfYqV5zmK8OxmyDB+NC4L90RZxmeu/ANEKVQlAnzkTLUp81wPP/GJvXbWdaNaqUBlyvpt8Bg86Dvoe7EMGyG; 20:0Smi/H9sckKW3XBpckOjHF7BAm9DWMzhA305V9kdfX9q2h2Qyg03VQHJv7iLzCIrRROSwt1GAnngWiIOUTzJCgGP2qKbtw/ZRX8Ig+nuYlEoIkhvX6Xg6g9TDZfNOvgm8D8dFzPs2lSRH45QR6eun0SaU0WvAkaXEHHnNq6aNW8= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB4PR02MB189; DB4PR02MB189: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: <DB4PR02MB189208E2FA3034412C4076AD68F0@DB4PR02MB189.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:DB4PR02MB189; BCL:0; PCL:0; RULEID:; SRVR:DB4PR02MB189; X-Microsoft-Exchange-Diagnostics: 1; DB4PR02MB189; 4:Icouov7PYItWs9nINPbrDx6F62OoC4eYUrkoLKWXvMp3Wh8xBBueSF9XDYZV0VLXKZ74HgTwdtipG8bdm/Ch3tTZYtYN82KmE9hnYZPOMCMxIUsWA1qSc7q7rXyB+/6WmayW9krpzlxZ8KIDOEjXsudH7/85uCJYsxV+yquUF0IdXHQweVTdG0yTJVKs+YEICT9bvpW338zs6E8dB8dRe6RXyGkG9Qu/uvfNwIsbww3SpqQo1ag6Uibuqwh6kvD/2fF9WEGxN6t5yz9I06bXbkmbu4i3I8/UdMv52IHFgXc= X-Forefront-PRVS: 064903DDDC X-Microsoft-Exchange-Diagnostics: 1; DB4PR02MB189; 23:wbwphFcjOo7UBZBVGDFw5K4hYPSgt4UITDzxktS1PtimC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Ssg/DwRA==; 24:FyZyImE/t/U97AqrVHnJjCyUstOMFJjOIaeH67azDmRfiIGdSNHAaG0olvR89fQAJ1kmDAyopK0fsVLQWmEqdCi6UL+Nbb53FsMdQpZhlWw=; 20:byj72AO1PA5XQYZz2UQyB1atkIRcYh1OY2pwp1yt4MNKptMOfx5ooioF84HMMh0hRWKGEHS2HnYsAsAWuL9zsw== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2015 06:27:38.5374 (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: DB4PR02MB189 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)