From owner-svn-src-head@freebsd.org Tue Sep 18 15:01:42 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 DE27910A04D6; Tue, 18 Sep 2018 15:01:41 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E788740A5; Tue, 18 Sep 2018 15:01:41 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pg1-x541.google.com with SMTP id s15-v6so1171742pgv.8; Tue, 18 Sep 2018 08:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=9ksSpNPT7wC1q0J5c+dZvY0eQM5DqX3V3WthtX1lpwg=; b=OKF+urxogc4Log8BR0IUDAJ+jnMuxF7WaSN5EBAobdeu1ICAPx6Nrf9WJllgfzMovI c1P4AXD3PzMoi7f8qOmp31Cx+sOvNt90km5VsUda8ou3ZTT06vsyFHPJcAyeIH+k5k2M uW/wWAi5fRNbWpfgIxk/0fa657yCp/ploM14h1FnsT8gWlz5hYeMWJcFj1eGMTdyvZmq WfnHkyFntjprHOs9DiYwKs0aZ1QwRrYmodfXhon9Wc7uUlVUTCrXaxz8SMbtuIuody8m m8z+fqC/ii3HbTgoQM8vHLdy6n7zD2a6Wclxh3vBZ1Mj9z5q2dCOKag7GTALg6dYr7OZ OH+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=9ksSpNPT7wC1q0J5c+dZvY0eQM5DqX3V3WthtX1lpwg=; b=PvTBsmK2QioAzQ2g5WZw6xXXBp3Ri7AZ419qRdU6MGbiGkthC2prYJSqoAahA6hGy6 rLvG/zlptOH3gXDCtomqwb77Ee3XA3sNcc19JvksXneyG/6Suu8mX6F5PGiFN9AuXzH+ SxsOuWm0VacN35ZFMjglXkvB+Gm7vJ4elFX+QsL2Emt8iK/fcxqUCkD8LPR0S+0snQA4 rqKMUlDEPCgW7xawFF4GYFUkHBwoxEWQ/+3N1CUI8XafjK6ZY10kPeVO0bHEKrm/muHT MW3yrbcsA33Ye6CKej5M2ncRUCBTicU65oXTf2mtJtx0wq5BEwnKVC1LwXnzTBTKhgwr m1Sg== X-Gm-Message-State: APzg51DRuooMXlhjsO0YQe1pXlxFP4Sbz0meVtxRIpZkagZbkQUzErtU kPldJsk1dO9nAcDsQPTQUH6pTu7D X-Google-Smtp-Source: ANB0VdYuqTSb0cRS2gM4a5BIGL26OAmhsOBUHsIdO3ujd+s+DjSONtDi9M4WJhoql89U4XJArIYgKg== X-Received: by 2002:a62:198e:: with SMTP id 136-v6mr31433025pfz.103.1537282899928; Tue, 18 Sep 2018 08:01:39 -0700 (PDT) Received: from raichu (toroon0560w-lp130-01-174-88-78-8.dsl.bell.ca. [174.88.78.8]) by smtp.gmail.com with ESMTPSA id 187-v6sm25540625pfu.184.2018.09.18.08.01.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Sep 2018 08:01:38 -0700 (PDT) Sender: Mark Johnston Date: Tue, 18 Sep 2018 11:01:36 -0400 From: Mark Johnston To: Alexey Dokuchaev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338687 - in head/sys: dev/cpuctl x86/include x86/x86 Message-ID: <20180918150135.GC93504@raichu> References: <201809141704.w8EH4aKd075044@repo.freebsd.org> <20180918081735.GA44081@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180918081735.GA44081@FreeBSD.org> User-Agent: Mutt/1.10.1 (2018-07-13) 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, 18 Sep 2018 15:01:42 -0000 On Tue, Sep 18, 2018 at 08:17:35AM +0000, Alexey Dokuchaev wrote: > On Fri, Sep 14, 2018 at 05:04:36PM +0000, Mark Johnston wrote: > > New Revision: 338687 > > URL: https://svnweb.freebsd.org/changeset/base/338687 > > > > Log: > > Log a message after a successful boot-time microcode update. > > Unfortunately, this had pessimized things on the unsuccessful side a bit. > (See below.) > > > ... > > @@ -130,36 +148,26 @@ ucode_intel_verify(struct ucode_intel_header *hdr, siz > > uint32_t cksum, *data, size; > > int i; > > > > - if (resid < sizeof(struct ucode_intel_header)) { > > - log_err("truncated update header"); > > + if (resid < sizeof(struct ucode_intel_header)) > > return (1); > > - } > > size = hdr->total_size; > > if (size == 0) > > size = UCODE_INTEL_DEFAULT_DATA_SIZE + > > sizeof(struct ucode_intel_header); > > > > - if (hdr->header_version != 1) { > > - log_err("unexpected header version %u", hdr->header_version); > > + if (hdr->header_version != 1) > > return (1); > > - } > > - if (size % 16 != 0) { > > - log_err("unexpected update size %u", hdr->total_size); > > + if (size % 16 != 0) > > return (1); > > - } > > - if (resid < size) { > > - log_err("truncated update"); > > + if (resid < size) > > return (1); > > - } > > > > cksum = 0; > > data = (uint32_t *)hdr; > > for (i = 0; i < size / sizeof(uint32_t); i++) > > cksum += data[i]; > > - if (cksum != 0) { > > - log_err("checksum failed"); > > + if (cksum != 0) > > return (1); > > - } > > return (0); > > Looks like previous error messages were more detailed (truncated header, > unexpected version or size, truncated update, checksum mismatch). Now > it all falls under "microcode verification failed". Was this intentional? It was intentional. It simplified the logging mechanism a bit, and diagnosis of update verification can be done more easily in userland anyway. I should have mentioned this change in the commit log.