Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp518739rdb; Mon, 29 Jan 2024 09:09:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IFOwL/nPsLwtj7FM5H+zpyeDq87VlEjJf3+g3W00q8xLdhtooRt3ZUp8Lqf4KVea7Tgl+8o X-Received: by 2002:aa7:9823:0:b0:6dd:c817:6a9b with SMTP id q3-20020aa79823000000b006ddc8176a9bmr2980620pfl.26.1706548149392; Mon, 29 Jan 2024 09:09:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706548149; cv=pass; d=google.com; s=arc-20160816; b=0OPRMfGEylrdhmyhnF4h5j347EqPmzdKsb7GUijSnjDRoKNbwKVng+TaQAh734wWXB eO4wRg4mx8vbeMAdSWZ2VuOXsyaAec+w0IEwsUcDFdDAKuDZ153VBJiQ1Raj3sRyyGiU yAVUXK5o4rGyAF5vr4lZNPNTxJepCWQ1GgV+LhDIpwn6jXEJ2jPYM/QstNuAAYm6pOxR dU2IqFH8cpWqs7Y+5jNvXxnDD6LtyCFmEwLL/SLactAvhOO3Y2a1bc7wUWtXOFQ0RzvE X6HJURy31oGTKMX4WYuH5YX6aa06XU+xrrmlzM3V4fl5Y9G55rN1l6BnKU3P1GLkbQ6l fCTA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=W9e9aTgW69SCUZ7Nc/7sxARbcemroWx1eN9b35d29Ho=; fh=P+ti2DLdsaYTav+hQnj0GWXyL662HbGWn2C/lsaX3us=; b=qas/bivbswzTkTEBpeuVb2O3H7CZLjsFudCnIusE3sk1ULik4WNWAXvSFbadhPzf7P pIiR4XhSJX+/VEZgMwtGiBCpjAFD3+qQ3GtEN6md5whout9oY84/IHZ/xb39/NDhf3tg 6Naai+xLlc0vSTO4/NfVgHUAx7Cz26eXLcOwTvR8vDSJWG5j0Qzbbqh514+qsVyZAma2 t2t/li8t4XaVDdTxe1SaQ7V2GlcHBJIahFbAKYlclkfwWqGYf/lhxBX+8ffCAmbGAUdg o1Y7bQhS9yr9zg41N2Rc9x+UdlZKdrYH39IIhtPeUZsBctrGAMNLbSPa418lhjcG+hz8 vXdg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UzBGEBTe; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-43182-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43182-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w19-20020a056a0014d300b006dd82e644f5si6041709pfu.288.2024.01.29.09.09.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 09:09:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43182-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UzBGEBTe; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-43182-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43182-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 51602284776 for ; Mon, 29 Jan 2024 17:06:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 60ECB157053; Mon, 29 Jan 2024 17:06:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UzBGEBTe" Received: from mail-oo1-f47.google.com (mail-oo1-f47.google.com [209.85.161.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D84315703C for ; Mon, 29 Jan 2024 17:06:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706548010; cv=none; b=kZf1t0Ig9GOjUPT/epVKeaKgfQ0mH9XXiLettQK3u2sa6v7UxD9iX2SjTs6GQsX/u/eJbyY+P2/jrMEOP3U6124oF8ldJloT7v2OzFx6jd+VKcKtmVc9Apxridn02M7818nyqt32m3h4uUmUyT9EarX5oSYQn9k5ZDKFEg/mH78= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706548010; c=relaxed/simple; bh=aHP8f/jy8s8m5foj4ZrWGt+6GAdokU3T6VB4KE47DVU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LpKYXY1MTC+AKxliTD+xyIQ8mbajyD/yxYQpmdrlzFgxGttRfDm5nr0Nxo5amNWVsazeWxNOf4OSDWxK24LTb5ajIu41lqxJA16EJM42QOWy//We/DKXTe6MV9X6gbBd+cnTIMWoqF1bLp8cYbkgjc/9oR5XYEReZ3HvGuDAaRk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=UzBGEBTe; arc=none smtp.client-ip=209.85.161.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oo1-f47.google.com with SMTP id 006d021491bc7-59a146e8c85so1526659eaf.0 for ; Mon, 29 Jan 2024 09:06:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706548008; x=1707152808; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=W9e9aTgW69SCUZ7Nc/7sxARbcemroWx1eN9b35d29Ho=; b=UzBGEBTefQ3cy0mQX67K4dKiCpiiVNqE2wLBepQ2WM9c+/ckCdjOnqbmYETbqap48V gW1j/V4l/6aHvFfUoncb7pIKYtVMj9a9qnYRyDgag4D5FS9Vg2BSSs1DWaf9yUcMuPr6 1HU+qBHd5/HWIC17JZeRJ/tGt5+JqpS+AUeQpiP7ynP7O5Ryxr3gAUCrZw/rLLu8tHwU dymxdC+DWua9FtpabboNCXueM1DYBpe3LyANZiAMRqVnNQRzfvjjYJnEvTzjiLDWlBBx uLL3f5F2dfQcW3LSm18lanUSDBz9TuLHK53plUBfS1VSHxoINyeisj0NdkcqL9ZBiMAM qBzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706548008; x=1707152808; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W9e9aTgW69SCUZ7Nc/7sxARbcemroWx1eN9b35d29Ho=; b=rvElJDSyStuCWWMb/X16Bwta7UfzPrGgtlaHxWa0AKwFS+NN2v4Vgw1us8FeOr/6ZI tTfl0SD7bXjno3tfa88QQqYqyXkvhunfrSZNOFqXpUV1iBrBGx8EP8aU5NL3AYZPr8OM gsb5eDTDIGuVHWbQ2nazIyD754xohtcNuth3IhsOz3k2OedtC4/dc3pOh3DBf0sHZ4id npDyXJ+gNJl8f144Ct9y/qbiwrwg5UjNTklo9GPM740y4uGB02sARuxPwpD+P38jrqzI Uogh1CBAb+NJUVu6akdLkMWigoLroqL+6kwO6uzBLP/e3TROaWy8afIMfYMfJhq3dKwI iZVA== X-Gm-Message-State: AOJu0YyP0uiKPExnoN+KTS2ScrQ9vP3nk4fZGcp/M2Y1m7H//LskdS2z 4FAPNpy/7US2wh2JOROb6je6MbTHZKRo1Y3YxfAf3wU0it06xmUf X-Received: by 2002:a05:6358:7205:b0:176:5cad:a2e1 with SMTP id h5-20020a056358720500b001765cada2e1mr6548304rwa.26.1706548007807; Mon, 29 Jan 2024 09:06:47 -0800 (PST) Received: from localhost (dhcp-141-239-144-21.hawaiiantel.net. [141.239.144.21]) by smtp.gmail.com with ESMTPSA id c26-20020a62e81a000000b006ddc84a03c8sm6083271pfi.85.2024.01.29.09.06.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 09:06:47 -0800 (PST) Sender: Tejun Heo Date: Mon, 29 Jan 2024 07:06:46 -1000 From: Tejun Heo To: Allen Cc: Linus Torvalds , Mikulas Patocka , Thomas Gleixner , linux-kernel@vger.kernel.org, dm-devel@lists.linux.dev, Mike Snitzer , Ignat Korchagin , Damien Le Moal , Bob Liu , Hou Tao , Nathan Huckleberry , Peter Zijlstra , Ingo Molnar Subject: Re: [PATCH] softirq: fix memory corruption when freeing tasklet_struct Message-ID: References: <82b964f0-c2c8-a2c6-5b1f-f3145dc2c8e5@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hello, On Mon, Jan 29, 2024 at 09:00:38AM -0800, Allen wrote: > I rushed to reply to the draft patch you sent, I should have > looked harder. My apologies. > The idea that I have been working on is to completely move away from > using tasklets. > Essentially, "get rid of tasklets entirely in the kernel". So, the use > of tasklet_schedule() & tasklet_hi_schedule() > will have to go. The idea is to take over the tasklet[_hi] softirqs once all users are converted. Otherwise, we run into the problem of setting priorities between tasklets and the atomic workqueue, which may be a theoretical problem. > I have a very hacky draft that is still wip. I am going to borrow > many bits from your patch which makes > the work I have better. > > Perhaps we should start a separate thread, thoughts? Sure, please go ahead. Thanks. -- tejun