Received: by 10.192.165.156 with SMTP id m28csp1771826imm; Thu, 12 Apr 2018 03:17:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx48oPbH+P+DtF9dJhRF4wrShmeoDey4GSJH4jXTcPyW5H4JFBrUyBt+VlzdE7p6U6th3qbHg X-Received: by 2002:a17:902:3341:: with SMTP id a59-v6mr372895plc.68.1523528243599; Thu, 12 Apr 2018 03:17:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523528243; cv=none; d=google.com; s=arc-20160816; b=NQXaMeZl7nBpqsHLEamZDLi6ACGcYMHDgG+RquQB69CDSdUh91uWxW8nA4IPNcA5JT 6UWA+tIgN3HckiST61NYnjUQpTKDReA0j13S5lP/65kcF2K1hVDW31rjypPMGGs8TdhE cWAHRZ0nP7Ju4knSAw0anL6R6Yf/GuqXmAe6DNKSQcoY0vo9NWCje0U9uSpLsdR6IS/J hYc8ipD2KwHfT97vrrsdJM9FAwkqOxzhLulwRclTkfU1eKgu2KMWtXuW8EqbGBXPsjwy T5xV65Nj3rmF2Sv113nwncinkdFDksMnN4wOjaMQLuZmbKtRK/vIkktk1b3hfSdb3MA/ crLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:message-id:date :mime-version:dkim-signature:arc-authentication-results; bh=SrTt5ARkusMkxo1/iJOUaPLMaUr9TuklCfZ8hCE4DuI=; b=b3LoXstkMTOqThGWY/L2IdWAi16NgxLUJdFlW/2teqYvR5z8GM8B3O/3z3iwTFZyJy rq6xpxIGUD7EnUcHXFfcXJKx5K459vS75nmFmjMTEr5u376wKeyfnL0M4ZJUEWEsAxcG bCFj0/1oLrJfALND1e/EaQ6raqZnfQJBSIA2r5+yQXK4bU/l9uWzMr/EiMS4b9VPxB/a vjlXl6UzSn1G8d0k1wYY69xtRJ2KiXpP3S7dkz2BXuawdNHEDt8YmKj2iyZuV/TNdw2b UaxQLJtGZ9H8EanZYesz5x5jw7EGi2nHh7n0waRN9TNmAyrgNinryc60/kd2sqLchWPi 66CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Tja2H3IH; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x4si2002707pgt.575.2018.04.12.03.16.45; Thu, 12 Apr 2018 03:17:23 -0700 (PDT) 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=@google.com header.s=20161025 header.b=Tja2H3IH; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752558AbeDLKOC (ORCPT + 99 others); Thu, 12 Apr 2018 06:14:02 -0400 Received: from mail-vk0-f73.google.com ([209.85.213.73]:51729 "EHLO mail-vk0-f73.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751870AbeDLKN7 (ORCPT ); Thu, 12 Apr 2018 06:13:59 -0400 Received: by mail-vk0-f73.google.com with SMTP id l81so2924842vkd.18 for ; Thu, 12 Apr 2018 03:13:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:date:message-id:subject:from:to:cc; bh=SrTt5ARkusMkxo1/iJOUaPLMaUr9TuklCfZ8hCE4DuI=; b=Tja2H3IHgyhW+y/UNLoby6cppmCGqhVTwLERN1kzTyPuCLYSgd33PmK/ngti/7Ijvb VvnALICiafgeNYE3FOyGKL2lc58Nu25oZ9ROrUw+xz+wqwCPzlQfSJWbsRar7aQebZ6T 1vdWfM4c7gw28sCLRVfbplqt1IATjfePXc0yGqN8OtP7pSVAJBHbusB26FO4ZWbngfb5 YvY4oalZ+pOvw/lqsC0lncj64iIEaWsrdA1cgpyH+scIBi4B67+MkHyEo8tGtQH5DudR +xUWOXbJTcnuv8I6e+Wx7cteqJkJ0t+b0v0hQG1hla37exh7j5CLqne/+dL2yfwfV/eH k5aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:message-id:subject:from:to:cc; bh=SrTt5ARkusMkxo1/iJOUaPLMaUr9TuklCfZ8hCE4DuI=; b=TJ1xv0i7w1VYSRrW4YcDSTjI04FwNteJWoq8Nm0HZ9UNxJNv0luqCmYzchcHtNLXpw p2M6+vg/bc7pPfKYIOtREZe6mB4nlifIbBmQjgTo37RdqHm3BP6UTVVEYXMm/sDunv9E WnuDRvnTgCp67oyVEltUeroT/cbBVU8gtidcUKIyCTxQigkFuezZD+k16bMbUo7L0VO3 SFc3isVhvOLMI5fOi00EpfMp4cl8IWvPQu4LWProwa4HAXTGAi7sCtpdi0g0ixwVvxfC MKQx1sNqfgWLV8BBSqWXQPQiynhpIUUrVgtJvCYRtihO6dxZPAjdwrGO9Om3RJ4muntx 8LEw== X-Gm-Message-State: ALQs6tCmrwIvCRF1nzMTsf/Csly7wVlTijsyS3O/qfcCW9gHfG1MvKJ8 7p0jaE9PCH7VXv0YY7VDxv4FAhgUVA== MIME-Version: 1.0 X-Received: by 10.176.79.42 with SMTP id n42mr121301uah.92.1523528038832; Thu, 12 Apr 2018 03:13:58 -0700 (PDT) Date: Thu, 12 Apr 2018 12:13:46 +0200 Message-Id: <20180412101350.210547-1-tweek@google.com> X-Mailer: git-send-email 2.17.0.484.g0c8726318c-goog Subject: [PATCH v2 0/4] Refactor TPM event log code From: Thiebaud Weksteen To: jarkko.sakkinen@linux.intel.com, nayna@linux.vnet.ibm.com, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, tweek@google.com Cc: linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, Thiebaud Weksteen 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 This patchset implements the proposal from Jarkko Sakkinen [1]. I have included the feedback from Nayna Jain about the function naming. [1] https://lkml.kernel.org/r/20171024222148.gwnkj5vqsyj43qer@linux.intel.com Changes since v1: - Add Suggested-by - Fix kbuild report Thiebaud Weksteen (4): tpm: Add explicit endianness cast tpm: Move eventlog files to a subdirectory tpm: Move shared eventlog functions to common.c tpm: Move eventlog declarations to its own header drivers/char/tpm/Makefile | 10 +- .../{tpm_eventlog_acpi.c => eventlog/acpi.c} | 3 +- drivers/char/tpm/eventlog/common.c | 195 +++++++++++++++++ drivers/char/tpm/eventlog/common.h | 35 +++ .../{tpm_eventlog_efi.c => eventlog/efi.c} | 3 +- .../tpm/{tpm_eventlog_of.c => eventlog/of.c} | 7 +- .../tpm/{tpm1_eventlog.c => eventlog/tpm1.c} | 200 ++---------------- .../tpm/{tpm2_eventlog.c => eventlog/tpm2.c} | 3 +- drivers/char/tpm/tpm.h | 27 --- 9 files changed, 262 insertions(+), 221 deletions(-) rename drivers/char/tpm/{tpm_eventlog_acpi.c => eventlog/acpi.c} (98%) create mode 100644 drivers/char/tpm/eventlog/common.c create mode 100644 drivers/char/tpm/eventlog/common.h rename drivers/char/tpm/{tpm_eventlog_efi.c => eventlog/efi.c} (97%) rename drivers/char/tpm/{tpm_eventlog_of.c => eventlog/of.c} (94%) rename drivers/char/tpm/{tpm1_eventlog.c => eventlog/tpm1.c} (58%) rename drivers/char/tpm/{tpm2_eventlog.c => eventlog/tpm2.c} (99%) -- 2.17.0.484.g0c8726318c-goog