Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2148pxb; Mon, 8 Feb 2021 13:26:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJwI3wuD28whVeylh6i9y/x/Ga5bambHcwZt3AarD2N10hqcrPoumtZt81QDRvCyfoMGMZ/+ X-Received: by 2002:aa7:d888:: with SMTP id u8mr19171507edq.239.1612819588448; Mon, 08 Feb 2021 13:26:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612819588; cv=none; d=google.com; s=arc-20160816; b=E9Yh9tbOm/biZ30icg8K4l4yIYatodK4B1O85aKATl1uXFCU5fxrNZTdFHoLqhxu1/ QgLZ7UmqqmOFuPDt+WqCIJFOI5JRSWz0Wo3SiVqeKg3wnuO//nIWQjm26fjKcxpcphpq zUKSm46YXmLd0j2IaXOd+9pdw6VVAkFLdUMu6BDeOQY1ysQoWlYUOY6f8irKW1X7IZNR ogD89A7xkADXiRvrHchCMrZGDihwAu9QQeqAnKLSilPsU5xthqKItEjO7g3ZMCLiE0xQ QRZ25XbvlhRt+ve9T0943TD5W77uFOn9pNvmkqicQmoSTY2DzjPDfgxjGeV20L0M9m4p m0zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=PKetlmDy3yjjLM6gdKHEUbtWcg4O0OKloN8jWAWCjw0=; b=P6JrVsbCoNdYtPjFZpXxWHp/VsDfb4k2A2oIRvOBusyU9OsM5yNHo7fHBQTMsyvW36 4oCdmzxK1yEb4jXuNlc8mtZ5Wqco//ZlzsqQ7fX6RQEUoqVXLVGipYJlruidfojfSVef 7acDjCpovy49oaqz5h5UjLguxZCjeVE/cmlKHEaeJaPzGqTx3kIeGjVkIsqSNgCMxrxV /AQX6WcZDcBt//mP3S2WZinLfSlsEubHESKRioa2jQzxsrK8/0SJpOOaRKW/WjPzLki8 b1ZrRiY5om8lA9vYah2yC2ohKfFNzvPyIT061WiWPLaKQTHn3Wd6VZCvI0V3T8xQvuOm zxww== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p16si11018119eja.521.2021.02.08.13.26.04; Mon, 08 Feb 2021 13:26:28 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236667AbhBHVXM (ORCPT + 99 others); Mon, 8 Feb 2021 16:23:12 -0500 Received: from mga11.intel.com ([192.55.52.93]:26309 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236599AbhBHUMT (ORCPT ); Mon, 8 Feb 2021 15:12:19 -0500 IronPort-SDR: /2UpJp6CCowbRitHjeLFTPCOKK5ar+DwkpPiUpRwTJZd/YqgecYhafHP3bbJh11R89zyTwwT2N PonpbnHMdbVA== X-IronPort-AV: E=McAfee;i="6000,8403,9889"; a="178262980" X-IronPort-AV: E=Sophos;i="5.81,163,1610438400"; d="scan'208";a="178262980" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2021 12:11:36 -0800 IronPort-SDR: FvGwoSxWRzF4E22TLsPk5Oq5ub9aCuUNYVsQ16qDvTKMmDkANo5/BNExWtb6eKkve17QuOBXbk Inp+fnpUwetw== X-IronPort-AV: E=Sophos;i="5.81,163,1610438400"; d="scan'208";a="374625160" Received: from yyu32-mobl1.amr.corp.intel.com (HELO [10.251.11.33]) ([10.251.11.33]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2021 12:11:34 -0800 Subject: Re: [PATCH v19 06/25] x86/cet: Add control-protection fault handler To: Borislav Petkov 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 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> <20210208194854.GI18227@zn.tnic> From: "Yu, Yu-cheng" Message-ID: Date: Mon, 8 Feb 2021 12:11:32 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210208194854.GI18227@zn.tnic> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/8/2021 11:48 AM, Borislav Petkov wrote: > 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. I will add that. > > Thx. >