From owner-svn-src-head@freebsd.org Tue Sep 4 17:23:38 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D3C1FF5F59; Tue, 4 Sep 2018 17:23:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BD63784C0; Tue, 4 Sep 2018 17:23:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w84HNLsH015066 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 4 Sep 2018 20:23:25 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w84HNLsH015066 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w84HNLmM015065; Tue, 4 Sep 2018 20:23:21 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 4 Sep 2018 20:23:21 +0300 From: Konstantin Belousov To: Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338437 - in head/sys: amd64/amd64 amd64/include arm64/arm64 arm64/include conf dev/efidev modules/efirt sys Message-ID: <20180904172321.GE2340@kib.kiev.ua> References: <201809022137.w82Lb5FK046191@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2018 17:23:38 -0000 On Tue, Sep 04, 2018 at 08:48:15AM -0700, Conrad Meyer wrote: > Hi Konstantin, > > On Sun, Sep 2, 2018 at 2:37 PM, Konstantin Belousov wrote: > > Author: kib > > Date: Sun Sep 2 21:37:05 2018 > > New Revision: 338437 > > URL: https://svnweb.freebsd.org/changeset/base/338437 > > > > Log: > > Catch exceptions during EFI RT calls on amd64. > > > > This appeared to be required to have EFI RT support and EFI RTC > > enabled by default, because there are too many reports of faulting > > calls on many different machines. The knob is added to leave the > > exceptions unhandled to allow to debug the actual bugs. > > ... > > > > Modified: head/sys/dev/efidev/efirt.c > > ============================================================================== > > --- head/sys/dev/efidev/efirt.c Sun Sep 2 21:16:43 2018 (r338436) > > +++ head/sys/dev/efidev/efirt.c Sun Sep 2 21:37:05 2018 (r338437) > > ... > > @@ -346,30 +413,35 @@ efi_get_time_capabilities(struct efi_tmcap *tmcap) > > int > > efi_reset_system(void) > > { > > - int error; > > + struct efirt_callinfo ec; > > > > - error = efi_enter(); > > - if (error != 0) > > - return (error); > > - efi_runtime->rt_reset(EFI_RESET_WARM, 0, 0, NULL); > > - efi_leave(); > > - return (EIO); > > + if (efi_runtime == NULL) > > + return (ENXIO); > > + bzero(&ec, sizeof(ec)); > > + ec.ec_name = "rt_reset"; > > + ec.ec_argcnt = 4; > > + ec.ec_arg1 = (uintptr_t)EFI_RESET_WARM; > > + ec.ec_arg1 = (uintptr_t)0; > > + ec.ec_arg1 = (uintptr_t)0; > > + ec.ec_arg1 = (uintptr_t)NULL; > > Coverity warns about ec_arg1 being overwritten before use ??? should > these be ec_arg2, 3, 4? CID 1395456. Indeed, thank you for reporting. Amusingly it is innocent.