Received: by 10.192.165.148 with SMTP id m20csp1192686imm; Wed, 2 May 2018 16:10:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqVGOmZssJ16SqUxVsNExNC1jV/3QinyzskJbpk+Ax9Txov4c8lJqBnsaaqCkR73265BLeN X-Received: by 10.167.129.204 with SMTP id c12mr8402582pfn.169.1525302611694; Wed, 02 May 2018 16:10:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525302611; cv=none; d=google.com; s=arc-20160816; b=WuGA2Wr8AU1B++ovFbpQgXKAwU3/T2gzTGWhjtHtNXBeHrKiqhP5CywXz+e6EsdKnL gJt2iUCxPC4LnGT1SseSvbBZ328d40PA2ruesJeyUNpDq6eBfh1DfmrZjLdLyBXi/vhB iBE0/dnBg18cXQS86HLxZhIFcRAxC8n58mScaD1wbq90mWl+PIW9eflWG1oINUqWv/LG Wlq+kSJZJxkAlphoKH9b61kDw+DFnP5FQJae81L7IcoZRXx0vYPh1WY3PUZzCdtrQgOb pL3oXcvv/p7oFD64bngRBW0Vcz6uEdmQ7pddMAwq2Rq12iZ7J2adalLy5H6VVopuQF95 wxsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=K9OHn9QaEiz6fVLbXlUXZg/jOs2wHWOKk/uvDT9Drkg=; b=OHGJ3vOhnUIkLmKuZjzdt6oB1QeAT4XhsJCK2hsmaW10XASQhA1GiSAwQdO6k56NHN dbd8As+JB9QNTAEm6AzJj8yvtqvKRp+bO+aWZrEd9g+3GKbTBZ19BK189Z1S+2TnIyFX 7/wTOaM0/3C0t1R0+AH7pMAlmX5nEpdWFuCkbbH05SYZHHqR1R9Y3tgsA/6W+82L76Vl 1r21k7+ia2aCEEkfOc722GjDuk/gXUJYhbjTpgb9RGkuQ15tAiuISJwMykYpMNdWCrAs 6rLG69awzWUN2QivY3Q+85Q7XvyqJD0FzwnO6143nEKi2Uymp0F7RU6DXYHU1ERSEPGp lqLA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x10si12565267pfh.85.2018.05.02.16.09.27; Wed, 02 May 2018 16:10:11 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751770AbeEBXIn (ORCPT + 99 others); Wed, 2 May 2018 19:08:43 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39874 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751441AbeEBXIk (ORCPT ); Wed, 2 May 2018 19:08:40 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w42N6LjP008011 for ; Wed, 2 May 2018 19:08:40 -0400 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hqmcy4rvb-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 02 May 2018 19:08:38 -0400 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 2 May 2018 17:08:38 -0600 Received: from b03cxnp08028.gho.boulder.ibm.com (9.17.130.20) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 2 May 2018 17:08:35 -0600 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w42N8Z7T8454442; Wed, 2 May 2018 16:08:35 -0700 Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E6830136040; Wed, 2 May 2018 17:08:34 -0600 (MDT) Received: from muttley.aw4.unh.edu (unknown [9.85.135.152]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP id DE721136043; Wed, 2 May 2018 17:08:33 -0600 (MDT) From: Mehmet Kayaalp To: David Howells , David Woodhouse , Keyrings Cc: Linux Integrity , Linux Security , Linux Kernel , Mimi Zohar , Stefan Berger , George Wilson , Mike Rapoport , Mehmet Kayaalp Subject: [PATCH v6 0/4] Certificate insertion support for x86 bzImages Date: Wed, 2 May 2018 19:08:07 -0400 X-Mailer: git-send-email 2.14.3 (Apple Git-98) X-TM-AS-GCONF: 00 x-cbid: 18050223-0020-0000-0000-00000DDA063B X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008959; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000258; SDB=6.01026618; UDB=6.00524344; IPR=6.00805804; MB=3.00020894; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-02 23:08:37 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18050223-0021-0000-0000-0000612E6574 Message-Id: <20180502230811.2751-1-mkayaalp@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-02_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805020192 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These patches add support for modifying the reserved space for extra certificates in a compressed bzImage in x86. This allows separating the system keyring certificate from the kernel build process. After the kernel image is distributed, the insert-sys-cert script can be used to insert the certificate for x86. Changes: v6: * Removed libelf dependency (2/4) v5: * Added CRC fixing (3/4) v4: * Applied checkpatch.pl suggestions (2/4, 3/4) * Cleaned up the commit messages (1/4, 2/4) * Added the build file to .gitignore (1/4) v3: * Rewrote 1/4 to insert incompressible bytes are at build time. Previous solution required changes to /boot/Makefile's for modifying the vmlinux file after linking, and did not work well with cross compilation. * Added 2/4 for ELF class-independent processing of vmlinux file, in case the script was compiled for 64-bit and the kernel was compiled for 32-bit. * Reordered 3/4, added x86 bzImage boot version (>=2.08) verification. v2: * Rebased arch/boot/x86/Makefile patch (removed in v3) Mehmet Kayaalp (4): KEYS: Insert incompressible bytes to reserve space in bzImage KEYS: Add ELF class-independent certificate insertion support KEYS: Support for inserting a certificate into x86 bzImage KEYS: Print insert-sys-cert information to stdout instead of stderr certs/.gitignore | 1 + certs/Makefile | 21 +- certs/system_certificates.S | 2 +- scripts/insert-sys-cert.c | 584 +++++++++++++++++++++++++++++------- 4 files changed, 488 insertions(+), 120 deletions(-) -- 2.17.0