From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751491AbdBANxh (ORCPT ); Wed, 1 Feb 2017 08:53:37 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:63248 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750801AbdBANxf (ORCPT ); Wed, 1 Feb 2017 08:53:35 -0500 From: Arnd Bergmann To: Kees Cook , Emese Revfy Cc: linux-kernel@vger.kernel.org, Josh Triplett , pageexec@freemail.hu, yamada.masahiro@socionext.com, minipli@ld-linux.so, linux@armlinux.org.uk, catalin.marinas@arm.com, linux@rasmusvillemoes.dk, david.brown@linaro.org, benh@kernel.crashing.org, tglx@linutronix.de, akpm@linux-foundation.org, jlayton@poochiereds.net, sam@ravnborg.org, kernel-hardening@lists.openwall.com Subject: initify plugin crashes on arm allmodconfig Date: Wed, 01 Feb 2017 14:52:41 +0100 Message-ID: <1993222.Sl7urNjWky@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.8.0-34-generic; KDE/5.18.0; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:xNeNLeb0IWFPeGqxDbb5CWneFgM6RyKPemlO/gkpcWt+wVsBqr+ uZG8127HQagaXn+EOtmViU93owLVPdwAy0+WF81BYmefjOZ/zF2HhhLm5Kyv2dS7Hi8uJWu KADr7Bj0VRg7tO2i0IfbJwRxry/cSqOQs+qkulCb0Yk7FrLZC7tAscnRyuOP23rPQoU+0yz lTV77GBq/dJbDwu6/p9Ng== X-UI-Out-Filterresults: notjunk:1;V01:K0:a/MJwBXbE0M=:7IrV3V8Vxvq60YLmeUagEa LBcHdZe9uWtfnvLnl4VKLP6YqAHR4LR5iEPDSSlRp+dtYqA6mkrPzB8YGi9+6VzYn3B1m1u4V 8apfw6Hwl63fUFVLpP6uPxbFhzwDciBAkTZe9zPX8ditJGbx3yIw6hnSEW9AchomGxLnAfpSq UoeGsKvGCDqZn2UAocRPT30RWvo+t7VgF4aNGsk0S4PqYGulriFvOgwmYp3cOQjaU+samr4kS FaYhX+5KmtTsMv25iGZpc+RQ28w1hQu/md8BxYDtBFO6V9SMdcKHX5EPQ257yywXMVOALF/Yv 53NCyhlhrpqzLIGnmgWqNgyVyCupCQs/ofLcrccoICYadi/NaX/+IpZ3WjXoaBpEj1LwdImd4 NuCp6MU04uI+ZrGdrbxTktqM8HSyOGA9DuBG/fzRMzE5O8EAJL+9332oZFC1pp5oD2az2THm7 H/cnOLA5SMv7swSGoI/thmAP1XQr0EbF8WXKoOqLnri5z6S7c9oPGXbm+ic/9Mox0563zpxbj a8+Oqpia4W+GooWyPWTrMdCs9WEF26MrfcWPp+DEgK9luT9NsCU/ohHMrnwifCbJPLpqSMSdM MXobAAzpxH2hPlkDo+K+G4t5xHo1XHphXwl1M4SqNZUwk16c5YwvvCF0B9dkzzkkKaJa00dJ8 2XdUfgL9lHfW2oI7AyvpTq7QJkh7Z6OHwLoOdsMW2WmSC6Cc6xGvJOzRh1idLcOhaxhPpRbNk lmRKL3P758RoAU/i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On my ARM test builds (using a recent gcc-7 snapshot), allmodconfig failed with a compiler crash, I have managed to minimize the test case to this: /home/arnd/cross-gcc/bin/arm-linux-gnueabi-gcc-7.0.1 -O2 -Wall -fplugin=/home/arnd/arm-soc/build/tmp/scripts/gcc-plugins/initify_plugin.so -DINITIFY_PLUGIN -fplugin-arg-initify_plugin-search_init_exit_functions -fno-inline-functions-called-once -S atmel_lcdfb.i arm-linux-gnueabi-gcc-7.0.1: internal compiler error: Segmentation fault (program cc1) struct { void *par; } * c, g; struct atmel_lcdfb_pdata { void (*atmel_lcdfb_power_control)(); }; int a, f; void *d, *e; int fn1(); inline void fn2(int *p1) { struct atmel_lcdfb_pdata *b = b; if (b) b->atmel_lcdfb_power_control(); a = fn1(); } int __attribute__((__section__(".init.text"))) fn3() { if (c) goto out; if (f) goto free_info; if (0) goto put_bus_clk; if (0) goto release_intmem; if (0) goto stop_clk; if (0) goto free_fb; if (e) goto release_mem; if (f) goto unmap_mmio; if (0) goto unregister_irqs; if (0) goto reset_drvdata; fn2(d); reset_drvdata: unregister_irqs: unmap_mmio: release_mem: free_fb: release_intmem: stop_clk: put_bus_clk: free_info: out: return 0; } int __attribute__((__section__(".exit.text"))) __attribute__((__cold__)) fn4() { fn2(g.par); return 0; } While trying to reproduce it, one time I ended up killing the gcc task when it used more than 80 gigabytes (!) of memory after around six minutes of compiling the same file (drivers/video/fbdev/atmel_lcdfb.c), but other times it just crashed as above using various ARM cross compilers (4.9.3, 5.3, 6.1.1). Arnd