From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geert Uytterhoeven Subject: Re: [PATCH v7 45/50] drivers/of: Avoid recursively calling unflatten_dt_node() Date: Fri, 13 May 2016 09:16:47 +0200 Message-ID: References: <1446642770-4681-1-git-send-email-gwshan@linux.vnet.ibm.com> <1446642770-4681-46-git-send-email-gwshan@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Rob Herring Cc: Gavin Shan , linuxppc-dev , "linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Benjamin Herrenschmidt , Michael Ellerman , aik-sLpHqDYs0B2HXe+LvDLADg@public.gmane.org, Bjorn Helgaas , Grant Likely , Pantelis Antoniou , Frank Rowand List-Id: devicetree@vger.kernel.org On Wed, Nov 4, 2015 at 5:07 PM, Rob Herring wrote: > On Wed, Nov 4, 2015 at 7:12 AM, Gavin Shan wrote: >> In current implementation, unflatten_dt_node() is called recursively >> to unflatten device nodes in FDT blob. It's stress to limited stack >> capacity. > > Did you actually hit a problem? > > Now we have a max depth of 64. Seems like that should be plenty... Any > idea how this compares to when we run out of stack space? FWIW, on arm64: drivers/of/fdt.c:443:1: warning: the frame size of 1136 bytes is larger than 1024 bytes [-Wframe-larger-than=] Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f195.google.com ([209.85.223.195]:35415 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750784AbcEMHQs (ORCPT ); Fri, 13 May 2016 03:16:48 -0400 MIME-Version: 1.0 In-Reply-To: References: <1446642770-4681-1-git-send-email-gwshan@linux.vnet.ibm.com> <1446642770-4681-46-git-send-email-gwshan@linux.vnet.ibm.com> Date: Fri, 13 May 2016 09:16:47 +0200 Message-ID: Subject: Re: [PATCH v7 45/50] drivers/of: Avoid recursively calling unflatten_dt_node() From: Geert Uytterhoeven To: Rob Herring Cc: Gavin Shan , linuxppc-dev , "linux-pci@vger.kernel.org" , "devicetree@vger.kernel.org" , Benjamin Herrenschmidt , Michael Ellerman , aik@ozlabs.ru, Bjorn Helgaas , Grant Likely , Pantelis Antoniou , Frank Rowand Content-Type: text/plain; charset=UTF-8 Sender: linux-pci-owner@vger.kernel.org List-ID: On Wed, Nov 4, 2015 at 5:07 PM, Rob Herring wrote: > On Wed, Nov 4, 2015 at 7:12 AM, Gavin Shan wrote: >> In current implementation, unflatten_dt_node() is called recursively >> to unflatten device nodes in FDT blob. It's stress to limited stack >> capacity. > > Did you actually hit a problem? > > Now we have a max depth of 64. Seems like that should be plenty... Any > idea how this compares to when we run out of stack space? FWIW, on arm64: drivers/of/fdt.c:443:1: warning: the frame size of 1136 bytes is larger than 1024 bytes [-Wframe-larger-than=] Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds