Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp6397140rwb; Tue, 9 Aug 2022 14:43:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR77VXbaJrMpC+IBxE02niZ1/WdyfbgoE6V/IKkLsZBaZc867tAl9A6sQdXUt6BYiEAzft+d X-Received: by 2002:a05:6402:4301:b0:43e:4d31:6ec0 with SMTP id m1-20020a056402430100b0043e4d316ec0mr24389730edc.69.1660081438037; Tue, 09 Aug 2022 14:43:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660081438; cv=none; d=google.com; s=arc-20160816; b=ZhejlSNjHwSuLfM+jU8BGwoXZCV9uVKa9lEOW1SGV1PbSvB0jZU8Oum9/GOpZxDtfH CsHn3jXRFONEExBeXbGiIOlSo1VdHjLGFTryG9b9wsHeJAt1BGwjshSCwCJ70IQIBZq5 hBvPV8OctlRsK4H/Yx7zmwi4esdpmlWKuBYNs3vY6DhM/kaehvy3prdGUQyiwpB2Jn5V 68AMepfur8Yrmx+shrk8UMzFC1/X/z3YffYLcuN1InL+00WgSeiLXDr7MLoEvj77ZWK4 F3A8Laq1aNHuKjiMgP32zkfYBAC73orAnepAR7zxLIwXp6P0lPC+WcsF2N+S1NKC+fjb BHnQ== 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 :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=XfvgfVcNDbuw/qij9sRknMfuSiI8Sx/L7ACRvFaSWzs=; b=fQyM/ouXKAq/gpp6Kk26p/zZ1doekJC2O+pCr/1p71PO9qy0eUyrzvHyb+Mntxc+9+ Z16+66SNMXSaLkFQM+Ac2DP9R0tbw7ALC7stkeaCdkjVC7jN2+1+01lfIoRDIO8RHK5P a2Zy4TDzFD7LVWL2nrG7/NVxzvq6RdIdtKeNLYtrKxa0keHN7+yb5XiUe45mOzjBzloX ZfnWWgPm2xAnl5hgh7Dx/9IhzBrKso5eqot+lWNV4XNffQtlIg43JklwEgMjFlDVY3Qf 37vlKFi5NvjWQMw6IegbOFZx8tt1DQ1kvjXM18uaDPczv/P7K9KUc/BS15usWhFS+pVY qg+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q22-20020a170906145600b0072b87c68bf1si2350603ejc.68.2022.08.09.14.43.31; Tue, 09 Aug 2022 14:43:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229638AbiHIVQa convert rfc822-to-8bit (ORCPT + 99 others); Tue, 9 Aug 2022 17:16:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229648AbiHIVQV (ORCPT ); Tue, 9 Aug 2022 17:16:21 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F38F24C619 for ; Tue, 9 Aug 2022 14:16:19 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-15-SVGnQXmVON2x51L-BKgQXQ-1; Tue, 09 Aug 2022 22:16:17 +0100 X-MC-Unique: SVGnQXmVON2x51L-BKgQXQ-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.36; Tue, 9 Aug 2022 22:16:15 +0100 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.036; Tue, 9 Aug 2022 22:16:15 +0100 From: David Laight To: 'Jason Gunthorpe' , Linus Torvalds CC: David Hildenbrand , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "stable@vger.kernel.org" , Andrew Morton , Greg Kroah-Hartman , Axel Rasmussen , Peter Xu , "Hugh Dickins" , Andrea Arcangeli , "Matthew Wilcox" , Vlastimil Babka , John Hubbard Subject: RE: [PATCH v1] mm/gup: fix FOLL_FORCE COW security issue and remove FOLL_COW Thread-Topic: [PATCH v1] mm/gup: fix FOLL_FORCE COW security issue and remove FOLL_COW Thread-Index: AQHYrCRe/fPaEDNbYU+8sVbKwVGyX62nEPVw Date: Tue, 9 Aug 2022 21:16:15 +0000 Message-ID: <09715a42c73a499f9c90cbe3e2714389@AcuMS.aculab.com> References: <20220808073232.8808-1-david@redhat.com> <1a48d71d-41ee-bf39-80d2-0102f4fe9ccb@redhat.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jason Gunthorpe > Sent: 09 August 2022 20:08 > > On Tue, Aug 09, 2022 at 11:59:45AM -0700, Linus Torvalds wrote: > > > But as a very good approximation, the rule is "absolutely no new > > BUG_ON() calls _ever_". Because I really cannot see a single case > > where "proper error handling and WARN_ON_ONCE()" isn't the right > > thing. > > Parallel to this discussion I've had ones where people more or less > say > > Since BUG_ON crashes the machine and Linus says that crashing the > machine is bad, WARN_ON will also crash the machine if you set the > panic_on_warn parameter, so it is also bad, thus we shouldn't use > anything. > > I've generally maintained that people who set the panic_on_warn *want* > these crashes, because that is the entire point of it. So we should > use WARN_ON with an error recovery for "can't happen" assertions like > these. I think it is what you are saying here. They don't necessarily want the crashes, it is more the people who built the distribution think they want the crashes. I have had issues with a customer system (with our drivers) randomly locking up. Someone had decided that 'PANIC_ON_OOPS' was a good idea but hadn't enabled anything to actually take the dump. So instead of a diagnosable problem (and a 'doh' moment) you get several weeks of head scratching and a very annoyed user. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)