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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95045C433EF for ; Thu, 9 Dec 2021 21:46:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231524AbhLIVuZ (ORCPT ); Thu, 9 Dec 2021 16:50:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231216AbhLIVuY (ORCPT ); Thu, 9 Dec 2021 16:50:24 -0500 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CC31C0617A1 for ; Thu, 9 Dec 2021 13:46:50 -0800 (PST) Received: by mail-pl1-x62d.google.com with SMTP id y7so4950336plp.0 for ; Thu, 09 Dec 2021 13:46:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=vf4TIwD+NYGLfUvsVBzvm6KTrX/kuwp6DG0JCw/tbN4=; b=LJQiHrQfWFbYXRJtjNk9fFYI8I34vblEonCdAFxlecTtI+VVQqat2507DLVawWV9Xn 85uF/A5v31X+7Fqo3RPkkJCdhvULIYvwqGRikkTMqKRKT/pp7M4WYeXu68PY8NoccBBh XyPnT1yQj+X4yZZbaxvCy+T4XliTQzhVVr46nOgTumvxQwPBtVffvll6F0K6A4JB2+r6 1xW+Y0sxbjLwpir4qu69l5OnA1JqgpouTKF8knAvMIPHTFvVdMK3FZ6xCC3/yY66OVOV xEWWzZeWGmbkXuAtZTSlotaQcmL1CK7j3pYizodYL/OUDKB7deoR8HghDrptNOABl1w/ I8aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vf4TIwD+NYGLfUvsVBzvm6KTrX/kuwp6DG0JCw/tbN4=; b=GTvbn5Hf2m6o4PrO2G6a5Sd2ZL5nuWq3AZTt0ttPFcls0qh26drD1ztG5bD+d7AYWD JIvdyoQdzHTJc2lMaHS56ZBntM06tIUY1UHIh+cCSpBGh8H4qBfuo7AbB1HXrNxBth2I k0vjw31E4hJXZO7Vo0EHAkFwT7ZOfVT/TyXDsiDIBwjJSz2KyvlIm1T1knPerdnV976u 0heDrq/mv1fF/Yd9GYXw3NzXrj1JIR8vNz8Aj1R8QZoqwqZxN5l+ff2xFikebI+1H6sh UYw5gL95tYjq35RRB6+KnzLe+4yquSx/UgZfTjJjNXkX7X/dZSKFisGNt2zBdfJtR2yx Wdvg== X-Gm-Message-State: AOAM533VOq1AyhMN4sc25HbtcQcdVtwgx2rNQi9D3nwrNtJt5kABb7cB ad7O9TDG5m4es/K41+fATdRE4Q== X-Google-Smtp-Source: ABdhPJwFfq4AiojDvIZ/q+AQ4fwI8wKrkR8oEUmtKTC1fgL914aZj29dxWODGPFmhQDvz438H89biA== X-Received: by 2002:a17:902:b682:b0:143:7eb8:222 with SMTP id c2-20020a170902b68200b001437eb80222mr71023268pls.31.1639086409458; Thu, 09 Dec 2021 13:46:49 -0800 (PST) Received: from [172.20.4.26] ([66.185.175.30]) by smtp.gmail.com with ESMTPSA id f5sm558267pju.15.2021.12.09.13.46.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Dec 2021 13:46:48 -0800 (PST) Subject: Re: [PATCH v3 0/5] aio: fix use-after-free and missing wakeups To: Linus Torvalds , Eric Biggers Cc: Alexander Viro , Benjamin LaHaise , linux-aio@kvack.org, linux-fsdevel , Linux Kernel Mailing List , Ramji Jiyani , Christoph Hellwig , Oleg Nesterov , Martijn Coenen , stable References: <20211209010455.42744-1-ebiggers@kernel.org> From: Jens Axboe Message-ID: <4a472e72-d527-db79-d46e-efa9d4cad5bb@kernel.dk> Date: Thu, 9 Dec 2021 14:46:45 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/9/21 11:00 AM, Linus Torvalds wrote: > On Wed, Dec 8, 2021 at 5:06 PM Eric Biggers wrote: >> >> Careful review is appreciated; the aio poll code is very hard to work >> with, and it doesn't appear to have many tests. I've verified that it >> passes the libaio test suite, which provides some coverage of poll. >> >> Note, it looks like io_uring has the same bugs as aio poll. I haven't >> tried to fix io_uring. > > I'm hoping Jens is looking at the io_ring case, but I'm also assuming > that I'll just get a pull request for this at some point. Yes, when I saw this original posting I did discuss it with Pavel as well, and we agree that the same issue exists there. Which isn't too surprising, as that's where the io_uring poll code from originally. Eric, do you have a test case for this? aio is fine, we can convert it to io_uring as well. Would be nice for both verifying the fix, but also to carry in the io_uring regression tests for the future. -- Jens Axboe