Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4789301ybb; Tue, 24 Mar 2020 05:26:55 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvKA4/Pb0rHj00driV7TAZKXnhgdNfQKdlQs2KdIPHyeX7IbxTReuqcuHYKYqzxoP8eoE1t X-Received: by 2002:aca:5e0b:: with SMTP id s11mr2984483oib.111.1585052815789; Tue, 24 Mar 2020 05:26:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585052815; cv=none; d=google.com; s=arc-20160816; b=sMZN4QYpap915CU9HUa2JHSIZg7QPW4ggjqS66u73gctusFeDqSHFvmMk6gn+kupbN iKnzvbzCd8zdexM+87sK6YeKGP/fTJyLnZk4CVSMiHEubuRfFvUoBIzHe0c2S3JLtn7l eKvcaUhtMExa4u7BQYcFovC99VCsMEzVDSvM4S76unMtUw2f9sQAgzF83vQ74ALSxDBo GvYkjpiLyMU7Ef+vUx5nTubKyj6sXloGWg0gRU4L1jQzv0Ecs58KgbCSweCFmXYOwlJ6 Y/hBkELZ6EZDF4D7wCQRzENugleN6QuviggggHpbxmCI9E94Y7qoyOLHPjzZqUhbs9HP HQsQ== 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=EvmDuxiEfERPSqBbso520E6sI1h5GzZBXkFBzhDHVnA=; b=cMSZZB10+767hfTdIVCpmWOLPhlthaO7FTKgOgtGeU/rW3EwfB4IAXacGJIa09wTF/ 8HuJYwnjQ94nNZz61YuwvdAtfeYt0b7/iKTicZGsyawIrhze720/1ebMdSxovu5fKJE0 m9BfG7g9Mi19xDS92MN59Xjw7sFz5xjnIkES6Pik4i9E3szqwmuyeCzPko0I+lO9N97m eHfNdqIsR47Wv9iiS2dU2k3Yg9rk0NxlR7+6GzgU85ae2qFXG3bndOe88/1qZrQaOg5v 57vlje5D9kQSBOWGYJ2a5KnxHIWEw3hXaE5W3zfcccqHPcrL+CH35Nq0D2e6yAYpKlTk 8hTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=mqdDvsTw; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w25si9652860otp.288.2020.03.24.05.26.42; Tue, 24 Mar 2020 05:26:55 -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=@alien8.de header.s=dkim header.b=mqdDvsTw; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727492AbgCXM0M (ORCPT + 99 others); Tue, 24 Mar 2020 08:26:12 -0400 Received: from mail.skyhub.de ([5.9.137.197]:43740 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727405AbgCXM0M (ORCPT ); Tue, 24 Mar 2020 08:26:12 -0400 Received: from zn.tnic (p200300EC2F0BC80031BBC3D65DB1D839.dip0.t-ipconnect.de [IPv6:2003:ec:2f0b:c800:31bb:c3d6:5db1:d839]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 7F95F1EC0CE5; Tue, 24 Mar 2020 13:26:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1585052770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=EvmDuxiEfERPSqBbso520E6sI1h5GzZBXkFBzhDHVnA=; b=mqdDvsTwQjUWDIGUcDr1DDVg2lETqWtz3WNyWw2T2a3b972zUndoX8/EZ5tLo8wz6sw9Dt ooEZq3SMDFphzGwWef0Lm+gzciAX0HSEW9cXFwSfkLbKVPEAVazrY/D+a4LFzWX9C3AEcA wxv2bno1sT1nuVZQT8tlUNuANNQccgc= Date: Tue, 24 Mar 2020 13:26:03 +0100 From: Borislav Petkov To: Thomas Gleixner Cc: LKML , x86@kernel.org, Paul McKenney , Josh Poimboeuf , "Joel Fernandes (Google)" , "Steven Rostedt (VMware)" , Masami Hiramatsu , Alexei Starovoitov , Frederic Weisbecker , Mathieu Desnoyers , Brian Gerst , Juergen Gross , Alexandre Chartre , Peter Zijlstra , Tom Lendacky , Paolo Bonzini , kvm@vger.kernel.org Subject: Re: [RESEND][patch V3 03/23] vmlinux.lds.h: Create section for protection against instrumentation Message-ID: <20200324122603.GD22931@zn.tnic> References: <20200320175956.033706968@linutronix.de> <20200320180032.708673769@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200320180032.708673769@linutronix.de> 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 Just typos: On Fri, Mar 20, 2020 at 06:59:59PM +0100, Thomas Gleixner wrote: > Some code pathes, especially the low level entry code, must be protected s/pathes/paths/ > against instrumentation for various reasons: > > - Low level entry code can be a fragile beast, especially on x86. > > - With NO_HZ_FULL RCU state needs to be established before using it. > > Having a dedicated section for such code allows to validate with tooling > that no unsafe functions are invoked. > > Add the .noinstr.text section and the noinstr attribute to mark > functions. noinstr implies notrace. Kprobes will gain a section check > later. > > Provide also two sets of markers: > > - instr_begin()/end() > > This is used to mark code inside in a noinstr function which calls s/in // > into regular instrumentable text section as safe. > > - noinstr_call_begin()/end() > > Same as above but used to mark indirect calls which cannot be tracked by > tooling and need to be audited manually. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette