Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp317196pxu; Wed, 25 Nov 2020 04:07:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJwtG57Plh/dWtc6yQdSV+NGlGnNsf2yNL5bWvBJTwYD16IK+9jEmEdH7szxG+dUtbDCHKfp X-Received: by 2002:aa7:c358:: with SMTP id j24mr3154116edr.265.1606306058575; Wed, 25 Nov 2020 04:07:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606306058; cv=none; d=google.com; s=arc-20160816; b=Cz1eKOwUIr1/k7d19MvHPbQkWeS3i2Lsr6ul2GfAQVgpVl0l3eGamuuGpwfG6uw6ha +XDPtjo0+u0I7Ak7s5CKFqh1b+WJ6nykqmrEzBfLN/DRSCUJzwnDLdzGbsuu0AjJ8mUi LB7KQrFpaxdDwfzlH7inOurtpSzG2kIDti1qGvQP4nj/ug8FA1G97abfOsli8cYvAIhE I36Kj2rUnS9VbXHhJt0WR5uMVOVWh+/xEPB2UVMnyVTCrABxOGWouAzu1xWZy+JiQybt L4t2SxQ8WlYLoSaIfN9Tr9x6sfvwYjcuPwqu0mczW4MsAiEdlEeD5JUls4G62KZr5ue+ Znfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+5FUjWxpOQ9zrCued6q8VeN9WGm6VgBFm9lfLrKQbsk=; b=NGsZzQhWtdAm5nu+r1r4kFHJWD60T+txsY5SVB7Ziy8J5Gh17ilNokEFYUj6Aih6qu HnR+P/l/05BxAlSHlGfKgyFHBhiWMg+xolNCfFleOJbVATVumapoeLOnjwyyoEPIAF1A 12OSfAuellUL+ZWLMXuN89DbqE80RirhodbhatBSGQcoMGdyFLp96wKvnOXEgk3GcOSZ myOoY0/0EdX4BT/gYEV+aOCbt4w9aD78+UoC7TqB0otLwC/GlVpO/uW6oYXp+AN2i9Lp lQrnzghF+agwe2fxHF9lCBk4xvrtwf9NWZUWEHJjHmTy/ELsWPB37k8+fctiIkhb/ruj e2Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=R0rjGOpo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z2si227113edq.112.2020.11.25.04.07.12; Wed, 25 Nov 2020 04:07:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=R0rjGOpo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726357AbgKYMFC (ORCPT + 99 others); Wed, 25 Nov 2020 07:05:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725876AbgKYMFC (ORCPT ); Wed, 25 Nov 2020 07:05:02 -0500 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D14EC061A4E for ; Wed, 25 Nov 2020 04:05:01 -0800 (PST) Received: by mail-lj1-x241.google.com with SMTP id s9so1984318ljo.11 for ; Wed, 25 Nov 2020 04:05:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+5FUjWxpOQ9zrCued6q8VeN9WGm6VgBFm9lfLrKQbsk=; b=R0rjGOpoCeLCagqI1sJ83TnqIgosI5MW9SQKWqklodjOkP6evlnIvgzzl4Or4JHdIC ibygpDOJBwvnUP0hCqyfLx/pBm0AKminSD0QrcXq7U0wHG9ghmO21aNF/pizF0LkDBbc biBzU/fnTR4ezxv16GJRfgs/RjTrW+M8lahOQ= 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=+5FUjWxpOQ9zrCued6q8VeN9WGm6VgBFm9lfLrKQbsk=; b=Eo+yt5mbp9JAEi7hqN0XubYCHy8VJVD8+7WtpknXz7x+ZPpe6RwBS/n+EGrqAO87Xv g9yQt3qQ6EOeLA8G+N0OEWkZ7ysqe6lq/y/7bQb55CWS+GEDIAwKW+ZUdbLMy9sf7pzG JsCHwLfBp+aNdSHfAsnZAOArrYuUcuh380oroySd1QATna5XJiH+2ba3AHBxPHWu2m4a dc0Ok9J8CKdickJ1rIoTLTAp8OEhK2STMG2Kpd2wRzgfHpS3UWN6y0JbidQPH9HULamd +6rv7yhhmSIm7R8/UvovPXAW6serj94Lzwqa/MCKT7wn+iudhlvwcWG1NyhHqGRZ5XqA kZ+A== X-Gm-Message-State: AOAM531sbNrdsq8s6zbTJqL9ni+0gtiS7BMEvbEvOBTm02UcDJY7mYWx XnRunG4glL2BoYjPKp/x6MkCRnkcT2HImtrhjhCN3Q== X-Received: by 2002:a05:651c:285:: with SMTP id b5mr1280770ljo.82.1606305899970; Wed, 25 Nov 2020 04:04:59 -0800 (PST) MIME-Version: 1.0 References: <20201124151210.1081188-1-kpsingh@chromium.org> <20201124151210.1081188-2-kpsingh@chromium.org> <3b6f7023-e1fe-b79b-fa06-b8edcce530de@fb.com> In-Reply-To: <3b6f7023-e1fe-b79b-fa06-b8edcce530de@fb.com> From: KP Singh Date: Wed, 25 Nov 2020 13:04:48 +0100 Message-ID: Subject: Re: [PATCH bpf-next v3 1/3] ima: Implement ima_inode_hash To: Yonghong Song Cc: James Morris , open list , bpf , Linux Security Module list , Alexei Starovoitov , Daniel Borkmann , Florent Revest , Brendan Jackman , Mimi Zohar Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 24, 2020 at 6:35 PM Yonghong Song wrote: > > > > On 11/24/20 7:12 AM, KP Singh wrote: > > From: KP Singh > > > > This is in preparation to add a helper for BPF LSM programs to use > > IMA hashes when attached to LSM hooks. There are LSM hooks like > > inode_unlink which do not have a struct file * argument and cannot > > use the existing ima_file_hash API. > > > > An inode based API is, therefore, useful in LSM based detections like an > > executable trying to delete itself which rely on the inode_unlink LSM > > hook. > > > > Moreover, the ima_file_hash function does nothing with the struct file > > pointer apart from calling file_inode on it and converting it to an > > inode. > > > > Signed-off-by: KP Singh > > There is no change for this patch compared to previous version, > so you can carry my Ack. > > Acked-by: Yonghong Song I am guessing: * We need an Ack from Mimi/James. * As regards to which tree, I guess bpf-next would be better since the BPF helper and the selftest depends on it