Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2022751ybi; Thu, 4 Jul 2019 03:55:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBowhtXAu4TMpUTOXECrO+gGfEYBDxP96sIBmUN2nqdrpMfL2/gLkzCP60H8tdh0Vp4vNL X-Received: by 2002:a65:47c1:: with SMTP id f1mr18408273pgs.169.1562237752444; Thu, 04 Jul 2019 03:55:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562237752; cv=none; d=google.com; s=arc-20160816; b=M29XU2AyAMz1q2LyaoWQNKSLyX/j62y/g36MxiiE8ECwQN0zmUYXSjRMT9XFtqwwYL 20iuO/4YkxQeNPH35LdicAIF+UlxXomzQdUNSpITFUF/EZEqS5htl3BxkMqfYAvMa9iX /84ICfmNW+bqR1Zu4YUf1cc4C3xY472LXY8bCHFpvzU7K2zWXwe4lBZYNaHJzgn9NW0C fdTijAHYcumK1UIZItw7DUWSqnBTpXVUkBHduht5NHOs78supDtDCuVMFm47/LtxR0D2 7tIJiK0t+/o7KXHfiEOlLcXJ0tO3X6EI4Ho0IOyhMWWb/PqDD24WS/bm9a3YPAfiNBWT 9wUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:organization:references:in-reply-to:subject:cc:to:from :date; bh=+dGfq8wevO5K/aHUyX5nJEfBluS7HS+2QVHCnYU8jy0=; b=ThDPP/whzxs6BiqR+lMbNszN54gKC7PxhJPERHFDkIKQmamgaWuF3ddb7p2WXgBvTC fk3PN1YLqbTtLtxN4qRKBoyopxVbtq4B11sikkUBjZK2SUAK+rxhM1Fl/TZyAxh7AJiE f9At15iADniPudJlBluC1uyIqihHfrim7JSZzu0hZvQ/hUAHc49Yfz08CLZWKlIbFt85 t/bavmqBZow29N7FYChvEx3BtY8ZHNvdkcQI8xWj3YHbGebSWBb0oeM+AXw0t36CxhYP O8qPuhBh2fVONyHFsJ99t1Iei8orwESTgwWePROqIb8fixM+HnOvsIjwj9AdgURjaD+b CtmA== 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 j63si5028590pgc.185.2019.07.04.03.55.27; Thu, 04 Jul 2019 03:55:52 -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 S1727551AbfGDKyj (ORCPT + 99 others); Thu, 4 Jul 2019 06:54:39 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:5502 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727403AbfGDKyi (ORCPT ); Thu, 4 Jul 2019 06:54:38 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x64Ar5qq037100 for ; Thu, 4 Jul 2019 06:54:37 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2thdcfxdda-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 04 Jul 2019 06:54:36 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 4 Jul 2019 11:54:35 +0100 Received: from b06avi18878370.portsmouth.uk.ibm.com (9.149.26.194) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 4 Jul 2019 11:54:30 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x64AsSpq35455354 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 4 Jul 2019 10:54:28 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B9AC8AE045; Thu, 4 Jul 2019 10:54:28 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 33C7FAE053; Thu, 4 Jul 2019 10:54:28 +0000 (GMT) Received: from laptop-ibm (unknown [9.152.212.73]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 4 Jul 2019 10:54:28 +0000 (GMT) Date: Thu, 4 Jul 2019 12:54:27 +0200 From: Philipp Rudo To: Thiago Jung Bauermann Cc: Jessica Yu , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Mimi Zohar , Dmitry Kasatkin , James Morris , "Serge E. Hallyn" , David Howells , David Woodhouse , Herbert Xu , "David S. Miller" , Jonathan Corbet , "AKASHI\, Takahiro" , Heiko Carstens , linux-s390@vger.kernel.org Subject: Re: [PATCH v12 01/11] MODSIGN: Export module signature definitions In-Reply-To: <87lfxel2q6.fsf@morokweng.localdomain> References: <20190628021934.4260-1-bauerman@linux.ibm.com> <20190628021934.4260-2-bauerman@linux.ibm.com> <20190701144752.GC25484@linux-8ccs> <87lfxel2q6.fsf@morokweng.localdomain> Organization: IBM X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 19070410-0008-0000-0000-000002F9D612 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19070410-0009-0000-0000-000022672778 Message-Id: <20190704125427.31146026@laptop-ibm> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-07-04_06:,, 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 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907040141 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thiago, On Thu, 04 Jul 2019 03:42:57 -0300 Thiago Jung Bauermann wrote: > Jessica Yu writes: > > > +++ Thiago Jung Bauermann [27/06/19 23:19 -0300]: > >>IMA will use the module_signature format for append signatures, so export > >>the relevant definitions and factor out the code which verifies that the > >>appended signature trailer is valid. > >> > >>Also, create a CONFIG_MODULE_SIG_FORMAT option so that IMA can select it > >>and be able to use mod_check_sig() without having to depend on either > >>CONFIG_MODULE_SIG or CONFIG_MODULES. > >> > >>Signed-off-by: Thiago Jung Bauermann > >>Reviewed-by: Mimi Zohar > >>Cc: Jessica Yu > >>--- > >> include/linux/module.h | 3 -- > >> include/linux/module_signature.h | 44 +++++++++++++++++++++++++ > >> init/Kconfig | 6 +++- > >> kernel/Makefile | 1 + > >> kernel/module.c | 1 + > >> kernel/module_signature.c | 46 ++++++++++++++++++++++++++ > >> kernel/module_signing.c | 56 +++++--------------------------- > >> scripts/Makefile | 2 +- > >> 8 files changed, 106 insertions(+), 53 deletions(-) > >> > >>diff --git a/include/linux/module.h b/include/linux/module.h > >>index 188998d3dca9..aa56f531cf1e 100644 > >>--- a/include/linux/module.h > >>+++ b/include/linux/module.h > >>@@ -25,9 +25,6 @@ > >> #include > >> #include > >> > >>-/* In stripped ARM and x86-64 modules, ~ is surprisingly rare. */ > >>-#define MODULE_SIG_STRING "~Module signature appended~\n" > >>- > > > > Hi Thiago, apologies for the delay. > > Hello Jessica, thanks for reviewing the patch! > > > It looks like arch/s390/kernel/machine_kexec_file.c also relies on > > MODULE_SIG_STRING being defined, so module_signature.h will need to be > > included there too, otherwise we'll run into a compilation error. > > Indeed. Thanks for spotting that. The patch below fixes it. It's > identical to the previous version except for the changes in > arch/s390/kernel/machine_kexec_file.c and their description in the > commit message. I'm also copying some s390 people in this email. to me the s390 part looks good but for one minor nit. In arch/s390/Kconfig KEXEC_VERIFY_SIG currently depends on SYSTEM_DATA_VERIFICATION. I'd prefer when you update this to the new MODULE_SIG_FORMAT. It shouldn't make any difference right now, as we don't use mod_check_sig in our code path. But it could cause problems in the future, when more code might be shared. Thanks Philipp > > Other than that, the module-related changes look good to me: > > > > Acked-by: Jessica Yu > > Thank you very much! >