Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3862914ima; Tue, 23 Oct 2018 12:30:14 -0700 (PDT) X-Google-Smtp-Source: ACcGV63geln2Q3xOb0V8FSpzfllRIjwlQxK8tNTNTxxdOmd9ldmzpzvuLYlNguPvpGakr7yYBYbL X-Received: by 2002:a65:56cc:: with SMTP id w12-v6mr24701822pgs.224.1540323014106; Tue, 23 Oct 2018 12:30:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540323014; cv=none; d=google.com; s=arc-20160816; b=Wpa5VzjsOavqJGsCmea0iGgM6DXB0nJCjaYKe6W4SorOwCCiaep5FMjZWeeeIT4+kH mZp/EKp0QGN4Q0l06yCn0Fpqcm6CpRUhEZEd9wwq0bm9cq/JeTzKNUSXMcOHI5UDIByW CH9MRoMCMSC/aQWMpsS+pRXy5xD7FMyBqyXr9knQjosJ4hWAB6e4e6PInJsSPhQ1nynP Kufy4+h0nsHBoVbJVMDUdFYNZWFukBBjgALNBTixKQRAnyTd3fkGB6qLX2cEqIwFi9ge yaMnUfhkl/lgiQQpmgNBi3vM+WphAMyJmyk+B0JNmFpr/I86kHPZrUCfiAHt8jWHAviC gDsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=hSulT86UqYEbFD96gDsF4McsOX/UG0DNds7+jVQGeTs=; b=EuyS7Knjvrt2Vg9W7FzUggWayX6uoMAjp8HNfvzEjWvK7cTAEKUAtzuxybaTQhlInx j+8q+2+UEHoFnsShNnLy4LcKBazg/j78ltsPJOFgBRq1I3wZ0WoTVTjMYbSRruW1OhEc k1BNTbfVvTrKWcJelxTRYKaqp3frtw1THfHPmvmjj2btF6HYkl9EP/CUCtm6T8jzPX+V NrRyNmKXMal7WJK8gXTJz4ENj+YYRDqCYv8Nyt6/98bRHBa26sUyPNa7ZPIQwv4WMUGa QrGBCeORfhFnZh4vzRLXSRgjp5Xq7rNi7AQ/0XGSNzX0sGDj5xtQzpU4NdVyTHc/vKxu nqDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fehhl6PC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w14-v6si1931215plq.327.2018.10.23.12.29.58; Tue, 23 Oct 2018 12:30:14 -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; dkim=pass header.i=@chromium.org header.s=google header.b=fehhl6PC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728938AbeJXDxi (ORCPT + 99 others); Tue, 23 Oct 2018 23:53:38 -0400 Received: from mail-yw1-f67.google.com ([209.85.161.67]:43638 "EHLO mail-yw1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727758AbeJXDxi (ORCPT ); Tue, 23 Oct 2018 23:53:38 -0400 Received: by mail-yw1-f67.google.com with SMTP id j75-v6so1038438ywj.10 for ; Tue, 23 Oct 2018 12:28:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=hSulT86UqYEbFD96gDsF4McsOX/UG0DNds7+jVQGeTs=; b=fehhl6PCscdXtPlJ0oF82wVrgAkh3/mzAuZ7n2kECTGwDjG+FnasRIOzg+o3k6fss9 ngBmvCYmDOT29nfhdmaK2UoqgjyLK4SvrKRZb1bXvtAqADk388JVeSZPzAQ6i/3TaQCl 92yF+8ix1/ch3Jvr8MxeGafjNwM+/q43WmBKo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=hSulT86UqYEbFD96gDsF4McsOX/UG0DNds7+jVQGeTs=; b=Lt/QCt7yBY0+gkCW7OdTaUOEIC1mbKDccjSNqOcm5sfHudmidSiClC1OtFDl839pkN jqutEVvxgK0kcfGNpFVLGIzjtj65f/waznYOoP6DiArPZZKHZG1BW0YPiSwbE+ilcSRA EeIqmZHRKkKuRgqGidRWBAzj7lG9/5HHvYIv8pkyonUUql3W/T5Ds2/Uicau+pehtpQ0 aHiMuWHNBobIhPK3nKy8Osi6gG4zaVkqV49Gp+R3Cz2NjuEL2ongqbF8Ok12SRWs465B at5f2mpkQRFlNz5u0bLiZFygCFdZOALmzZG2np34fd4tEoELBp6Zfn5pwHVUW01fIj3b gCPQ== X-Gm-Message-State: ABuFfoglUIBb9vBopiyd4uj5/B+aghgZC1kmwNFoGBE8yFBjl1Z4bZtV slPMbrqnQZOgqsUlaYzwlXnbsrdl+I8= X-Received: by 2002:a0d:f606:: with SMTP id g6-v6mr36755339ywf.235.1540322931747; Tue, 23 Oct 2018 12:28:51 -0700 (PDT) Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com. [209.85.219.177]) by smtp.gmail.com with ESMTPSA id p7-v6sm1080258ywd.75.2018.10.23.12.28.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Oct 2018 12:28:50 -0700 (PDT) Received: by mail-yb1-f177.google.com with SMTP id d18-v6so1065755yba.4 for ; Tue, 23 Oct 2018 12:28:50 -0700 (PDT) X-Received: by 2002:a25:ac8e:: with SMTP id x14-v6mr9730627ybi.141.1540322930009; Tue, 23 Oct 2018 12:28:50 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:3990:0:0:0:0:0 with HTTP; Tue, 23 Oct 2018 12:28:49 -0700 (PDT) In-Reply-To: <20181023111450.31837-1-efremov@linux.com> References: <20181023111450.31837-1-efremov@linux.com> From: Kees Cook Date: Tue, 23 Oct 2018 12:28:49 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] security: fix documentation for the socket_getpeersec_dgram hook To: efremov@linux.com Cc: James Morris , "Serge E. Hallyn" , Eric Paris , Paul Moore , John Johansen , Catherine Zhang , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 23, 2018 at 4:14 AM, wrote: > From: Denis Efremov > > The socket_getpeersec_dgram hook was changed in the commit > "[AF_UNIX]: Kernel memory leak fix for af_unix datagram getpeersec patch" > (dc49c1f94e34). The arguments @secdata and @seclen were changed to @sock > and @secid. This patch updates the documentation accordingly. > > Signed-off-by: Denis Efremov Reviewed-by: Kees Cook -Kees > --- > include/linux/lsm_hooks.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h > index ae3766720264..a598e601ccb3 100644 > --- a/include/linux/lsm_hooks.h > +++ b/include/linux/lsm_hooks.h > @@ -861,9 +861,9 @@ > * the IP_PASSSEC option via getsockopt. It can then retrieve the > * security state returned by this hook for a packet via the SCM_SECURITY > * ancillary message type. > - * @skb is the skbuff for the packet being queried > - * @secdata is a pointer to a buffer in which to copy the security data > - * @seclen is the maximum length for @secdata > + * @sock contains the socket structure. > + * @skb is the skbuff for the packet being queried. > + * @secid: pointer to where to put the secid of the packet. > * Return 0 on success, error on failure. > * @sk_alloc_security: > * Allocate and attach a security structure to the sk->sk_security field, > -- > 2.17.2 > -- Kees Cook