Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4966901rwb; Mon, 31 Jul 2023 15:46:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlFI56XppwSX/AiaOdQG+Dgv+55VV7TIGKieuZ58IaB2Jk2ONSVXPewjuoBP1e7U77EK70kS X-Received: by 2002:a17:906:5a63:b0:988:7d68:9fee with SMTP id my35-20020a1709065a6300b009887d689feemr845810ejc.34.1690843563964; Mon, 31 Jul 2023 15:46:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690843563; cv=none; d=google.com; s=arc-20160816; b=YAJnletIS6M6V8EPr08x1sLi6tzXj5dsCdiyK+smufZXtomI03hj7AhEjjdDDHjHHW LE4g8gXJkO8BIeUvPuIL3I0R7P5yIFKWHGF6yNR1goCV0pNjEg6U4Eiq/L6vR/kAqD4M c7bumcUQAkJShXem/S6VYkP53Tc1e8NyDDgsKfWdr/OoM1o99kjFocSOG+TEAS3qJk5I +2HH6t9F7AQaXRpwwXyAjI9zaMKG1hCKmROg7YEjEIxOVDfwrglUxIseoTS1RTDZ3gDb vHIYgVKhrkkgxyEmX6yg48Q6xsvwtXM9XJRNznZs1kC0V1X4VrNB6N8A+L2aK8mftP+p uyfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:subject:cc:to:from :message-id:date:dkim-signature; bh=mr0jsvWUvhK60xhRYuC+cetlUrcr4WSBsNOHSmk9+vU=; fh=f0hF6H9K5lK8HZ/uevEuRoN+eA/KS+lTVOh25l5scdY=; b=l59PJTuHdRAdXDrCQbLo42XFXQlvOK7ToU6imQ7r8iW5+pL4If9CIVaWtqfj8SNARL IBuzTEwq1MUxVL2RtZji+cBmBOKG71/ezwnpnIWpdWrldGA+DTif4OXSVtP1Mk/BB34y /2P5uFLc8x5Uz5bTE5/iPo2H/q34rrxanONVzaL5EzSxcQidtoGPeJKPuzHjtXU1r7xl Jvm77pTqqAmnw8Sf5xUJVaiPjjDAlHPA/GEayTzwRVJyITccF+EKdgjbd6WXiE3t28QU Bvn7MttPT7/sAPl/8HFKbmy5T1ePwcZ66SAVas9S076pRXGMRLAmiY35q1ujw9xGx7lc pb+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=gXAc1coI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l9-20020a1709065a8900b00991f9e2a81asi3875611ejq.238.2023.07.31.15.45.39; Mon, 31 Jul 2023 15:46:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=gXAc1coI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230186AbjGaUHn (ORCPT + 99 others); Mon, 31 Jul 2023 16:07:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230046AbjGaUHl (ORCPT ); Mon, 31 Jul 2023 16:07:41 -0400 Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CA478F for ; Mon, 31 Jul 2023 13:07:40 -0700 (PDT) Received: by mail-qv1-xf31.google.com with SMTP id 6a1803df08f44-63cffc0f95eso24315476d6.3 for ; Mon, 31 Jul 2023 13:07:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1690834059; x=1691438859; h=in-reply-to:references:subject:cc:to:from:message-id:date:from:to :cc:subject:date:message-id:reply-to; bh=mr0jsvWUvhK60xhRYuC+cetlUrcr4WSBsNOHSmk9+vU=; b=gXAc1coIwIN3PBRpnTQWF+PlcWrr/GrP0Ju8QynMdyi64D4U70xjy2963/b/rm1yUi Ou8ZBrdBDdyfSyMiikY0XnraaBLp+o4VJZWi8aA2hB+E9ck6DWbL3AhPE3iD9m7m+Ua4 XiTb5hbqCmNnm5bR21cjSewo2smZEWr0VZB++f5oLJM9M1xybb90XiqCOY4/qfxxE0kf e1gnaCU3AfjhwkZn0bNfemuRmGupe1AUMCrJ8nLZUk5NhoLB1ucSTPekozbswQWJo7xz EkJDGX9IA49yTflowLelifhC5Y0B8bQMyIh4G1OtNNbJLTYq/U7mynhiZJscbKIvmj8N Gr0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690834059; x=1691438859; h=in-reply-to:references:subject:cc:to:from:message-id:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mr0jsvWUvhK60xhRYuC+cetlUrcr4WSBsNOHSmk9+vU=; b=fyXnN8CIe0JhuNVTEOlWbX2YRjNXrNqpy8rnUW/yucMqUAUOrGy7Im46TuLBOEuXWv JbYyfPsyIhMWk5fR6pq00lNOKxufpmvbNyf4I2bj0zylHOvwntfD1fgv/0soD21dSk6z C7ToaJ36UlS59cN0NTFBnLgrapIwGywxDY39mRqY5AEZ9wzQQ9ORcWP8kc8TTJpQiN07 WpNOwPmGqUreNuQZMzU0AjOCO6y4+C+knr03eSF3QjQ/X7JCdtbAsw2Hk7uHitwaJjIa Ijhl9YLrnBsX7UAeRSJiPdeHj6/5NFyNCGscOQvtfMMkORO5i3g7hcxGWJ3FEhkFipXD ORxQ== X-Gm-Message-State: ABy/qLYKD9ilxaRVtb8q2JWGKeLBanUuoKHFJGJwOeck8KWDEI8Cjqok Uk5Z1f1onBZsSfiC/COt7CPA X-Received: by 2002:a05:6214:ab4:b0:63c:ec3a:ad71 with SMTP id ew20-20020a0562140ab400b0063cec3aad71mr1762770qvb.11.1690834059579; Mon, 31 Jul 2023 13:07:39 -0700 (PDT) Received: from localhost ([70.22.175.108]) by smtp.gmail.com with ESMTPSA id h13-20020a0cab0d000000b0063d1f967268sm4100870qvb.111.2023.07.31.13.07.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 13:07:39 -0700 (PDT) Date: Mon, 31 Jul 2023 16:07:38 -0400 Message-ID: From: Paul Moore To: Khadija Kamran Cc: Alison Schofield , ztarkhani@microsoft.com, James Morris , "Serge E. Hallyn" , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] lsm: add comment block for security_sk_classify_flow LSM hook References: In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Jul 31, 2023 Khadija Kamran wrote: > > security_sk_classify_flow LSM hook has no comment block. Add a comment > block with a brief description of LSM hook and its function parameters. > > Signed-off-by: Khadija Kamran > --- > security/security.c | 7 +++++++ > 1 file changed, 7 insertions(+) Thanks Khadija. I did make a small change to your patch (see below) when merging it into the lsm/next branch. > diff --git a/security/security.c b/security/security.c > index d5ff7ff45b77..ffc5519e49cd 100644 > --- a/security/security.c > +++ b/security/security.c > @@ -4396,6 +4396,13 @@ void security_sk_clone(const struct sock *sk, struct sock *newsk) > } > EXPORT_SYMBOL(security_sk_clone); > > +/** > + * security_sk_classify_flow() - Set a flow's secid based on socket > + * @sk: original socket As has been pointed out previously, there is a double-space between "sk:" and "original socket". > + * @flic: target flow > + * > + * Set the target flow's secid to socket's secid. > + */ > void security_sk_classify_flow(struct sock *sk, struct flowi_common *flic) > { > call_void_hook(sk_getsecid, sk, &flic->flowic_secid); > -- > 2.34.1 -- paul-moore.com