From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c00::229; helo=mail-pf0-x229.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pf0-x229.google.com (mail-pf0-x229.google.com [IPv6:2607:f8b0:400e:c00::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D8EFA222630D9 for ; Sat, 24 Feb 2018 00:41:26 -0800 (PST) Received: by mail-pf0-x229.google.com with SMTP id q13so4509168pff.0 for ; Sat, 24 Feb 2018 00:47:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=LoqIGL0FJgXg+Jnh/pZfHGgL7zsHpImfrJYcdeSBWxY=; b=jX+jUx9sUz8nHv0kjIiYHhUSXGcJQjotR4DLIt9ZHAS9GGRJjz9KMimrMzfdWcj6h6 XHR9QMMr+wDcVZUz8QW+5baMnmZD5COkNpR3EC/7X5b1qVVuNVtVU3JKECnRKqEfvIe/ ViyJP7HlqUrZXawngdRlC8eITNd4CPeHuIk7U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=LoqIGL0FJgXg+Jnh/pZfHGgL7zsHpImfrJYcdeSBWxY=; b=qJb2e9TzVC2HYSB398tXTcmkjQAXvTzOKKFMCor374eFdY/pVju2NU47sUBHCIcJFL Yf4GyfGw5VjThwUqYPSpavOIEho/cqyd9uzKioIXvMVlfJUb61wNyser5uAvrtq6L2M2 4Mm1t/a52EKSIsGVl+r+C9imgoenVfaZ5Q96OAKZmMiNNfSsmJaKlOxGwq3uHaxWjmwy FunHPifMF5v4g/FfQ0U9YIeE7cXFmzZOX+6VDwO7a8M3+mww21zsSVUcSDJ79pbdXrXH AhW6JRrI3RqCYQc/VKaM5WwioWz/KJ0NhpVVtq4NQx+bc6yBNoGqeTo8CPf+qQHCmZXQ hRVA== X-Gm-Message-State: APf1xPCU1eXgIwlHhLX4WgiCPxGMRmZzmnbGEVObzl/dWYwmIy75Mf6f fvCJbUVgysqn2emHleS86zH4MA== X-Google-Smtp-Source: AH8x226NTm241dNN3BBKiTIpmEmPP4O0A+SGqpaFvcl+xAxkgcatYO7HS07+tnn9s0UZ4sNX4IGxMA== X-Received: by 10.98.71.217 with SMTP id p86mr4318889pfi.81.1519462049032; Sat, 24 Feb 2018 00:47:29 -0800 (PST) Received: from SZX1000114654 ([104.237.91.49]) by smtp.gmail.com with ESMTPSA id 76sm9371209pfp.53.2018.02.24.00.47.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Feb 2018 00:47:28 -0800 (PST) From: Guo Heyi X-Google-Original-From: Guo Heyi Date: Sat, 24 Feb 2018 16:47:25 +0800 To: "Ni, Ruiyu" Cc: Guo Heyi , "edk2-devel@lists.01.org" , "Zeng, Star" , "Dong, Eric" Message-ID: <20180224084725.GC111715@SZX1000114654> References: <20180224062316.GA111715@SZX1000114654> <51de13de-ff0f-2bc8-dfb8-a6ea0685f3c6@Intel.com> <20180224082841.GB111715@SZX1000114654> <734D49CCEBEEF84792F5B80ED585239D5BBC02C2@SHSMSX104.ccr.corp.intel.com> MIME-Version: 1.0 In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5BBC02C2@SHSMSX104.ccr.corp.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: MdeModulePkg/UefiBootManagerLib: recursive call of BmRepairAllControllers X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Feb 2018 08:41:27 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sure. On Sat, Feb 24, 2018 at 08:40:20AM +0000, Ni, Ruiyu wrote: > Will you submit a patch for this change? > > Thanks/Ray > > > -----Original Message----- > > From: Guo Heyi [mailto:heyi.guo@linaro.org] > > Sent: Saturday, February 24, 2018 4:29 PM > > To: Ni, Ruiyu > > Cc: Guo Heyi ; edk2-devel@lists.01.org; Zeng, Star > > ; Dong, Eric > > Subject: Re: MdeModulePkg/UefiBootManagerLib: recursive call of > > BmRepairAllControllers > > > > On Sat, Feb 24, 2018 at 04:20:52PM +0800, Ni, Ruiyu wrote: > > > On 2/24/2018 2:23 PM, Guo Heyi wrote: > > > >Hi folks, > > > > > > > >In BmDriverHealth.c, function BmRepairAllControllers may recursively > > > >call itself if some driver health protocol returns > > EfiDriverHealthStatusReconnectRequired. > > > >However, if there is something wrong in some 3rd party driver (e.g. > > > >PCI oprom), the driver health protocol of that driver may always > > > >return such status even after one and another reconnect. The endless > > > >iteration will cause stack overflow and then system exception, and it > > > >may be not easy to find that the exception is actually caused by stack > > overflow. > > > > > > yes. I agree. > > > If a buggy PCI oprom always return ReconnectRequired, the stack > > > overflow will happen. > > > > > > How about we choose maximum recursive call depth as 10 and continue to > > > boot if call depth reaches 11? > > > > That's fine for me :) > > > > Thanks, > > > > Gary (Heyi Guo) > > > > > > > > > > > > >So does it make sense to set a maximum count of this recursive call > > > >to avoid whole system hang even there is a buggy 3rd party driver? > > > > > > > >Thanks, > > > > > > > >Gary (Heyi Guo) > > > > > > > > > > > > > -- > > > Thanks, > > > Ray