Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp318606ybb; Thu, 28 Mar 2019 03:13:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqygP2HjM/GuA0wjpX0Zs/XBBUE0x6dksksOsgtk8qN3X0+j1f8WbFj48FOTEoQ0u5F0Gx4L X-Received: by 2002:a62:1d0d:: with SMTP id d13mr5642042pfd.96.1553768028908; Thu, 28 Mar 2019 03:13:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553768028; cv=none; d=google.com; s=arc-20160816; b=yyQJChd+RbvdoEWMhwU5y8ESlXWTTIoZVhED4FnRjeNA/rj0nWjJYlp3/pzHMxJp43 lpR2HZdXxeiC9Cr8n4AO+RFlOUg5kCj8SbXnbEZnWrt5FbC3Qt5+as2xOKhn6IV4/V9Y JD9X7Qjb4l/TTcNcKz0cEWC7jgZYMvAvIGc8U7jdUjienz1MbmcEnQeTZd2ZEVwFtsmn aC4cfHIKCskYauED7YFjudAqlzEZSAgBLuwtj2DSikRjKG5eLttFd+8xrgovGJXXn7Yp gP3n67UutwsYr5hEXQQFtqiFcxkmJ4stJpnmD8N0xtag6y/zGz5mv6coOTjqFkc2ymTV Tv8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=jbRa2okEDxmjl92M4cewO+xLFHpHaQp15qwM8cuy5eM=; b=DNVC4xcvGs/KGPpypncqoXlFk8zIzIRu/26oleynETZoeyzHRfhtvHZhaDoQ9sx5Tw fjh+TCC3OEb1lFMLQahqZd/PDsBCXHk+08iJqpEnpDay5axrFd7wQfMhL/qAE5ypOUNl R4ow62sgcdw3ieNvYWaPDfi7I6gNAlSjYnBF+Jaiv6RAp2gjURcN4vy6zhbufrpQDO08 QEo4tIII3HGZMjdOGuHjQ+F8vYEaMwU/HtePnXo4k7oMjcCFAozjM1jTXG5rVoOMukQb jRM8ai3a/kfZDjLc9Hf2WZAXb/B5e1ZySRNL51eSfAWF32TtGJNBAVSZLjl0jYbh4hKs k1gQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b125si21374385pfb.242.2019.03.28.03.13.32; Thu, 28 Mar 2019 03:13:48 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726839AbfC1KK4 (ORCPT + 99 others); Thu, 28 Mar 2019 06:10:56 -0400 Received: from mx2.suse.de ([195.135.220.15]:36112 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725853AbfC1KK4 (ORCPT ); Thu, 28 Mar 2019 06:10:56 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0E91DAD25; Thu, 28 Mar 2019 10:10:55 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 68F14E1404; Thu, 28 Mar 2019 11:10:54 +0100 (CET) Date: Thu, 28 Mar 2019 11:10:54 +0100 From: Michal Kubecek To: Florian Fainelli Cc: David Miller , netdev@vger.kernel.org, Jakub Kicinski , Jiri Pirko , Andrew Lunn , John Linville , Stephen Hemminger , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v5 19/22] ethtool: provide WoL information in GET_SETTINGS request Message-ID: <20190328101054.GE26076@unicorn.suse.cz> References: <7580e650-565a-a7e2-35cc-6cce1c3f5ba6@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7580e650-565a-a7e2-35cc-6cce1c3f5ba6@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 27, 2019 at 08:42:26PM -0700, Florian Fainelli wrote: > On 3/25/2019 10:08 AM, Michal Kubecek wrote: > > > > + data->privileged = ethnl_is_privileged(skb); > > Is not this potentially creating a time of check/time of use issue? Can > you check for ethnl_is_privileged() at the time where you fill in the > reply skb? I'm not sure what kind of race you have in mind but if this is a problem, we might have even bigger one for any "SET" request where the privilege check is performed even earlier by the genetlink dispatcher (by setting GENL_UNS_ADMIN_PERM or GENL_ADMIN_PERM flag in genl_ops). Michal