Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp745060ima; Fri, 1 Feb 2019 10:17:32 -0800 (PST) X-Google-Smtp-Source: ALg8bN5Y3dJNgTxnWJ1W+cnHHAkiuIbwsGY9H2dEcaRCuq2O+CugQKjkMXNeQxJCfIQ4W+PUT+Lr X-Received: by 2002:a62:75d1:: with SMTP id q200mr40353952pfc.254.1549045052743; Fri, 01 Feb 2019 10:17:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549045052; cv=none; d=google.com; s=arc-20160816; b=J0sEBl6p2OHfUDFM+fENNReRcUB0fYRR53cDBkzT9x5JuHLojg2+l0OI3vJAlNBldL fY8iQ/uo/Q+Gmu5EhXD59fOztCESoZhY2uIhveHoLA9DmzqBDrJB+fCCE1RKnp3F9A7o iF4FebobQ2MMdmwPGmuWfSk/oX2T598QMdZG5vGxsCH9dLtjAlXru/VCIpn2M0dtd9lA inyQ8rWkQ8zUQlkHVffKG3QWiXfIv5bU8ree24RJ9uoPu2qniJcwl+XmmElHEC+JDEx0 2TbA17ktNWVLhOEbA0EoSaW+MpyhLXesWUllYjOnP6fMXD0AGysCazOFT8UjTFG/S9B3 E/0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=l7lrexG/S2ZMmYpuKyHJIqG74wkYAVGMQ+BpnsBM9Cw=; b=0bK7ufjP1KxeXDd9/DcVzzTVhf7cx1kXx50EiZH7lb3OAcMhhtQVRBNFqX1UMJ4Tsm 9YZEftOpWqtxifMCwxOpUXU+uZYndJGKrXueGDfusi4FeoSDYpcgKl1iRZMuIDwoMJvn t/5lmbv3HihkIUqEWO8DDIIsjZNCztWwP1FuVO9WsphkC4BHzMfWevY3Uq7RQXXtYs6R MEA6InnGs2YGAveDVcfwhMDSmMMXrz0+jmvm1qFiP8vX2mptWOKAVlXACL1vDgL4Gr9n wRqJu/wJFDu/Xss8raAmt5pgeQJ1h5ujjh9us0GxXBVbOOG236RyvlPwtXbBOHEFkwxx iZPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=bVWglcuN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q5si7078614pgb.245.2019.02.01.10.17.16; Fri, 01 Feb 2019 10:17:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=bVWglcuN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730947AbfBARt0 (ORCPT + 99 others); Fri, 1 Feb 2019 12:49:26 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:36295 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726486AbfBARtZ (ORCPT ); Fri, 1 Feb 2019 12:49:25 -0500 Received: by mail-lj1-f195.google.com with SMTP id g11-v6so6560041ljk.3 for ; Fri, 01 Feb 2019 09:49:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=l7lrexG/S2ZMmYpuKyHJIqG74wkYAVGMQ+BpnsBM9Cw=; b=bVWglcuNXEYTcI2DPnNSJ687yDAFVE4LcRlyGlRu7KEiazzElLdp5QEWYsGNIuQGmi YR+S8F55RsjKDcMQ3sMl+WG3f/Ikw7suvXaNS091xV3aTRgKeoif4C/YT7Yd3imeJ2LM D8CjhFcy9U6Q/hQGqvhp8pBKE19I+a0LgJ04g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=l7lrexG/S2ZMmYpuKyHJIqG74wkYAVGMQ+BpnsBM9Cw=; b=e3D0y/wuSJ3ru+nRermO/Icd/4qnoVY+Yy6BxhoHFmiKWxrQEzRQjCxwKE7ux0O4T9 C+mtjpK6jD4YZg8bC/P0mcxg2KQ5INqQpg0e9UAcdL7GWUP7IJdv9A2+20e4rmuccVPB YM48I7zyDA4uG1PpaZE/TwNKSuTCZZDErMpuxxahbk+obmgrAUNF57irSE8oyFJlwCon 5XCmQdicVZt/uMPCcf6t234Ak4Mb/qohZLPklqSuDDPMRe7xR8kxt+aIXYDjEPQLfHYf K98NAS+MKI1/BfIhm6bnA18cCUTQ18gtyl5bWW88n8bycuBa5ohMoDm2QQ19o1jCwqJz LPUg== X-Gm-Message-State: AJcUukfa+eyrOmeIAFK5PzU6LSDMLuEa8pL79vfgRdbw9dkIJjku7AgS exTxxeSmDzxzv2WF9f7c9U+IWR+PCUc= X-Received: by 2002:a2e:7615:: with SMTP id r21-v6mr32480050ljc.131.1549043363151; Fri, 01 Feb 2019 09:49:23 -0800 (PST) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com. [209.85.167.45]) by smtp.gmail.com with ESMTPSA id t67sm324723lfi.38.2019.02.01.09.49.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Feb 2019 09:49:22 -0800 (PST) Received: by mail-lf1-f45.google.com with SMTP id f5so5653281lfc.13 for ; Fri, 01 Feb 2019 09:49:21 -0800 (PST) X-Received: by 2002:a19:4ed9:: with SMTP id u86mr32303202lfk.78.1549043361378; Fri, 01 Feb 2019 09:49:21 -0800 (PST) MIME-Version: 1.0 References: <20190201111949.14881-1-jarkko.sakkinen@linux.intel.com> In-Reply-To: <20190201111949.14881-1-jarkko.sakkinen@linux.intel.com> From: Linus Torvalds Date: Fri, 1 Feb 2019 09:49:05 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] tpm/tpm_crb: Avoid unaligned reads in crb_recv(): To: Jarkko Sakkinen Cc: Linux List Kernel Mailing , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, stable , James Morris , Tomas Winkler , Jerry Snitselaar Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 1, 2019 at 3:33 AM Jarkko Sakkinen wrote: > > Thus, it makes sense to fix this also in tpm_crb, not least because > the fix can be then backported to stable kernels and make them more robust > when compiled in differing environments. Ack, looks sane to me, and should help both the backport and probably generate better code too. In the meantime, I've committed the iomem.c change with a *long* commit message. For all we know, there might be other cases like this lurking somewhere else that just happened to work. Plus it's the right thing to do anyway. Linus