Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4305250pxb; Mon, 8 Feb 2021 13:01:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpBbAfKmCcUAGTJ0OEi9rUV4lM5bbKhf8oLuOsZdUaqb8tDa1TVC5axGKAm0cF8eHWmV4S X-Received: by 2002:a17:907:1607:: with SMTP id hb7mr7817047ejc.265.1612818118199; Mon, 08 Feb 2021 13:01:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612818118; cv=none; d=google.com; s=arc-20160816; b=jzWGM0MOiB4ZlV+Gc8UtD34sLr50GKIH61AKTBlLSHgyDiyo9Vbrj/W3vHo/P3Naqb YjzGTnmXm4beGrnTdtzCA9B0xcCeZbAw7ECBLV0HLuiJOmRcKgUfrmoO41BRb2tsOFJf mdw/ACR3PAkH1hn1MSdYR6IOszhPKmW/w1dZSk0s8bqFsX2izFDcaaY2BjFPJ4dz2AuX fUd6wGgJyJLyCrDicDqj+ozRmzqSHoXtRY29vp8efmFg4hBUnN1aicFJzCEPbLuZa6Sr O0vuM06s8jaanO9omm1ugrJ+9L3EZYW0LD/eWom4aF6enHYzD2QOhpc3RmDrXoLtqr3e gxFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=MLLsJOPUX5aC5wPkAZgeTUlSqwoaRJCYi5u/Gu9Lyu4=; b=up+cLtW/Z6QKKng1ceqRF8XT/qYZ3biZA6vtZGwg1gR1R6J1BlImcwyP35+LvTp1Ok Ip6CtaXJO5MjxNvWc7AMHHPw4gH7i7rCKzBFcNtUgfHBvV7qBYiATkdqFTI25koxaBcy WHRY7Jem8kZD0TrKfq0SnjKwO7/bXAarJ4Izf3qHcmq+XlETEYj0FKOoNBcs6fb0wgIc AUGpiYNLegjeu+0ofJLxqV+UHNLucwYOfIVMeqaEncOEXhvUmN0LBTuzQC/aWaWeeHDd xcl9kNzbMOXnkYSAGjOHn7xZke5jQK8zAqAGrTnRYULxcJiR/Rc+smvKlG+GoRnGAIiO oZGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=j20s4Z1n; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i24si11547553ejz.419.2021.02.08.13.01.32; Mon, 08 Feb 2021 13:01:58 -0800 (PST) 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=pass header.i=@alien8.de header.s=dkim header.b=j20s4Z1n; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233449AbhBHVAg (ORCPT + 99 others); Mon, 8 Feb 2021 16:00:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236436AbhBHTtj (ORCPT ); Mon, 8 Feb 2021 14:49:39 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A338C06178B; Mon, 8 Feb 2021 11:48:59 -0800 (PST) Received: from zn.tnic (p200300ec2f073f00132389f64ded89c1.dip0.t-ipconnect.de [IPv6:2003:ec:2f07:3f00:1323:89f6:4ded:89c1]) (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 82CA81EC0516; Mon, 8 Feb 2021 20:48:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1612813737; 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=MLLsJOPUX5aC5wPkAZgeTUlSqwoaRJCYi5u/Gu9Lyu4=; b=j20s4Z1nZxUMIW4Emy6zOTMhJS+Xcv5dR20kO53dQqDMjCNNDTkNdDLIKPjBdy0I7OAcvH qCppIT7lV0+u4OOJveK2lU/0X+HWSI+7IcRzU0HqTj7rUbn6tT9F57SbEPLGVY1cnpwBgQ aZzuKYY7ZAMsOTAcYe/u7IMVKwUM220= Date: Mon, 8 Feb 2021 20:48:54 +0100 From: Borislav Petkov To: "Yu, Yu-cheng" Cc: x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin , Weijiang Yang , Pengfei Xu , Michael Kerrisk Subject: Re: [PATCH v19 06/25] x86/cet: Add control-protection fault handler Message-ID: <20210208194854.GI18227@zn.tnic> References: <20210203225547.32221-1-yu-cheng.yu@intel.com> <20210203225547.32221-7-yu-cheng.yu@intel.com> <20210205135927.GH17488@zn.tnic> <2d829cba-784e-635a-e0c5-a7b334fa9b40@intel.com> <20210208182009.GE18227@zn.tnic> <690bc3b9-2890-e68d-5e4b-cda5c21b496b@intel.com> <20210208185341.GF18227@zn.tnic> <0e0c9e9d-aee1-ad1e-6c63-21b58a52163f@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <0e0c9e9d-aee1-ad1e-6c63-21b58a52163f@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 08, 2021 at 11:23:18AM -0800, Yu, Yu-cheng wrote: > exc_general_protection() and do_trap() both call show_signal(), which > then calls printk_ratelimit(). You could've done some git archeology and could've found abd4f7505baf ("x86: i386-show-unhandled-signals-v3") which explains why that ratelimiting is needed. > For example, if a shell script, in a loop re-starts an app when it > exits, and the app is causing control-protection fault. The log > messages should be rate limited. I think you should be able to get where I'm going with this, by now: please put a comment over the ratelimiting to explain why it is there, just like the above commit explains. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette