From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43DAAC43331 for ; Thu, 26 Mar 2020 14:02:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2246420748 for ; Thu, 26 Mar 2020 14:02:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727951AbgCZOCK (ORCPT ); Thu, 26 Mar 2020 10:02:10 -0400 Received: from ex13-edg-ou-001.vmware.com ([208.91.0.189]:50722 "EHLO EX13-EDG-OU-001.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727920AbgCZOCH (ORCPT ); Thu, 26 Mar 2020 10:02:07 -0400 X-Greylist: delayed 904 seconds by postgrey-1.27 at vger.kernel.org; Thu, 26 Mar 2020 10:02:06 EDT Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-001.vmware.com (10.113.208.155) with Microsoft SMTP Server id 15.0.1156.6; Thu, 26 Mar 2020 06:46:58 -0700 Received: from localhost (unknown [10.129.220.242]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 3112B40CAD; Thu, 26 Mar 2020 06:47:02 -0700 (PDT) Date: Thu, 26 Mar 2020 06:47:01 -0700 From: Matt Helsley To: Nick Desaulniers CC: , , Mauro Carvalho Chehab , Jonathan Corbet , Wolfram Sang , Kamalesh Babulal , "Raphael Gault" , , Subject: Re: [PATCH] objtool: Documentation: document UACCESS warnings Message-ID: <20200326134701.GA118458@rlwimi.vmware.com> Mail-Followup-To: Matt Helsley , Nick Desaulniers , jpoimboe@redhat.com, peterz@infradead.org, Mauro Carvalho Chehab , Jonathan Corbet , Wolfram Sang , Kamalesh Babulal , Raphael Gault , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com References: <20200323212538.GN2452@worktop.programming.kicks-ass.net> <20200324001321.39562-1-ndesaulniers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200324001321.39562-1-ndesaulniers@google.com> Received-SPF: None (EX13-EDG-OU-001.vmware.com: mhelsley@vmware.com does not designate permitted sender hosts) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 23, 2020 at 05:13:20PM -0700, Nick Desaulniers wrote: > Compiling with Clang and CONFIG_KASAN=y was exposing a few warnings: > call to memset() with UACCESS enabled > > Document how to fix these for future travelers. > > Link: https://github.com/ClangBuiltLinux/linux/issues/876 > Suggested-by: Peter Zijlstra > Signed-off-by: Nick Desaulniers > --- > .../Documentation/stack-validation.txt | 20 +++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/tools/objtool/Documentation/stack-validation.txt b/tools/objtool/Documentation/stack-validation.txt > index de094670050b..156fee13ba02 100644 > --- a/tools/objtool/Documentation/stack-validation.txt > +++ b/tools/objtool/Documentation/stack-validation.txt > @@ -289,6 +289,26 @@ they mean, and suggestions for how to fix them. > might be corrupt due to a gcc bug. For more details, see: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646 > > +9. file.o: warning: objtool: funcA() call to funcB() with UACCESS enabled > + > + This means that an unexpected call to a non-whitelisted function exists > + outside of arch-specific guards. > + X86: SMAP (stac/clac): __uaccess_begin()/__uaccess_end() > + ARM: PAN: uaccess_enable()/uaccess_enable() I think you meant to put "disable" here ^^^^^^ Cheers, -Matt Helsley