Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1156965pxb; Sun, 22 Aug 2021 07:38:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxb9ktAtgouqX52NmcOE41++BANJT2xR/pGxN0uLifwTjKnsUqXNmElp6PF4jvi30cNdSCW X-Received: by 2002:a5d:898f:: with SMTP id m15mr23307083iol.188.1629643119870; Sun, 22 Aug 2021 07:38:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629643119; cv=none; d=google.com; s=arc-20160816; b=z8ohN1hpSLw/VPfrirhNXMnbpLq+8xIzo3UWxSqUbMNuv0ZqiElaw+ESK2JPW+tR+i gPGOV934rf0s/Ynzdwq1q19fNWvJsgx61gjrFeeIBFJMkLJPA3VJZkEBJRZYT8Q/jVsy NcLh+iNJ49BMiXE7M4wPwY2/azVt2JVZsVZNIfHSPQT01kzScolDTpEkDFkkGHfSe5hM yQu9yeU9hIyNh5qimZG884DgTzYJF9UJQmRdkCjiTOeMIfDFTdB62gA1G3n/kbsLFXDV n87dwdKJnWNWVCFtpkWtYAi44Bg8PSh1g2DxL32j7O3rLeVVCM0mmyX11Q++vz6o7hAD XHBQ== 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=xSosRj+gN6K6/WaqvzcoxmyNJvtEyhrgOWDYMQsCGNo=; b=Nxp1uefHtZevX/yCmSwHOvQ212CnUeziTW3sdHvI0YY1dZY8re9esQwdHU1BDhtTas N6dEvXA+bfW3lDJPwWBJQYCCvWz6b+829Nl3NaFbk7rHY8lqCDRfGaeatzZVglpjIio3 ejI7VV+jJUXV5m9F6JRAQA5C8Z4GXQPh1Zk9IuE3euHLupdlvsUTglj8sY4UnetS1k8E 1LO/IiA5tvds8Pj1agm0JgPFUyOejQoN1P0E6rkf/xGsPeBWf4jf5/fkh9d3udP6VpyS wsRs/IW/NBvQtWyB6kL0Tla2rgI8M6b7k3RIDH/0k5gs38XTZVzjrABvc3FDEAzbMBzo w0Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=JMU3snee; 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 o1si11260781ill.7.2021.08.22.07.38.28; Sun, 22 Aug 2021 07:38:39 -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=pass header.i=@alien8.de header.s=dkim header.b=JMU3snee; 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 S234003AbhHVOg5 (ORCPT + 99 others); Sun, 22 Aug 2021 10:36:57 -0400 Received: from mail.skyhub.de ([5.9.137.197]:39498 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234043AbhHVOgy (ORCPT ); Sun, 22 Aug 2021 10:36:54 -0400 Received: from zn.tnic (p200300ec2f2da100ab464a00f653617a.dip0.t-ipconnect.de [IPv6:2003:ec:2f2d:a100:ab46:4a00:f653:617a]) (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 0F2BE1EC04F0; Sun, 22 Aug 2021 16:36:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1629642968; 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=xSosRj+gN6K6/WaqvzcoxmyNJvtEyhrgOWDYMQsCGNo=; b=JMU3sneeIbjx/sVlruL4kgrKGsIdwixSJQb56941V6UwFAyS35rn/iiVoZVPy07EWOiCDB sJYERF9Yt09gmU1/vgn2UEqp2ryQ1S/j6eyetpP9F3giSwZAJX9pRJwwX4fGgHl3f/g6fG glBv9rZOqxxoCg6Ja0zyweOK2wwXs7s= Date: Sun, 22 Aug 2021 16:36:46 +0200 From: Borislav Petkov To: "Luck, Tony" Cc: Jue Wang , Ding Hui , naoya.horiguchi@nec.com, osalvador@suse.de, Youquan Song , huangcun@sangfor.com.cn, x86@kernel.org, linux-edac@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] x86/mce: Avoid infinite loop for copy from user recovery Message-ID: References: <20210706190620.1290391-1-tony.luck@intel.com> <20210818002942.1607544-1-tony.luck@intel.com> <20210818002942.1607544-2-tony.luck@intel.com> <20210820185945.GA1623421@agluck-desk2.amr.corp.intel.com> <20210820202346.GA1623796@agluck-desk2.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210820202346.GA1623796@agluck-desk2.amr.corp.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 20, 2021 at 01:23:46PM -0700, Luck, Tony wrote: > To recover we need to have some other place to jump to (besides the > normal extable error return ... which isn't working if we find ourselves > in this situation) when we hit a fault covered by an extable entry. And > also know how many machine checks is "normal" before taking the other path. Hohumm, we're on the same page here. ... > Bottom line is that I don't think this panic can actually happen unless > there is some buggy kernel code that retries get_user() or copyin() > indefinitely. You know how such statements of "well, this should not really happen in practice" get disproved by, well, practice. :-) I guess we'll see anyway what actually happens in practice. > Probably the same for the two different addresses case ... though I'm > not 100% confident about that. There could be some ioctl() that peeks > at two parts of a passed in structure, and the user might pass in a > structure that spans across a page boundary with both pages poisoned. > But that would only hit if the driver code ignored the failure of the > first get_user() and blindly tried the second. So I'd count that as a > critically bad driver bug. Right. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette