Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp403758imm; Wed, 17 Oct 2018 02:01:31 -0700 (PDT) X-Google-Smtp-Source: ACcGV62HSghJ3di0cMw9VbPx3tYTbTUQAmFibcdy838T7e0ikcLGvW3pI5kPnILFuB8K2OmJLrZM X-Received: by 2002:a62:d808:: with SMTP id e8-v6mr12815170pfg.103.1539766891003; Wed, 17 Oct 2018 02:01:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539766890; cv=none; d=google.com; s=arc-20160816; b=TojmJ8AQEcEv9KPZuyupVCpF+iiXBPJ9LNWm1tESHpbwY5W+PFQiYt6odrE8CM1xEs g7cYj98MV0YjYx4222lDi3yI05v9vdXxHn1h6SHagx8SRNMQ4z0ggGLhbBK1kwcnGhr3 gf05FTLgzdMVxaGMJmYQqOzSUDyHiKuW8tOSEDzcNYufhX1eYRL42nq9B//GYy8vIGRq ItpfXm3RfnYVADY7PyjuK+9GsGVY2DC90dkLRGWRdTAJ67U12hg7+E6vzasPt/3w65yN M1NPkxMavN/Ho3drf9VGsnEE3biNNCkmZgxIIBnSMepjpNlluoyCrA7wSPlsfM96BT31 dz3A== 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=A2ZYBizhZZZdKFcPGR4+xoM96vAX9n/aBi8/fwI1XUU=; b=o7wW3zqGWKqgOT3isQCppXwtTN156SrzMhKUhXM8woEn2cVB36PYctrTojd728dhYG haNAq+mZWZrhgcJN5vKsG/Ts5lQwIoGXYco44Un+WjQas5hPq2XHOtEgvju/Mzm/MLAL rAcc7K6GrmsVfBIvLxQV18gIMTIqw6hIb3Ckd9fOHvW7gA9ydoqeR074hQPXyeRvZpLL BNyuj9hGfzSGFdMAFfDF9iJTWZ6WCYFMASHRlx6nLZhPZg9cCedd2ie5E0O7yyrmg2p8 Gmi/0JutBNniUnpAdufiDl2KJpriaXsxRnIg4K8Di09XwycZVh3aaurWpmNozPlFls1i bSfw== 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 k33-v6si17271595pld.151.2018.10.17.02.01.15; Wed, 17 Oct 2018 02:01:30 -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 S1727305AbeJQQxx (ORCPT + 99 others); Wed, 17 Oct 2018 12:53:53 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:46059 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726714AbeJQQxx (ORCPT ); Wed, 17 Oct 2018 12:53:53 -0400 Received: by mail-qk1-f193.google.com with SMTP id m8-v6so15970977qka.12 for ; Wed, 17 Oct 2018 01:59:11 -0700 (PDT) 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=A2ZYBizhZZZdKFcPGR4+xoM96vAX9n/aBi8/fwI1XUU=; b=tS8TA88Zji3+nA9ySDohq+hNTAJlhmCQi6AKhMqXoC9J+tXcHVVSArBgWazfKDS5wk sb8D47xS2adHDVIZU5CX4svusjjJIL78jHTUppfdr4OuiPs/qWedOoh72Rr1pOgMoIXP q9ZaUUTND/bRETpMGTbVtChUSrFbfwXtzpHUlMIlEkKm9sX3CNmy0zUsVHq1+MCmtdF6 tsswempvlnsfRY/kCsNvjK/Kw5LydEadXITy1hu1xMEQAlAy3d9PIwEeKCXhh1HdmZxt /k+h+dDw79chfIkyW8Uv2bMNlWkmIpBdIUYScgxOVK679lj77ckwTThe9YDkOUAHe+tt ikTg== X-Gm-Message-State: ABuFfoi0fsYAxVesAm+6mOaLhQkzzkrQfx/44cv/RSnm5rdr/wd74Mlk nrJR2OgQL+DkZJRxRcIc/DyCkuDt2LI1sayH3f8= X-Received: by 2002:a37:4116:: with SMTP id o22-v6mr22539285qka.107.1539766750657; Wed, 17 Oct 2018 01:59:10 -0700 (PDT) MIME-Version: 1.0 References: <20181015221629.13924-1-stefan@agner.ch> <20181016084416.GF30658@n2100.armlinux.org.uk> In-Reply-To: From: Arnd Bergmann Date: Wed, 17 Oct 2018 10:58:53 +0200 Message-ID: Subject: Re: [PATCH 1/2] ARM: copypage-fa: add kto and kfrom to input operands list To: Nicolas Pitre Cc: Russell King - ARM Linux , Linus Walleij , Stefan Agner , Hans Ulli Kroll , Joel Stanley , Linux ARM , Linux Kernel Mailing List , Roman Yeryomin 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 16, 2018 at 10:43 PM Nicolas Pitre wrote: > On Tue, 16 Oct 2018, Russell King - ARM Linux wrote: > > On Tue, Oct 16, 2018 at 10:00:19AM +0200, Linus Walleij wrote: > > > On Tue, Oct 16, 2018 at 12:16 AM Stefan Agner wrote: > > It's not obvious yet whether this is right - it contradicts the GCC > > manual, but then we have evidence that it's required for some GCC > > versions where GCC may clone the function, or if the function is > > used within the same file. > > Why not getting rid of __naked altogether? Here's what I suggest: > > ----- >8 > Subject: [PATCH] ARM: remove naked function usage > > Convert page copy functions not to rely on the naked function attribute. > > This attribute is known to confuse some gcc versions when function > arguments aren't explicitly listed as inline assembly operands despite > the gcc documentation. That resulted in commit 9a40ac86152c ("ARM: > 6164/1: Add kto and kfrom to input operands list."). It's probably worth noting that the minimum gcc version for compiling the kernel is now gcc-4.6, which I think does not suffer from the gcc-4.5 bug that triggered the change. See in particular commits 9c695203a7dd ("compiler-gcc.h: gcc-4.5 needs noclone and noinline on __naked functions") and d124b44f09ca ("Compiler Attributes: naked was fixed in gcc 4.6"). The first one made sure we don't inline these functions, so gcc-4.5 no longer runs into the problem even in the absence of the workaround, and the second patch reverts that again, noting that gcc-4.6 is fixed. I don't see anything wrong with converting the functions to not use __naked at all, but I think we can also just revert the original commit 9a40ac86152c to get it to build with clang. When I last played with clang on arm32, that's what I did. I'll reply with the patch I have in my randconfig tree. Arnd