Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp4021907ybn; Fri, 27 Sep 2019 15:09:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqy42m9bN/ZYFhHbs8YZn5nRMmPJUAsvcz3fEwiW+WSeUNdHxMoZR8FtB4b77p3fndNR+m2C X-Received: by 2002:a50:eb03:: with SMTP id y3mr7289868edp.194.1569622157822; Fri, 27 Sep 2019 15:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569622157; cv=none; d=google.com; s=arc-20160816; b=FYEB+/yIUwfiR5MA7dTGmabfxJvHC50E7OB8QCaMV3gePi/3vSvKv4+eL8Pv2cH7Ha pWEXipyry1hYfzqQnEy4lL/BtXHm/GBZ0spu/lseF7wroanFDX1NT0vBpCUChIzN5q8O g10OAEsaQ00SHLEPKV5bKTZIHd6jdQt0/bjFBV9/Ln0Q3VW4kFevvYEOPXcC8gMwvC7H huOPEPc1ceCKbhk7/dcoWbjxC+mp+WAc0KCKaUk2qiQvqhbUgDbtcxjwxKt8rAzhxiMc dx/0CYt59SUuJzhk5yJL9UkLs3XCd12evxEgEUQOSpkVl5Y6a6Xvdorz+DUegrhF99GE 9oBw== 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:dkim-signature; bh=QclGIxEt9wIwf/D5SYN1US1c97mZDr9iuEHzA7hulOc=; b=kvZVihuV6gdHA50czPtuQmWSemxw46jPM/9E8oB5X+15IiEDy2eBsme4/mN9FSwIOJ 2iJbO9E2DNtnhEp6YZLxRjg7fIJa/H8YGdBUMfGrHMTFuVgvc0b5O5Pyf8ILQV0o2TQX 0aFf72mYDFK+kSSudgJ3pjvL0MioVhJNCZPqxMbs+tgAuLhGiExU/0+Dtz4iIsbgn5c+ oDG3zc8YrHfK2Ahj2GGNnPrnUj+N71xzUSHFQp0Ks2rrbMuStePPytwnFHX0J60ni8G7 UPL0UgcjxDhYMKsuZndyqZ/inCKCvHOvbdYmFaQ4ddybf960SrMxUDwuTgmqjbfVHypg ku0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Nb7R0Uo8; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f30si2540289ede.435.2019.09.27.15.08.50; Fri, 27 Sep 2019 15:09:17 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=Nb7R0Uo8; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726408AbfI0WId (ORCPT + 99 others); Fri, 27 Sep 2019 18:08:33 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:32947 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726033AbfI0WId (ORCPT ); Fri, 27 Sep 2019 18:08:33 -0400 Received: by mail-pl1-f194.google.com with SMTP id d22so1597638pls.0 for ; Fri, 27 Sep 2019 15:08:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QclGIxEt9wIwf/D5SYN1US1c97mZDr9iuEHzA7hulOc=; b=Nb7R0Uo8kJGk6pIv8mrz1TSF1TwnUnKp1wVJGg+UdXj3D4RCiF7u0hawk91MqImsVQ aXOsqOPLeYFnReqiyQ5aiodoOy1ByH7GoAqSIQnAWjd3vltsjZpGQrhwiHnvTf3t5ydY ByIW8N6lJG+/BIIgWqYkHWAaGNaqGuOqzItiKEA0W/3HjdpA7vWsWT/JrXzybFhBg9Md 6SOQPxkTfGcqG3XTYKHzXLd5jP7fE1b7SNTfv1OHz42/1WJTIN175zJJXKcW6NREOiwh BDKoz5wf5mDQTuX9vJ8VdBQgWyjJzPyy7sHiwnV3VC0tN3MzbNCPWeGagWeCNBK/eE7w mFpQ== 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=QclGIxEt9wIwf/D5SYN1US1c97mZDr9iuEHzA7hulOc=; b=kLy/rTnf3dTiqhR30wP76NCBcuLVXpEQdLsYz1ct5kFGfUTX1jq03o/xMM7Z1yA1NR 9jjZczjrizhTYTNNH/kFhZksyfZuQx1/xMKPAk5hP4q2uWILe2IbaxId+CFNfHOChs0g dejsHNTLxr9FQR93G7aGd1hvFAToCdLvBsv54iTlFbAZ2OAE2i8uc4EhDTzAcWm5mxYS T3nZDVRvp+pXsrsizi+ciWQQ3A2HqMzJwpPcIOPoG+3WZJdZB2VQm86pVxf4bVrfOT2E MPNVLO9tL6z2XrDSwC9JsA/Fqotf8gmZjf9aBjb6rQlDWAHSgb8+rASvRhTZ33uTUnqZ hyJg== X-Gm-Message-State: APjAAAV4tZ6JOHUasHARfZYb9obgmt0bq1WD8wvHWU/lhZdQhV0KZzZe cwEJ6tY/m1KHaouy2eHjNVe5T1f5JKrDHd5abWNdmw== X-Received: by 2002:a17:902:d891:: with SMTP id b17mr6858867plz.119.1569622112129; Fri, 27 Sep 2019 15:08:32 -0700 (PDT) MIME-Version: 1.0 References: <20190830034304.24259-1-yamada.masahiro@socionext.com> In-Reply-To: From: Nick Desaulniers Date: Fri, 27 Sep 2019 15:08:20 -0700 Message-ID: Subject: Re: [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly To: Nicolas Saenz Julienne Cc: Masahiro Yamada , Andrew Morton , Ingo Molnar , Borislav Petkov , Linus Torvalds , Miguel Ojeda , linux-arch , LKML , Catalin Marinas , rmk+kernel@arm.linux.org.uk, Will Deacon , Stefan Wahren , Kees Cook 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 Fri, Sep 27, 2019 at 3:43 AM Nicolas Saenz Julienne wrote: > > On Fri, 2019-08-30 at 12:43 +0900, Masahiro Yamada wrote: > > Commit 9012d011660e ("compiler: allow all arches to enable > > CONFIG_OPTIMIZE_INLINING") allowed all architectures to enable > > this option. A couple of build errors were reported by randconfig, > > but all of them have been ironed out. > > > > Towards the goal of removing CONFIG_OPTIMIZE_INLINING entirely > > (and it will simplify the 'inline' macro in compiler_types.h), > > this commit changes it to always-on option. Going forward, the > > compiler will always be allowed to not inline functions marked > > 'inline'. > > > > This is not a problem for x86 since it has been long used by > > arch/x86/configs/{x86_64,i386}_defconfig. > > > > I am keeping the config option just in case any problem crops up for > > other architectures. > > > > The code clean-up will be done after confirming this is solid. > > > > Signed-off-by: Masahiro Yamada > > [ Adding some ARM people as they might be able to help ] > > This was found to cause a regression on a Raspberry Pi 2 B built with > bcm2835_defconfig which among other things has no SMP support. > > The relevant logs (edited to remove the noise) are: > > [ 5.827333] Run /init as init process > Loading, please wait... > Failed to set SO_PASSCRED: Bad address > Failed to bind netlink socket: Bad address > Failed to create manager: Bad address > Failed to set SO_PASSCRED: Bad address > [ 9.021623] systemd[1]: SO_PASSCRED failed: Bad address > [!!!!!!] Failed to start up manager. > [ 9.079148] systemd[1]: Freezing execution. > > I looked into it, it turns out that the call to get_user() in sock_setsockopt() > is returning -EFAULT. Down the assembly rabbit hole that get_user() is I > found-out that it's the macro 'check_uaccess' who's triggering the error. > > I'm clueless at this point, so I hope you can give me some hints on what's > going bad here. So get_user() was passed a bad value/pointer from userspace? Do you know which of the tree calls to get_user() from sock_setsockopt() is failing? (It's not immediately clear to me how this patch is at fault, vs there just being a bug in the source somewhere). -- Thanks, ~Nick Desaulniers