Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp4050871ybn; Fri, 27 Sep 2019 15:40:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmYNn9q+0MwcsWoWnuDmkHwqPfCDCgBP/7im+AOAhsJPWOEm0bJMLbYQ1KtV2lainrHeg5 X-Received: by 2002:a50:b884:: with SMTP id l4mr7231748ede.295.1569624015275; Fri, 27 Sep 2019 15:40:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569624015; cv=none; d=google.com; s=arc-20160816; b=aa8jc/LAaAW/92OidH5PDLDY9sjg2hm6Eao8sDfzGECCJn23gJSG748oQMESIJ6xMW +4idHZPOnwfqUc4dnSwZsPjy40Wrvc7d5MRKNHaTfnb3qWkrqnTgowpfMbdFTqj+oKnC iV6D84k2cEdri5YyMeBny/eiNBJtWXT1OUyQ/CTAjXC7U9SxfxlZ5B1Ql70E8lgbpHO3 VsFEUQkUrNUf5xrVHlVp0jx5nx8mTePYgzzFM0mbHJL2gCR0IUrPi5LCumEXY8jP5/Pr p8z3RLwkXDrND6VJ0zGdrbTC5sjQZB3BJnOMkq5YtEh02ebY/RFvFAUbNO79UnXEnwOQ VYTg== 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=0iijkTNAwazlkcEPbWHD7/Pt6NR9/VHJLHxMEdKPkjs=; b=vj8rG2XxmQ2VJ2x0/N2wv0FgOfQeorZ/15ETnx3ZPiDgNntoGMgLSND4rTJyrBpPpF F/yLEFUfQcmfD4dFB4jxpfdgaBXs4v+0My9aJ9J2eexCv9BHXUwPD+VybRJp/6P6QgnO +W0uR5cb8spKTXCEOMbH16yx/t1Ms9H9oCplf14/O3Zm9zxHufnXtURFYsQKj2sMP1Xr tkEYqT3XRrbuQRR1OpLi7PYd8F1jF+r23mhbqXdXI4cHqLa8/0H1OGf2NnC9ksX5KDXA xsqo47vL3SuCLA/Z117ue3+4h/jwuy/o4/bdw9VVvZQOlgRW8omISioLBAQgg7r+Rnzm oPtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=W4T7eFxO; 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 l18si3510890ejg.248.2019.09.27.15.39.50; Fri, 27 Sep 2019 15:40:15 -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=@linux-foundation.org header.s=google header.b=W4T7eFxO; 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 S1728410AbfI0WjH (ORCPT + 99 others); Fri, 27 Sep 2019 18:39:07 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:35331 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725306AbfI0WjH (ORCPT ); Fri, 27 Sep 2019 18:39:07 -0400 Received: by mail-lf1-f67.google.com with SMTP id w6so3045881lfl.2 for ; Fri, 27 Sep 2019 15:39:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0iijkTNAwazlkcEPbWHD7/Pt6NR9/VHJLHxMEdKPkjs=; b=W4T7eFxOsxAOhy+qoHNVBHbvWBZnkWvEbzx+5PVLryQsWZlsSjLj6GrpIRs9Pvsc4P uXgrUwtt+UFdta+Ixw2KIGOKyd88GrPA6t6bfUV6/KTqYQLQXhrgwSIapfQh+TP/7tF3 cAblA/InJlUZ+QeP1vKRt+lABmPCLOH+4cP0w= 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=0iijkTNAwazlkcEPbWHD7/Pt6NR9/VHJLHxMEdKPkjs=; b=FzpqlWu5PYX3nY5DpmV1BUNppQG4AtehN4Y5xgjsIrUxSXsP6pPhO4rxdMWVSh/R5h YUVcOvO60Arn616CDQIsOKyalDnH4+6+YNbff2ztL6/asELbDaDiSgkcLYtC7+rdFaHa 775MP21oOSck06X1HydCkWxIGFBvWaLvVGLRbWGRItEn0ZNvhkP5cLE8Rtx27+MQ/ggn kfCfPBllxK6H325+PuTjakGbHMEcocc/W1sVnDG0ER5TnS6Cpz6qc6vAda+SP4rPKkKk 6mprRSUWBI2acUuGA6brUxGTnaoHSF0+yye+fG0/J3asam8LPBop8lh5U8+21qMYFYGd DvEQ== X-Gm-Message-State: APjAAAUH+ZIiebmJqu/taV8W6mg3fSAA+pB3vVojKNz35jYmehH1r5L+ M5Chx0qHQZWG9Wlhk/jyLMlbrHB2eWk= X-Received: by 2002:ac2:59c2:: with SMTP id x2mr3942932lfn.125.1569623942844; Fri, 27 Sep 2019 15:39:02 -0700 (PDT) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com. [209.85.208.176]) by smtp.gmail.com with ESMTPSA id e29sm708848ljb.105.2019.09.27.15.39.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Sep 2019 15:39:01 -0700 (PDT) Received: by mail-lj1-f176.google.com with SMTP id m7so3985977lji.2 for ; Fri, 27 Sep 2019 15:39:00 -0700 (PDT) X-Received: by 2002:a2e:5b9a:: with SMTP id m26mr4417255lje.90.1569623940537; Fri, 27 Sep 2019 15:39:00 -0700 (PDT) MIME-Version: 1.0 References: <20190830034304.24259-1-yamada.masahiro@socionext.com> In-Reply-To: From: Linus Torvalds Date: Fri, 27 Sep 2019 15:38:44 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly To: Nick Desaulniers Cc: Nicolas Saenz Julienne , Masahiro Yamada , Andrew Morton , Ingo Molnar , Borislav Petkov , Miguel Ojeda , linux-arch , LKML , Catalin Marinas , Russell King , 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:08 PM Nick Desaulniers wrote: > > 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). Based on the error messages, the SO_PASSCRED ones are almost certainly from the get_user() in net/core/sock.c: sock_setsockopt(), which just does if (optlen < sizeof(int)) return -EINVAL; if (get_user(val, (int __user *)optval)) return -EFAULT; valbool = val ? 1 : 0; but it's the other messages imply that a lot of other cases are failing too (ie the "Failed to bind netlink socket" is, according to google, a bind() that fails with the same EFAULT error). There are probably even more failures that happen elsewhere and just don't even syslog the fact. I'd guess that all get_user() calls just fail, and those are the ones that happen to get printed out. Now, _why_ it would fail, I have ni idea. There are several inlines in the arm uaccess.h file, and it depends on other headers like with more inlines still - eg get/set_domain() etc. Soem of that code is pretty subtle. They have fixed register usage (but the asm macros actually check them). And the inline asms clobber the link register, but they do seem to clearly _state_ that they clobber it, so who knows. Just based on the EFAULT, I'd _guess_ that it's some interaction with the domain access control register (so that get/set_domain() thing). But I'm not even sure that code is enabled for the Rpi2, so who knows.. Linus