Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp553805img; Thu, 28 Feb 2019 04:11:56 -0800 (PST) X-Google-Smtp-Source: AHgI3IYjoG6UfnQ3X7Uqe/cVpj1H0jwtM4np/rV9iS93KXJv7MBxgWka3FvuJwJFi+jgkE2pEpuI X-Received: by 2002:a17:902:bd96:: with SMTP id q22mr7688554pls.7.1551355916894; Thu, 28 Feb 2019 04:11:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551355916; cv=none; d=google.com; s=arc-20160816; b=ow93w+jaJ8rkMJhDzz1GjV5LGBzBIAF5H//ny0+Ayl//Si2x+x/hHoU/968ObJVAvV WIdSejCopTCM5vaIzXYjGgNrO/kQdvF8KJfYxpNOk66Zx3V+uBQAU+GTHlR/8wNdpPti mfXG82I4kbfDZ4E3egbHs/uMWy/WDycPxTCvqjP0WB26jQC/r+HZUR8YPGze15L/zO1n MiFZ8qrYtxUFOYIE9ARKVgT5046E7/T3ga2oEhX5pZkTm8TOGXiFmogLLx63fTxpRM6R npVzCvAEGTkYWqztIabhdeU+N7pSH7OMiXs711cgtk6HjI51usAmkXR5lAuqyTyYzlxw sTTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4pNEMp16Jt4auJyhzHscy3Z3Wjvd7nyXXu0OUJ7VnCU=; b=ae3PWG0+IlQoxFE4ZNf9yW1MQTuhOz4r2je4ouQY4NGEHUizaUZP6y8ancpw8tnJqA lmoIS9HAOlDVhBSOsa69oKJ9fJ5WJRo1US4pRo+WhbhVCk8yhxnvEe6Op85C0ZO4dykJ +DM0m4Jd05CrjLPDh/5HCOb86a8LIp1UcKoIvgcBbqVem+1sl5i6U5heHs4ZHqTvq1ku COwuC72J9EWzfb4u5zoQoYrSqDytmjqhNRMTmJ3VdBvO1ZALSbAWFLgZKx5BuLm43UV8 I9Tmt/F6RIuqegQ+VL2A1qzs1ZIqC9pxeBDfgeQ5/hPabgjKZUZOEpq8h4Jm8V9ZAFRP Rcrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=EZ5PfbUB; 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 v24si17284284pgn.306.2019.02.28.04.11.41; Thu, 28 Feb 2019 04:11:56 -0800 (PST) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=EZ5PfbUB; 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 S1731555AbfB1Kwl (ORCPT + 99 others); Thu, 28 Feb 2019 05:52:41 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:49492 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725934AbfB1Kwl (ORCPT ); Thu, 28 Feb 2019 05:52:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4pNEMp16Jt4auJyhzHscy3Z3Wjvd7nyXXu0OUJ7VnCU=; b=EZ5PfbUBrCuVPRFVFRBa01IJK J5921RzWTae10yuQlcNkjdpR5c1dwDoLzAC/rxjZfE3Ho5zumbwYJ6wQOn739znLKpvnbszI88Oyp VLZvJ0SK+6TXOXY+SjcbWDDd/4KabUQBcno2NWmijH0xuCpKnZXxrqZXWxAnuePDD/WMdpNF+tLYX JWFwnYeBfYk+LSLgnT1QGv16/KUNVqUZQWwBSEXmkhU2DNROKVnEhejdFcNokw2erccHfk9rMi2EY oU6TvyL62cjbrAwDEfAxHtKCpB2qqqHjDatui8ue9YQaejGx0djDXid0iSoiizTTmjOKBB1r0tM1k X+rDA05yA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzJIl-000819-Th; Thu, 28 Feb 2019 10:52:32 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 51D4D202CF60E; Thu, 28 Feb 2019 11:52:29 +0100 (CET) Date: Thu, 28 Feb 2019 11:52:29 +0100 From: Peter Zijlstra To: Dmitry Vyukov Cc: Andrey Ryabinin , Linus Torvalds , Thomas Gleixner , "H. Peter Anvin" , Julien Thierry , Will Deacon , Andy Lutomirski , Ingo Molnar , Catalin Marinas , James Morse , valentin.schneider@arm.com, Brian Gerst , Josh Poimboeuf , Andy Lutomirski , Borislav Petkov , Denys Vlasenko , LKML , Alexander Potapenko Subject: Re: [PATCH 5/6] objtool: Add UACCESS validation Message-ID: <20190228105229.GZ32494@hirez.programming.kicks-ass.net> References: <20190225125232.191698923@infradead.org> <20190227140830.GP32494@hirez.programming.kicks-ass.net> <19b35cb1-9527-2e15-6deb-9ce7c1ef1d66@virtuozzo.com> <20190227142623.GR32494@hirez.programming.kicks-ass.net> <20190227143313.GK32534@hirez.programming.kicks-ass.net> <20190227172816.GT32494@hirez.programming.kicks-ass.net> <20190228094008.GN32534@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 28, 2019 at 11:05:10AM +0100, Dmitry Vyukov wrote: > On Thu, Feb 28, 2019 at 10:59 AM Dmitry Vyukov wrote: > > I guess this warning originated for user-space where programmer does > > not define them and does not generally know about them and signature > > is not a public contract for user. And then for kernel it just stayed > > the same because not doing this warning would require somebody to > > proactively think about this potential difference and add an > > additional code to skip this check and even then it wasn't obvious why > > one will want to do this with these functions. So that's where we are > > now. > > Maybe asm directive will help to trick the compiler? So I went back and forth on the annotation; and we're back to the same we use for STACK_FRAME_NON_STANDARD() because that forces GCC to actually generate the symbol. Without that GCC IPA will go and wreck things by either making the entire symbol go away or generating partial functions. I'm currently doing a hard-coded list of names in objtool for this :/ But I'm having trouble with that alias crud.