Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4652833imm; Fri, 18 May 2018 08:31:44 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp6EBhC9+U//8wk9Zdg7FTGuqfoQF2CQFpMPshcVfRFHIWx3pwJohRYKT40YF6FHZvsI4KT X-Received: by 2002:a17:902:a711:: with SMTP id w17-v6mr10019744plq.292.1526657503958; Fri, 18 May 2018 08:31:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526657503; cv=none; d=google.com; s=arc-20160816; b=Ib51nYUlVqEMzsfoNHN/zYp/U9454fVXaqx6tglcE9F3zMkAfycUamn1ZHpFNkpeYb gTrb0CS9MOsINXB3XbUnfrRsOmK1p1CvKJnd0wWpIMxqe7qKHP9h1fyszWX+ubZeIuQ2 OTNl6isaoL9uvlyTO9hXD6axhEPrEfHeiB8vpWYhMwPzWnl2DvfK7bWQ2wq5z+hb1o3r 24I8ahDi/UW8cQYaD/YZ6X+t+lHqWBxFVOE4YJv6Pnd84+uNB0EBVnhmDVNbkkKgKuxT DWasmxDss+vFy4+zSVpxKFinBJ22kW/TIF2QHXfZKa7j80yOBCdO9C1RnLrdlIDM14BK wpCg== 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:references:in-reply-to:date:cc:to:from:subject :arc-authentication-results; bh=8LD6LVm2quMqLLCYvmSiZPKmIyVfVQgEH4DpUt/eALg=; b=Cow0Erc30TSyy1xcWY/G22sZdKJQqUiE9aawKhnlpcc+QlzHCodkmaEirS4cPyZPLh JdXYsPVqnPAE7UB96D71SUVyNxEVDn8vKdBTYOU0wjF/JHEFzvFn6jDVshZ1FHayGIN0 FINEjLdXHxxwFRgs2rXUbpkffmEn+jy2yHX9YEXiLrfVHxSV+LWFd2k1O+CrbrThuIT5 muVASSH2WlMHCG68qdSCnwk8WLr14JZLC85NvpyDiG6QcLej5UMnIbcdsM1wM8P4o0wC +X1czmkkBU5qO+z6BodKp1uytjIp5QtseIiSJ5+5ix4F3r9ZU65DWRsw6O+coVuJMvMW iyLg== 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 w15-v6si6149657pgq.385.2018.05.18.08.31.29; Fri, 18 May 2018 08:31:43 -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 S1752139AbeERP36 (ORCPT + 99 others); Fri, 18 May 2018 11:29:58 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:37526 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750975AbeERP34 (ORCPT ); Fri, 18 May 2018 11:29:56 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4IFTbEP146186 for ; Fri, 18 May 2018 11:29:56 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 2j1yxk48e7-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 18 May 2018 11:29:55 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 18 May 2018 16:29:53 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 18 May 2018 16:29:49 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4IFTmHK4260102; Fri, 18 May 2018 15:29:48 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 509B811C066; Fri, 18 May 2018 16:21:01 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B70DD11C054; Fri, 18 May 2018 16:20:59 +0100 (BST) Received: from localhost.localdomain (unknown [9.80.88.24]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 18 May 2018 16:20:59 +0100 (BST) Subject: Re: [PATCH v2 3/9] security: define security_kernel_read_blob() wrapper From: Mimi Zohar To: Casey Schaufler , "Eric W. Biederman" Cc: linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, David Howells , "Luis R . Rodriguez" , kexec@lists.infradead.org, Andres Rodriguez , Greg Kroah-Hartman , Ard Biesheuvel , Kees Cook , Stephen Smalley Date: Fri, 18 May 2018 11:29:36 -0400 In-Reply-To: References: <1526568530-9144-1-git-send-email-zohar@linux.vnet.ibm.com> <1526568530-9144-4-git-send-email-zohar@linux.vnet.ibm.com> <74c096ca-1ad1-799e-df3d-7b1b099333a7@schaufler-ca.com> <87y3ghhbws.fsf@xmission.com> <1526643050.3632.127.camel@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18051815-0008-0000-0000-000004F7F77C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18051815-0009-0000-0000-00001E8C75AC Message-Id: <1526657376.3404.15.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-18_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=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805180170 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2018-05-18 at 07:58 -0700, Casey Schaufler wrote: > On 5/18/2018 4:30 AM, Mimi Zohar wrote: > > Having to define a separate LSM hook for each of the original, non > > kernel_read_file(), buffer based method callers, kind of makes sense, > > as the callers themselves are specific, but is it really necessary? > > Could we define a new, generic LSM hook named > > security_kernel_buffer_data() for this purpose? > > If there are two disparate behaviors wrapped into kernel_read_file() > Eric (bless him) is right. It should be broken into two hooks. I think > that if we look (too) carefully we'll find other places where hooks > should get broken up, or combined*. My question is just how important > is it that this gets changed? Other than the LSM call in copy_module_from_user(), this patch set is adding the LSM call in kexec_load() and firmware_fallback_sysfs(). Eric, the question remains whether we need distinct LSM hooks in each of these places or can we have a single, generic LSM hook named security_kernel_buffer_data()? Mimi