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 X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90AB1CA9EA9 for ; Fri, 18 Oct 2019 16:19:29 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DA6C2205C9 for ; Fri, 18 Oct 2019 16:19:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA6C2205C9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=petrovitsch.priv.at Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.92.3) (envelope-from ) id 1iLUyB-0006wO-0o; Fri, 18 Oct 2019 12:19:15 -0400 Received: from esgaroth.petrovitsch.at ([78.47.184.11] helo=esgaroth.tuxoid.at) by shelob.surriel.com with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.92.3) (envelope-from ) id 1iLUy8-0006wH-3v for kernelnewbies@kernelnewbies.org; Fri, 18 Oct 2019 12:19:12 -0400 Received: from [10.68.100.236] (h10-gesig.woeg.acw.at [217.116.178.11] (may be forged)) (authenticated bits=0) by esgaroth.tuxoid.at (8.15.2/8.15.2) with ESMTPSA id x9IGIo31009773 (version=TLSv1 cipher=AES128-SHA bits=128 verify=NO); Fri, 18 Oct 2019 18:18:50 +0200 Subject: Re: Try/catch for modules? To: Martin Galvan References: <29246.1571350377@turing-police> <24fe8b41-2bc0-181e-7252-9e787949ab68@petrovitsch.priv.at> From: Bernd Petrovitsch Message-ID: Date: Fri, 18 Oct 2019 18:18:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------68446F3D2935BD96AC1CDEAB" Content-Language: en-US X-DCC--Metrics: esgaroth.tuxoid.at 1481; Body=3 Fuz1=3 Fuz2=3 X-Virus-Scanned: clamav-milter 0.97 at esgaroth.tuxoid.at X-Virus-Status: Clean Cc: =?UTF-8?Q?Valdis_Kl=c4=93tnieks?= , kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernelnewbies-bounces@kernelnewbies.org This is a multi-part message in MIME format. --------------68446F3D2935BD96AC1CDEAB Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 18/10/2019 18:11, Martin Galvan wrote: > El vie., 18 oct. 2019 a las 13:05, Bernd Petrovitsch > () escribi=C3=B3: >> You actually want speed in the kernel and not necessarily extra effort= >> for "try" and "catch" which is - sooner or later - never really used. Just brainstorming (as I'm not a guru on the inner workings): I don't know if it's possible to hook into the relevant IRQs etc. to catch a "kernel-space seg-fault" .... >> And the "safety net" reduces the motivation to actually fix pointer bu= gs .... >=20 > I don't think I was clear. My intent is that if a pointer bug isn't > fixed, my module will fail gracefully and go through the catch block If the module fails "gracefully" other powers may decide that you should just paper over the bug and make you work on other stuff. Of course it doesn't inhibit any bug fix per se but .... > instead of panicking the whole system. I don't see how this would stop Hmm, depending on the driver/module, one could use UML or VBox/VMware/... for testing - and the panic shows the exact place (or at least should;-). If it's a driver for real hardware, I hope you have a separate system to test;-) > me from fixing the bug itself; if anything, it could even help me > debug it. MfG, Bernd --=20 "I dislike type abstraction if it has no real reason. And saving on typing is not a good reason - if your typing speed is the main issue when you're coding, you're doing something seriously wrong." - Linus Torvalds --------------68446F3D2935BD96AC1CDEAB Content-Type: application/pgp-keys; name="pEpkey.asc" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="pEpkey.asc" -----BEGIN PGP PUBLIC KEY BLOCK----- mQGNBFss+8cBDACpXlq0ZC9Qp8R+iFPx5vDPu12FpnmbbV8CwexVDchdizF2qz+A PFh12RrkE6yudI0r7peAIRePiSVYqv8XT82TpJM+tbTYk/MSQaPhcmz8jl1HaKv0 q8g5nKtr42qRsswU7Q2Sa6mWXaIdOisPYZ9eLZC9BDBhI/YrgdAwszyYJ1HUwNkp Dw5i4wW/SsIKrotCboYzbBjZfHbmDJr4dFYSoMg5jQVHD2Yz8fqNSoRyd7i/oicn 1bH/DjEkrmIu9YuptuHYmblpCRo5dLww7kgszNw12j8Iljp64uJ/uz5+asBUmRZM mGey82BB1DnIvy1v+GnbGWFIYy79/HeqdN+KbOgO/sXoqYKS5KJ6aSqWOLTQk6sv AnDN2PNF5jOB9ROCNwoQSH/YNEfMd/mQ5pGB0UJ4ykD0UnjW7DdXbVOwvwWzfHF7 HaZXB1NMpBzHxold3W19DThd4HECvXYZ6Au6p0WE8IfABS11CzbX7KJuD5Ua+xKG 3W05fMg5i0td2aMAEQEAAbQtQmVybmQgUGV0cm92aXRzY2ggPGJlcm5kQHBldHJv dml0c2NoLnByaXYuYXQ+iQHUBBMBCgA+AhsDBQsJCAcDBRUKCQgLBRYDAgEAAh4B AheAFiEEgDWyyHEwksebo557hUq7AhBHKGYFAl0HmCMFCQO7nFkACgkQhUq7AhBH KGZCIQv+Li5U6ZfZ21JJPPzcV4JOq9nzz5YvJpPBwOtDgiDfsJ1WuSjJD0KpeCLh nxeTnGM1PwdjtXBImstZfDOX/IH/iiNgWLNz80K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PVlSylQo8Z7lQ7egMMUU2QKOEJfC2BpXZl/TbHURgkUG uRAw+WsFTlqW+OEbsXXnzdonz/K4YtKUHo/cc9os9Iv3xoAqwa7mSMe4vgvyuskI VEbyqtOXvKZ2UTQlBh1Etnkkg6uOfSFbWi7IN0fv8gjsImSCuhn9JKWSSMeKWeu0 +cleW5uRuVexv5nCfVzzye673X+knkcchyUZ40cD9OzME9JHCzAmDWmHobFqsemr +2umZxCGzqLttmILn61NdmQvmauDFjNw383ngbMbk4bhduaWWV5dDlXmbsi4bDk6 HCaskYsbEHXXoOmb/ts7lP6ifqvT1ZfuogJfn5bXv1Sm4IJubJ4S4ZYrLg2fKlWH GWMRJlAOV5swTOmw4Gk/PV6jR/ioZxRiZtSZK1Pkso0gbla+HLY4OCo68eafP66p H2CEDcqDEBnjApKnTO1a6DtRkQzEs0aLhvXwhvt/HL6/lXIVQA=3D=3D =3DGX6K -----END PGP PUBLIC KEY BLOCK----- --------------68446F3D2935BD96AC1CDEAB Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --------------68446F3D2935BD96AC1CDEAB--