From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::443; helo=mail-wr1-x443.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (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 DB1E92118DC51 for ; Fri, 9 Nov 2018 02:49:10 -0800 (PST) Received: by mail-wr1-x443.google.com with SMTP id z16-v6so1400751wrv.2 for ; Fri, 09 Nov 2018 02:49:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=KD1yjDBs95URgTYrNPR57z5IwmzhaJXH5xrt7pE5Cwc=; b=cUjCEHasyq+IrO3qX068kJA0J0lDGGUwBS4LPlk0+hrsBFHjXWYw9Q4uPqsGbOp+/v bwZBp66ONw9nkiUOKOCb7t6Ytr3oqaVUeQ0uZkaNcsWXjASkaU1nonwgCUVL+2u5zr41 fX22WccCH1133TTEdAJU2RdrSuKvsxi15u4t8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=KD1yjDBs95URgTYrNPR57z5IwmzhaJXH5xrt7pE5Cwc=; b=denNd2YNMHoZW7i8Tsh0D3ZFTYMsQ+R0eHvjPlobkmvRP+xlCesSk4puCG4rT1x7Ki W1kQYCTxY5QaHDi9DrEn+1leYk6LBvsIvHjJZSdUvyMEF+STOOxS14zzTBnK28HilnV0 K2M44YMpW+iIy2Xnk/TTcmd3XC2gyYlRQS+rtxoXIqBQEQH2gP0Dd1QA1dZhF5oVARI3 x2Tg57txOchTaW7oKI+FrPETxtldQ5YCq3HYTIc0u6ylZQqN2Wn4uPe/ZYTrEkHCFfOZ PoTFizCBrc3y7bh+BWwgf4rq57Y5liJd4aDkLJxULQZmrCHFpKVy7ZEuJBMeq9f4RME3 8fFg== X-Gm-Message-State: AGRZ1gKdVcrrkT3A+D4AaffQWDwgPP6EOBY0nFiULVPfk9NlDhx5jgRl RDRAsuSGhHMIIdJZZpHJuNswJA== X-Google-Smtp-Source: AJdET5cMBfgvMaFX3+QvxgXbNTX49cpPBDaNdGN2IH8DFn/s88hBffwlu7ziflZSKGcIBdW4g16IXA== X-Received: by 2002:adf:e1ca:: with SMTP id l10-v6mr7889145wri.36.1541760548131; Fri, 09 Nov 2018 02:49:08 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id j4-v6sm7507659wrp.68.2018.11.09.02.49.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Nov 2018 02:49:07 -0800 (PST) Date: Fri, 9 Nov 2018 10:49:05 +0000 From: Leif Lindholm To: "Gao, Liming" Cc: Ard Biesheuvel , "edk2-devel@lists.01.org" , Andrew Fish , Laszlo Ersek , Michael D Kinney Message-ID: <20181109104905.7vowaikh3ifvubdq@bivouac.eciton.net> References: <20181107145311.42488-1-dandan.bi@intel.com> <0C09AFA07DD0434D9E2A0C6AEB048310401EC2D7@shsmsx102.ccr.corp.intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E367B56@SHSMSX104.ccr.corp.intel.com> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [patch] MdeModulePkg/DisplayEngine: Remove useless NULL ptr check for NewPos X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2018 10:49:11 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Nov 09, 2018 at 07:56:07AM +0100, Ard Biesheuvel wrote: > On 9 November 2018 at 01:19, Gao, Liming wrote: > > Ard: > > This is a small fix. And, this patch is sent before the hard > > freeze. It is the low risk for this release. So, I push it. > > OK, fair enough. I don't agree actually. https://github.com/tianocore/tianocore.github.io/wiki/HardFeatureFreeze specifies clearly that only bug fixes are permitted in during hard freeze. Maybe we could document that a bit more explicitly, but this patch was no bugfix. It should not have gone in. By my interpretation, it would not even fulfill the requirements for https://github.com/lersek/edk2/wiki/SoftFeatureFreeze: "By the date of the soft feature freeze, developers must have sent their patches to the mailing list and received positive maintainer reviews." Soft feature freeze was 1 November. The patch was sent out 7 November. It received reviews 8 November (after the start of the hard freeze). The point of these freezes is that sometimes patches are wrong. And sometimes patches that look correct, are not correct. If we start making exceptions because "oh, it's trivial", that means we get these patches into the tree with much reduced time for anyone to catch any adverse effects before we make the stable tag. And at that point, the stable tag no longer has value. (I am much more flexible on the topic of updating documentation, like Maintainers.txt, but even there we must be very careful.) Regards, Leif > >>-----Original Message----- > >>From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] > >>Sent: Friday, November 09, 2018 2:25 AM > >>To: Zeng, Star > >>Cc: Bi, Dandan ; edk2-devel@lists.01.org; Wu, Hao A > >>; Dong, Eric ; Gao, Liming > >> > >>Subject: Re: [edk2] [patch] MdeModulePkg/DisplayEngine: Remove useless > >>NULL ptr check for NewPos > >> > >>On 8 November 2018 at 02:09, Zeng, Star wrote: > >>> Reviewed-by: Star Zeng > >>> > >>> -----Original Message----- > >>> From: Bi, Dandan > >>> Sent: Wednesday, November 7, 2018 10:53 PM > >>> To: edk2-devel@lists.01.org > >>> Cc: Gao, Liming ; Dong, Eric ; > >>Zeng, Star ; Wu, Hao A > >>> Subject: [patch] MdeModulePkg/DisplayEngine: Remove useless NULL ptr > >>check for NewPos > >>> > >>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1306 > >>> > >>> In function UiDisplayMenu, the NewPos ptr which used to point to the > >>highlight menu entry. It will always point to the menu entry which need to be > >>highlighted or the gMenuOption menu if the highlight menu is not found. > >>> So we can remove the NULL ptr check for NewPos in this function. > >>> And add the ASSERT code to avoid if any false positive reports of NULL > >>pointer dereference issue raised from static analysis. > >>> > >>> Cc: Liming Gao > >>> Cc: Eric Dong > >>> Cc: Star Zeng > >>> Cc: Hao Wu > >>> Contributed-under: TianoCore Contribution Agreement 1.1 > >>> Signed-off-by: Dandan Bi > >> > >>Why was this patch merged today? Surely, this doesn't meet the hard > >>freeze requirements ? > >> > >>> --- > >>> MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c | 3 ++- > >>> 1 file changed, 2 insertions(+), 1 deletion(-) > >>> > >>> diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c > >>b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c > >>> index 7390f954b6..44f087fe01 100644 > >>> --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c > >>> +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c > >>> @@ -2880,10 +2880,11 @@ UiDisplayMenu ( > >>> // MenuOption is set to NULL in Repaint > >>> // NewPos: Current menu option that need to hilight > >>> // > >>> ControlFlag = CfUpdateHelpString; > >>> > >>> + ASSERT (NewPos != NULL); > >>> UpdateHighlightMenuInfo(NewPos, TopOfScreen, SkipValue); > >>> > >>> if (SkipHighLight) { > >>> SkipHighLight = FALSE; > >>> MenuOption = SavedMenuOption; > >>> @@ -2908,11 +2909,11 @@ UiDisplayMenu ( > >>> Temp2 = SkipValue; > >>> } else { > >>> Temp2 = 0; > >>> } > >>> > >>> - if (NewPos != NULL && (MenuOption == NULL || NewPos != > >>&MenuOption->Link)) { > >>> + if (MenuOption == NULL || NewPos != &MenuOption->Link) { > >>> if (MenuOption != NULL) { > >>> // > >>> // Remove the old highlight menu. > >>> // > >>> Status = DisplayOneMenu (MenuOption, > >>> -- > >>> 2.18.0.windows.1 > >>> > >>> _______________________________________________ > >>> edk2-devel mailing list > >>> edk2-devel@lists.01.org > >>> https://lists.01.org/mailman/listinfo/edk2-devel > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel