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=-3.8 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 CE687C433E4 for ; Thu, 16 Jul 2020 20:48:44 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 962AB20787 for ; Thu, 16 Jul 2020 20:48:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CLn8nEZ9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 962AB20787 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4DA7E88246; Thu, 16 Jul 2020 20:48:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id caMkK60NfxXh; Thu, 16 Jul 2020 20:48:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 08D7488231; Thu, 16 Jul 2020 20:48:43 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id D74701BF375 for ; Thu, 16 Jul 2020 20:48:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id CD5A688231 for ; Thu, 16 Jul 2020 20:48:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZqyTFbaucfzp for ; Thu, 16 Jul 2020 20:48:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by whitealder.osuosl.org (Postfix) with ESMTPS id 286A588227 for ; Thu, 16 Jul 2020 20:48:32 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id v8so7510165iox.2 for ; Thu, 16 Jul 2020 13:48:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=E+1tVGknt5yYZ8eT3cfGaVP/Gx6TNLloqdwWVn2c4ZM=; b=CLn8nEZ9Umx3u1uxQ6iB8vnvAwGkRUs5ZG9EfQL8CJiHvyLP8M7b6NUIAKo+LBuY4f 8/9k4vjIky1k6ccVtwc1XCLpJ9OIXcaSnSgOd0xYtfqQA5VkwUEJhpc/XojQNud255Fp CS65GQl3KtSyU2zn3gjZRqpQReiLPt5Jdwt/SCKKel4uYCiyIFetSEXJKpr/nhCoi0IP Fh7/R7sRei2OUkuvv/y1qWAnzOrzRAxFmPwXU3sJhnRHuwo9BC1LeRHApdtIROKUBM0Y PuMZgqnjotBdORPgdDy9QbhiTqpBvHJsERxZbAO44L6pd99V8/cw6eA29lB/55EAquIA 5X2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=E+1tVGknt5yYZ8eT3cfGaVP/Gx6TNLloqdwWVn2c4ZM=; b=dD5wCM5hjKpiNrIObeBzGzglb+MOD55HonBpaTFmh1s5jSl6eaSo0femMc088JW7jc GWkip5qKwafrMUWfZ4odnjayRwRDmlcsubaV0pCnw7gYTL1f6FF9AOZ2TObdVvLjETOK FaDY2jJ9K/qwnt238+9zCDMNPm24E7gk9MJGL0vuxX9c3DVmSdYZ3A+dm3gdnXVqnJWa bF2elbyVhKpyyu68DEEJbIImDRmkqSDMy/7inzeluriOwY4GPUYd0GTN8kHjTduC7pcc pn44HNU0Lu3hLieqpqZLdePySZ+9FH9P5kCg19zHoaztSMXCO0JlK+lZZubTz08JUwKZ RuAw== X-Gm-Message-State: AOAM533Pwg7IFIdFgT7Q0hk3WU8ZKb8xfc0yL2nyNRCUiY96AsfWftg1 PnIeJOBvYVo1ZIPSxgEvYDSQ82WNwD3sixUbqaM= X-Google-Smtp-Source: ABdhPJzpsbm7TwGhHG6RzXDqgC6/209E5TMuTQBViDF3W3srNDclU8jiNSeIW3HzQAj2kQTZKYQslP0k+o4Ij2ZF6uA= X-Received: by 2002:a5d:9c0e:: with SMTP id 14mr6302830ioe.109.1594932511887; Thu, 16 Jul 2020 13:48:31 -0700 (PDT) MIME-Version: 1.0 References: <20200716030847.1564131-1-keescook@chromium.org> <20200716075718.GM10769@hirez.programming.kicks-ass.net> <202007161214.102F6E6@keescook> In-Reply-To: <202007161214.102F6E6@keescook> From: Dmitry Torokhov Date: Thu, 16 Jul 2020 13:48:20 -0700 Message-ID: Subject: Re: [PATCH 0/3] Modernize tasklet callback API To: Kees Cook X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kuppuswamy Sathyanarayanan , "Rafael J. Wysocki" , Oscar Carter , Mitchell Blank Jr , kernel-hardening@lists.openwall.com, Peter Zijlstra , kgdb-bugreport@lists.sourceforge.net, Sebastian Andrzej Siewior , "alsa-devel@alsa-project.org" , Allen Pais , netdev , Christian Gromm , Will Deacon , devel@driverdev.osuosl.org, linux-s390@vger.kernel.org, Daniel Thompson , "David S. Miller" , Masahiro Yamada , Takashi Iwai , Julian Wiedmann , "Matthew Wilcox \(Oracle\)" , Christian Borntraeger , Nishka Dasgupta , Jiri Slaby , Jakub Kicinski , Guenter Roeck , Wambui Karuga , Vasily Gorbik , lkml , Heiko Carstens , "linux-input@vger.kernel.org" , Ursula Braun , Stephen Boyd , Chris Packham , Harald Freudenberger , Thomas Gleixner , Jaroslav Kysela , Felipe Balbi , Kyungtae Kim , Greg Kroah-Hartman , Jonathan Corbet , Douglas Anderson , Kevin Curtis , USB list , Jason Wessel , Romain Perier , Karsten Graul Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" On Thu, Jul 16, 2020 at 12:14 PM Kees Cook wrote: > > On Thu, Jul 16, 2020 at 09:57:18AM +0200, Peter Zijlstra wrote: > > On Wed, Jul 15, 2020 at 08:08:44PM -0700, Kees Cook wrote: > > > Hi, > > > > > > This is the infrastructure changes to prepare the tasklet API for > > > conversion to passing the tasklet struct as the callback argument instead > > > of an arbitrary unsigned long. The first patch details why this is useful > > > (it's the same rationale as the timer_struct changes from a bit ago: > > > less abuse during memory corruption attacks, more in line with existing > > > ways of doing things in the kernel, save a little space in struct, > > > etc). Notably, the existing tasklet API use is much less messy, so there > > > is less to clean up. > > > > I would _MUCH_ rather see tasklets go the way of the dodo, esp. given > > that: > > > > > drivers/input/keyboard/omap-keypad.c | 2 +- > > > drivers/input/serio/hil_mlc.c | 2 +- > > > drivers/net/wan/farsync.c | 4 +-- > > > drivers/s390/crypto/ap_bus.c | 2 +- > > > drivers/staging/most/dim2/dim2.c | 2 +- > > > drivers/staging/octeon/ethernet-tx.c | 2 +- > > > drivers/tty/vt/keyboard.c | 2 +- > > > drivers/usb/gadget/udc/snps_udc_core.c | 6 ++--- > > > drivers/usb/host/fhci-sched.c | 2 +- > > > include/linux/interrupt.h | 37 ++++++++++++++++++++++---- > > > kernel/backtracetest.c | 2 +- > > > kernel/debug/debug_core.c | 2 +- > > > kernel/irq/resend.c | 2 +- > > > kernel/softirq.c | 18 ++++++++++++- > > > net/atm/pppoatm.c | 2 +- > > > net/iucv/iucv.c | 2 +- > > > sound/drivers/pcsp/pcsp_lib.c | 2 +- > > > 17 files changed, 66 insertions(+), 25 deletions(-) > > > > there appear to be hardly any users left.. Can't we stage an extinction > > event here instead? > > Oh, I wish, but no. That's just the ones using DECLARE_TASKLET. There > are hundred(s?) more (see the referenced tree). Still, do we really need tasklets? Can we substitute timers executing immediately in their place? Thanks. -- Dmitry _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel