Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1448491ybt; Thu, 18 Jun 2020 08:55:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwa7MzYeecv/vS4hJZfDnqaPAHcJHMwbkJLdKknhJhQwpfmsZwmJ8ordkFWN7I3zUJOdAnn X-Received: by 2002:a17:906:4009:: with SMTP id v9mr4422365ejj.481.1592495749618; Thu, 18 Jun 2020 08:55:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592495749; cv=none; d=google.com; s=arc-20160816; b=sLUj4WhXI8LmAiE3g66Vso5JKR0bfw5z38+WOsk9FA/R6FibVYjWXxpXKBJfBSXLp9 EtXEWvedDrWJbe1v8HVtsAGlcsAnTUvJE34C9SeVvg+qgkRLrYlplA6ju8nTeiNAlRRV LyYmN1Br5W6xlpAV3vvaPxooCfmHStDlsmRtoxRze6hgOj11N5SaVOQqM7hIjuk5clKP u7v7Q3KIxiCsE6jvBZHcPijEqN+k651UlD24nYq/TvD1fPWFOBBUpwOkjVW5CHLE3UHc 9BOsihop31vY/SfW5OmGoggDYCgtaCsV9ldssfDtG0yE6JDP2zOt9HZMHovN6QoYKJ3C z6PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=c48CutJv253nONYa7jgn1n1NQC0LmTxC479+1FbSsxU=; b=ww2ugemSE3hZKC0f/2sAsZ5C/6RMIEPFUe7R6rKvhGmKZmx25shwOfwcLJ+EyqoAPR k+Qskm/Y73ZwgFkmFaUlMGU8hmRTNkiY309bEqGB94P0SVUWqa3PaIaEAojutjRP+jPA ih19+FPGhSPUitaF5RJUyPyvBN+Cwg0hIPCwTi1wzvR+xGO0o8adklVsisJ8lEnWEA27 Ot90pFKodnga5WrO/nLJZBXxyIh2Dx7R8XCOXE7Eo1XgO7sMDFCnzCvwr7SNEdfZxJQO UeV9+lHkwaodGI+CqT9oiepybX/yCpkUWwkUopd2evmvSSn/tzYPpPX56yOE/QX8mjDv UVAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ChWsS2pG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lh24si2035545ejb.700.2020.06.18.08.55.22; Thu, 18 Jun 2020 08:55:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ChWsS2pG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728699AbgFRPub (ORCPT + 99 others); Thu, 18 Jun 2020 11:50:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725829AbgFRPua (ORCPT ); Thu, 18 Jun 2020 11:50:30 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C60CDC06174E for ; Thu, 18 Jun 2020 08:50:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=c48CutJv253nONYa7jgn1n1NQC0LmTxC479+1FbSsxU=; b=ChWsS2pGgSMqMU16IY7YahlCii tSUQfCR7WvD8kU56LBgwQXLsCgjAFfgNA0R7YMua8n7CpXs+VaTB4hK3Sl14oThocYUkZkIsJf2CH jxtfr8VPTcDSxM9PyOInJEY1oJqzGzBzUCpI7Kjl7+xLGmMTmy3+3Xi8qiR1jyj+5opiNDX7/rV1U Pvdqj3oSxQ0bpL5xhsz9XdatxI8XB0H7LQxtdshW2bvaIZVvdY85aP1MwBgNu7TT48kqZFb6dVMop YVda4AwVvBuivwMrMJ312ae1rqIQzbztDr47A6kzch44QYQsLQYgkF8vR40w6Pl3NxnW6HRIiB1J/ lOI+4HuQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jlwnz-0008Ge-Tg; Thu, 18 Jun 2020 15:50:20 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 19E06301A32; Thu, 18 Jun 2020 17:50:17 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0B3A82146F52E; Thu, 18 Jun 2020 17:50:17 +0200 (CEST) Date: Thu, 18 Jun 2020 17:50:17 +0200 From: Peter Zijlstra To: Andy Lutomirski Cc: Josh Poimboeuf , linux-kernel@vger.kernel.org, x86@kernel.org, dvyukov@google.com, elver@google.com, andreyknvl@google.com, Mark.Rutland@arm.com, mhelsley@vmware.com, rostedt@goodmis.org, jthierry@redhat.com, mbenes@suse.cz Subject: Re: [PATCH 1/7] x86/entry: Fix #UD vs WARN more Message-ID: <20200618155017.GK576905@hirez.programming.kicks-ass.net> References: <20200618144801.642309720@infradead.org> <70455B9B-0952-4E03-B2CE-EEAE1E110C5B@amacapital.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <70455B9B-0952-4E03-B2CE-EEAE1E110C5B@amacapital.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 18, 2020 at 07:57:35AM -0700, Andy Lutomirski wrote: > > > > On Jun 18, 2020, at 7:50 AM, Peter Zijlstra wrote: > > > > vmlinux.o: warning: objtool: exc_invalid_op()+0x47: call to probe_kernel_read() leaves .noinstr.text section > > > > Since we use UD2 as a short-cut for 'CALL __WARN', treat it as such. > > Have the bare exception handler do the report_bug() thing. > > I think you should consider inlining or noinstr-ifying report_bug() > too if you want to make this more bulletproof. I admit the scenario > where someone instruments it and it goes wrong is farfetched. How far down that rabbit hole do we go? Because then we need to noinstr printk, the console drivers, those will very quickly pull in lovely bits like PCI, USB, DRM :/ At some point we have to just give up.