Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1459684imm; Wed, 8 Aug 2018 18:11:22 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwDa4RSoBY3D97+O0x+jtnD5Hzm1oGKT7LBv5FlZRzT21IysysrFd69TgISKBszSYl9fjVT X-Received: by 2002:a17:902:b28b:: with SMTP id u11-v6mr65990plr.2.1533777082692; Wed, 08 Aug 2018 18:11:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533777082; cv=none; d=google.com; s=arc-20160816; b=Jcc31hTZLreKatHIIrLRuwnfIVkz9hw3UnUswLZf3oq+zTKo+Y5EXo0gdFTlysYuI5 DUEgn32cFVX3nJmmFVqNQ4JFZfX9qtqqKYilOGDG6GXnPM6GfBMy+bPelshAIgA7KyGh a0Bi9P7DpWDxaoy73OKEx5jZkVcsTypkdm29Ph20pKxi/G+E8BjujJNR6XiEfzm4UsMr FQqe8Rdq1wzrWoiQoHJ+yNWsgIUn8UR4bf5LtvZegNkeYnzLg3Tqvvip9IYCQJqzglMw d+yIi3vVgj1KpbeX7yjWAilU5a0F+7vqTXbdkPcz8UvJOlUJDsrLynAgDZG9+F8x99GM I5+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:cc:date:message-id:subject :mime-version:content-transfer-encoding:from :arc-authentication-results; bh=xLyw00VMFNgkP+9XreT7owWH+bSME6Ibdj7FupbCNt4=; b=TS3lWkPF6uG+eYcHnOHT/1+9Omlve7SvZSOAV4zeDHJB5elHxAHr9642v8V1uJ1uiz ROZEJpYc4obgi21B1kRWgOcs1ifxNaQW/bOecIcP1j3zKwUIZdFe60BIMZ8/GhSi67tP s2yu07kc6zlLtlPwJ5q6cdEvFS1ra2Ll/wL3qP0ZnuQ02HowiA9idh9G2gfX64pEZlot hnPuHvYIJbUPI+CFE6mKbDCPzZsGqaOM5EOXb29oVSFXx8x9BVEV0fnwE8k7j8UXdugr 78Df2rU6OJQ4h/s1jTnqHgLH8PxMZOyPvG+Dq72hSUuZWU83DVbfiEvhUgyI0yrnVIbN NFDA== 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=vt.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 72-v6si5846296pfq.6.2018.08.08.18.11.07; Wed, 08 Aug 2018 18:11:22 -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=vt.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731904AbeHIDcc convert rfc822-to-8bit (ORCPT + 99 others); Wed, 8 Aug 2018 23:32:32 -0400 Received: from outbound.smtp.vt.edu ([198.82.183.121]:60168 "EHLO omr1.cc.vt.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731063AbeHIDcc (ORCPT ); Wed, 8 Aug 2018 23:32:32 -0400 Received: from mr6.cc.vt.edu (mr6.cc.vt.edu [IPv6:2607:b400:92:8500:0:af:2d00:4488]) by omr1.cc.vt.edu (8.14.4/8.14.4) with ESMTP id w791AJXI026580 for ; Wed, 8 Aug 2018 21:10:19 -0400 Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by mr6.cc.vt.edu (8.14.7/8.14.7) with ESMTP id w791AE2S001966 for ; Wed, 8 Aug 2018 21:10:19 -0400 Received: by mail-pg1-f199.google.com with SMTP id m25-v6so1823629pgv.22 for ; Wed, 08 Aug 2018 18:10:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:cc:to; bh=R5H1Fx3OoclB21wkN7PlwQ3/4Bcu29B6sqrY7mPcU+A=; b=ZXOTr9IhLu5XvBUJUkyvKvxkX5NQY7eZrwEDqQ/UutOYOVzwRY/p5/+99Bqvbk/m8w kvpOvYrQGZDMTkkLijgaumDWYfp9l5SEJ46bEJysA2OVd5S2Yy5NXaOUCK5isixj9Ifm tSeS36RmwJT5+6m8Gwysc/608LrKBN4oNDRjdmaQXMJx2pPNtstvcj/GGmL0ai8wMpvO 3SeNisNtn3WJZJrjWx0tislHCoR8SfpV1IUyxvOBt1psSXcxEjPmbJWFI35YH+2TqxxO LdIn7UIHS4beEOxW7LerkSelmq6AcR2bQ215Z/NpTO588yxJ6DSBrLu7qZlqzdv7Ev3H O+Xw== X-Gm-Message-State: AOUpUlGtHibIfAipjMhUQM+tRk75CvT2XjwGDr3nz4tfGgAMqH5GhD0m ji40YRKstPvya7k9aLYu48TxYnHOdiyzUufBN1HEx7D4FQex01jARANHVydvANOSHBLz1xfKUSQ owCha1KIzC0S/WVk86cl52/ekbHD6VnZ8830= X-Received: by 2002:a65:4c87:: with SMTP id m7-v6mr57645pgt.98.1533777014556; Wed, 08 Aug 2018 18:10:14 -0700 (PDT) X-Received: by 2002:a65:4c87:: with SMTP id m7-v6mr57628pgt.98.1533777014399; Wed, 08 Aug 2018 18:10:14 -0700 (PDT) Received: from ?IPv6:2607:2c00:4000:2:385f:4702:864e:3179? ([2607:2c00:4000:2:385f:4702:864e:3179]) by smtp.gmail.com with ESMTPSA id j5-v6sm6444980pff.139.2018.08.08.18.10.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Aug 2018 18:10:13 -0700 (PDT) From: TongZhang Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8BIT Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Question about inode_permission() check in unix_find_other() Message-Id: <91367B74-6AC5-4E14-AE13-30FF6A7A6592@vt.edu> Date: Wed, 8 Aug 2018 18:09:57 -0700 Cc: wenbo.s@samsung.com, ahmedmoneeb@gmail.com To: davem@davemloft.net, garsilva@embeddedor.com, matthew@mjdsystems.ca, willemb@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: Apple Mail (2.3445.9.1) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Networking Subsystem Maintainers, I have a quick question about inode_permission() check in unix_find_other(), I was doing a code review on net/unix/af_unix.c and found out that the inode_permission() check is confusing here. Since the unix socket is presented as a file, and will be permission checked by VFS when user open it, why do we still need the inode_permission() check in unix_find_other() anyway? Thank you, - Tong