Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8035225ybn; Tue, 1 Oct 2019 02:04:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuJOqv2j6LpXsIgmh94aciFgxmWsMQ4NtUSCQsvK6MTfO15UnYAUh61Yzz+WrZXMp6C0Nt X-Received: by 2002:a50:8a9a:: with SMTP id j26mr24472939edj.251.1569920671984; Tue, 01 Oct 2019 02:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569920671; cv=none; d=google.com; s=arc-20160816; b=GOBPOkkm+MqmrdT/LIC2Pmm3B2Bs0t7iWXIMmYnZ5PoRgeov0sidoYah3RfHzGuM41 286XT8avCkrR4k2m664G65InznrDmraI69uc0dp52MmRKDbnsmytqFeAGUeXM5fiXyhS 95YAIjZ1ubQvyLTN7hPQuaBXdfOvXAbmynlCHzOLx2HiVQvypi/9WNNVoXgy66YqokcA XXTqhX3PT525L9TZLu+ULU1ym6ZYimHvdGYzgdqo0tn+WUJtYltVNzrtL92Ru9+H7/Jh U+GMmiwMMJB8sZGTmx4fCQBP1EVSQQFMeUowoRET+q4XE6EtA14L+4KxNarWneNUT68Y mFLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=Ys1PkxKdNmv3uxxoEyclNQK1iM88unal+Zs4ffa9D30=; b=oz9CCvULR57W06b/Rdzxg/7t4wBwGAnOq72mDcMlBeOma3H3pJX+q3MGC/ZO0xNNOy xW13z10H2LWDlG3liLeJPRt1wVG7HRr16qDRBLKN8aL6h+5jBbwnKanaiEPKrMpnfPqr MCsWmAiQtMLJ7taDeTssALYRsQLXbxIbngboZH6uKFF+AvsuYvznGLRhODQuCQbXfFKZ W58DH4ZZp/GHjDvztQbz4FJ4ZbiOH1ExaHOGPNN2SXHambERjGGyOyYldy4BkrqKMfP4 Q6aEARlsuaF7dDFzuHBulhsZMwukR8PILvMxN9MahYadqwTJ/ymygHamHFMx0TPiNjKx 5l9g== 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 h10si1649684ejf.371.2019.10.01.02.04.05; Tue, 01 Oct 2019 02:04:31 -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 S1733170AbfJAJDq (ORCPT + 99 others); Tue, 1 Oct 2019 05:03:46 -0400 Received: from mx2.suse.de ([195.135.220.15]:49114 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726568AbfJAJDq (ORCPT ); Tue, 1 Oct 2019 05:03:46 -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 53471AFF4; Tue, 1 Oct 2019 09:03:44 +0000 (UTC) Message-ID: <196a63271591fbe0bc1fdd5a1a01a25caf5178d0.camel@suse.de> Subject: Re: [PATCH v2] ARM: add __always_inline to functions called from __get_user_check() From: Nicolas Saenz Julienne To: Masahiro Yamada , linux-arm-kernel@lists.infradead.org, Russell King Cc: Kate Stewart , Arnd Bergmann , Enrico Weigelt , Vincent Whitchurch , Nick Desaulniers , Russell King , Stefan Agner , linux-kernel@vger.kernel.org, Allison Randal , Greg Kroah-Hartman , Olof Johansson , Thomas Gleixner , Julien Thierry , Linus Torvalds Date: Tue, 01 Oct 2019 11:03:40 +0200 In-Reply-To: <20191001083701.27207-1-yamada.masahiro@socionext.com> References: <20191001083701.27207-1-yamada.masahiro@socionext.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-1pzhYzFOaS2Q7mcGcHoY" User-Agent: Evolution 3.32.4 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-1pzhYzFOaS2Q7mcGcHoY Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2019-10-01 at 17:37 +0900, Masahiro Yamada wrote: > KernelCI reports that bcm2835_defconfig is no longer booting since > commit ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING > forcibly") (https://lkml.org/lkml/2019/9/26/825). >=20 > I also received a regression report from Nicolas Saenz Julienne > (https://lkml.org/lkml/2019/9/27/263). >=20 > This problem has cropped up on bcm2835_defconfig because it enables > CONFIG_CC_OPTIMIZE_FOR_SIZE. The compiler tends to prefer not inlining > functions with -Os. I was able to reproduce it with other boards and > defconfig files by manually enabling CONFIG_CC_OPTIMIZE_FOR_SIZE. >=20 > The __get_user_check() specifically uses r0, r1, r2 registers. > So, uaccess_save_and_enable() and uaccess_restore() must be inlined. > Otherwise, those register assignments would be entirely dropped, > according to my analysis of the disassembly. >=20 > Prior to commit 9012d011660e ("compiler: allow all arches to enable > CONFIG_OPTIMIZE_INLINING"), the 'inline' marker was always enough for > inlining functions, except on x86. >=20 > Since that commit, all architectures can enable CONFIG_OPTIMIZE_INLINING. > So, __always_inline is now the only guaranteed way of forcible inlining. >=20 > I also added __always_inline to 4 functions in the call-graph from the > __get_user_check() macro. >=20 > Fixes: 9012d011660e ("compiler: allow all arches to enable > CONFIG_OPTIMIZE_INLINING") > Reported-by: "kernelci.org bot" > Reported-by: Nicolas Saenz Julienne > Signed-off-by: Masahiro Yamada Tested-by: Nicolas Saenz Julienne --=-1pzhYzFOaS2Q7mcGcHoY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAl2TFmwACgkQlfZmHno8 x/6gYwf/bt9SGaahlMy9jzh92vkL0lR++WMTDA9czeLR9wbO/ccn+pzclxkdt2oV zHhrTCh5umkugXPLNKJAwZHfyBCnZ/r4Qe4RUrf4VLaQxHWNtNAhfSroI0213SXW xcpmbYWmgFuEkiCBC0WOUESteF78q5e6OXe8jExrj1BQIe4aOqaKHNSMJdkdrbyl Im1V51p0JSvVgJPDTZJax4gHko+Tq4/PTPXwCsxeRCu7ftC2eLk+TFFfxufsVAOw gTr0yr8wR+ekaeDayR1fp87Uz51u83A3/K0bhfTtcHHMykQwTUFijaYRHeAGd//G wV5Zsn+SQl3vKzQsrCieTubb54urkw== =6Yel -----END PGP SIGNATURE----- --=-1pzhYzFOaS2Q7mcGcHoY--