Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5111346imb; Thu, 7 Mar 2019 08:01:54 -0800 (PST) X-Google-Smtp-Source: APXvYqyhKHeJzTOsG94HYnTIK9zBnv3g0Ba+y0Xl3LwLbSZ48gMmC9ztW0nJuKfUnHaTXmsXUyPf X-Received: by 2002:a17:902:8e8b:: with SMTP id bg11mr13185517plb.328.1551974514024; Thu, 07 Mar 2019 08:01:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551974514; cv=none; d=google.com; s=arc-20160816; b=sFii+TNqcQa260ufmpGV9j0V3+hlmG3Pg6ZaV3SK4PzACKzv+yZY6xGArzXzoX6FPz Y/ap/vFWARBBppaQr0Xf8ywwh1NAT0uTSce4E0COcp/KTGnFeGJThM2kNp6A5WYHXfPG 45qH/CaNNRwgECZg2NRfJQdJeCY+PM5csyVi88JAg70rrUxCl5day4/PvGDbBHH1mWw3 FqYBtTNo4hoiDucu+bmPYdN3V9nBCyZC5J1zJmfTBQUU4RqDrWbQ+vLgZHE6/ChJaIEO D5f+4PcacFKwS/zwcr20tQ9Nk2ITwt00llZKkR1Dx4zK/nyby664lXx3W+1XDnw9dYBa jhqw== 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 :in-reply-to:references:mime-version; bh=RUg+lYsZP7w962oQo6Vktz83Dw9cdj8a3+anhAM+t+4=; b=YDGqS9toVRjnhACyFF81RJnhXNnzlan1j4VJeIYsmH8k1m0LoMc4fFf3mGQUZ8p+fD HnqjRBON/6QgvpvwFjWWrCzVG/Cqv4Vv42zTnYehYCMeb6FN01dMAPPuvLvl8sSBe1rs S5N04hUMYPiO5o629jJUCKLfqG5l0U7mwXsR4V7ObJ6jPN7cJrmGxFDCfqLptiM1XfeR v6np1jHCfQno6bOXMkMT2iP0nhsPyiVHKnUZE2NwzFEx8eMUFUwzpS1GQYyY+eEcrm84 qjATq3LS6Mb06pD4xa8xgt7GWqZpZqzPAIq5tFoDKRS+EOwq1IDsyfgNmm1HBZ+9AA1Z +32w== 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 y33si4134520pga.134.2019.03.07.08.01.37; Thu, 07 Mar 2019 08:01:53 -0800 (PST) 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 S1726297AbfCGP7k (ORCPT + 99 others); Thu, 7 Mar 2019 10:59:40 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:36485 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726700AbfCGP7i (ORCPT ); Thu, 7 Mar 2019 10:59:38 -0500 Received: by mail-qt1-f194.google.com with SMTP id p25so17649051qtb.3; Thu, 07 Mar 2019 07:59:38 -0800 (PST) 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=RUg+lYsZP7w962oQo6Vktz83Dw9cdj8a3+anhAM+t+4=; b=JavWXzMi0UzMCn1wkrHU8k22jgHZUpiCgstlcPJo2qzdpdLg7y7PmMOyX1yBzOM3pT +ViMhaXLE8EBRho3yUlx89ZZLwLZMyXEB/D/GvjBWFeRSJO1UOrGVa3uZrB4hgUJiVvS 2kMILw2kYZtirbzzWcyx1BFLWHHVNJRmhhsDcSHcK0cB0PAc90P3LTdkds3vrkUVZog3 VayBdpPVceGEnw1lcpTF7dPCeNAGh0TNHoMjuU8neY2O/msNvS9E+8tcp+d5lRCPRZ1r +eQzB5MDGYGQnI02OeDnnNK3QuiN5Oldr1hS2yXf5dkwvF1EZ28oIehUAWZcotoPBssk 7Xkw== X-Gm-Message-State: APjAAAU7C6ENK1i100gaBoYqy7hkKCuhIYj0hH0qCtdzl3tv+p2uG8Ab Cb0q58g0UHMrqUG8ne5S04wQVsD5vYXE/CWtjkE= X-Received: by 2002:ac8:2bcf:: with SMTP id n15mr10364282qtn.96.1551974377813; Thu, 07 Mar 2019 07:59:37 -0800 (PST) MIME-Version: 1.0 References: <20190307093408.3425010-1-arnd@arndb.de> <20190307100605.GA20309@unicorn.suse.cz> In-Reply-To: <20190307100605.GA20309@unicorn.suse.cz> From: Arnd Bergmann Date: Thu, 7 Mar 2019 16:59:19 +0100 Message-ID: Subject: Re: [PATCH] ethtool: reduce stack usage with clang To: Michal Kubecek Cc: "David S. Miller" , Florian Fainelli , Jakub Kicinski , Jiri Pirko , Nick Desaulniers , Kees Cook , Wenwen Wang , Ilya Lesokhin , Pablo Neira Ayuso , Edward Cree , Networking , Linux Kernel Mailing List 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 Thu, Mar 7, 2019 at 11:06 AM Michal Kubecek wrote: > > On Thu, Mar 07, 2019 at 10:33:35AM +0100, Arnd Bergmann wrote: > > @@ -2533,7 +2535,7 @@ static int ethtool_set_fecparam(struct net_device *dev, void __user *useraddr) > > > > /* The main entry point in this file. Called from net/core/dev_ioctl.c */ > > > > -int dev_ethtool(struct net *net, struct ifreq *ifr) > > +int noinline_for_stack dev_ethtool(struct net *net, struct ifreq *ifr) > > { > > struct net_device *dev = __dev_get_by_name(net, ifr->ifr_name); > > void __user *useraddr = ifr->ifr_data; > > Is this part really needed? AFAICS dev_ethtool() is only called from > dev_ioctl() which is in a different compilation unit so that > dev_ethtool() won't be inlined anyway. No, you are right. I had accidentally left this in place from an earlier version. Sending a v2 now. Arnd