From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED3A6C19F2D for ; Tue, 9 Aug 2022 21:16:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3908F8E0002; Tue, 9 Aug 2022 17:16:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 33FEB8E0001; Tue, 9 Aug 2022 17:16:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1E13E8E0002; Tue, 9 Aug 2022 17:16:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 0B60B8E0001 for ; Tue, 9 Aug 2022 17:16:22 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id D90961A10D0 for ; Tue, 9 Aug 2022 21:16:21 +0000 (UTC) X-FDA: 79781312562.20.28C85B3 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by imf27.hostedemail.com (Postfix) with ESMTP id A9E854017B for ; Tue, 9 Aug 2022 21:16:19 +0000 (UTC) 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: quoted-printable ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660079781; h=from:from:sender: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YGTHGVkqtObjl7AEsoz6kSHn4feTmkU0ksWWxW6nwUc=; b=UaeSvB8zgO66CpWiZLQqVN/UBMFVKCroxGGgYPsna/4njqY9w8OaD/ZZRfo03U9Qi3/gOn vrl15oTPHCpM34Uqd1hu5/So3JvJcui0HhUjiWt/9sviziksVUm/f/9wYzqwJs6Dl3/k0h 4UCGoLwl8RA90dGdMs7qHj0RqXHm85I= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=aculab.com; spf=pass (imf27.hostedemail.com: domain of david.laight@aculab.com designates 185.58.86.151 as permitted sender) smtp.mailfrom=david.laight@aculab.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660079781; a=rsa-sha256; cv=none; b=J/Oo2WSvoPLLvn0xVfB0Fp1vDqBV7URT2bw183NfcVyTBsTiB6dxOX0pTu04GIUGJJM2Xo v716rJj2uer3sEdvwuEuSn+9L74/ZrDLofqCmmrJF07N+yacHwJ1fXGI57z/xuA6mWw0VP EA0R4VjLLCJ/28WHgZzQzE1jOKKCC+k= X-Rspamd-Queue-Id: A9E854017B X-Rspamd-Server: rspam03 X-Rspam-User: Authentication-Results: imf27.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=aculab.com; spf=pass (imf27.hostedemail.com: domain of david.laight@aculab.com designates 185.58.86.151 as permitted sender) smtp.mailfrom=david.laight@aculab.com X-Stat-Signature: cufmt8k8eogh5jwczmwunxbupbs14fmc X-HE-Tag: 1660079779-1713 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Jason Gunthorpe > Sent: 09 August 2022 20:08 >=20 > On Tue, Aug 09, 2022 at 11:59:45AM -0700, Linus Torvalds wrote: >=20 > > 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. >=20 > Parallel to this discussion I've had ones where people more or less > say >=20 > 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. >=20 > 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. =09David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1= PT, UK Registration No: 1397386 (Wales)