Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2855520rwb; Fri, 20 Jan 2023 08:10:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXsdkbw8HNtzIyeteStDeS5WYR/UXGSVjYGjU79qBkC7yfHdvgLZbblxsZCrIPq6PLs2m8De X-Received: by 2002:a17:906:3397:b0:86b:e50c:151b with SMTP id v23-20020a170906339700b0086be50c151bmr14628085eja.28.1674231010923; Fri, 20 Jan 2023 08:10:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674231010; cv=none; d=google.com; s=arc-20160816; b=QJvVQJdEWIqGFGBiuwwJ4P7gEvPbBh3aNbjiHK0VpO29CQ3Z+/Z+8cJkfrwpZaVe/R xrur/WfTXhGvkhP/uRw4eCYH6XE/aOHMZ17ZUKA1T/TrG88D10C5uB7siWrlMFLB4YNc HSutmc1FLnMjNxASih5otKmgRez4jjP4UMXmTw9PL5mED0PKfIlBwenB58wl2B2QPEsk iXOrQUNg1dx86FZIDoPtVrKsk7YOLp8lJ8IHhIdvUWvjwJcDXnJVjRauu+tPjRp0CZSG b7zdvRzhqNsf5ybT5DuKUBlGAzhTxTXnnyeIj5MMi6jZuGtBs9PSu122SUJdPGqy6rAy MF2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=gHZ4zxBKFj/78J0fghwgqaCjE6ht7Gwjai/lQVrZMf8=; b=vk7t66n45FTRxaglYQ+mxic97qUMgvxKojfBqHDlqLa4bTH8Mm6NiRFXw4gGddgE1k 639OmUf4PfusVaF0mlowCp/8KXO56n06F6NA3+ahkDNVzpbVXjQ60u4wpI5anhfbU5ul k2qp0jHVl65Nl+jCUTYE3se2CWzrI22PGjenrzlEn5tuqnHmDcBDQB8karaIux6VLtpB 2311UGDwGQWQYO9V2Vc7gQBMYpkWYfTaFmp45f8TdiiLZxvKS8AHHSTr9iX/T7ITJ1lo 0EUWLS9kf5VXn5Y4n8pOzOgW7j/GzHc0nlGFWclS4BfAJSr4WezTkizuTwWlhRKGWgVO XTjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b="gzg/QqiL"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd33-20020a17090796a100b0087767469a64si8134044ejc.673.2023.01.20.08.09.58; Fri, 20 Jan 2023 08:10:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b="gzg/QqiL"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229949AbjATPjY (ORCPT + 50 others); Fri, 20 Jan 2023 10:39:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230143AbjATPjW (ORCPT ); Fri, 20 Jan 2023 10:39:22 -0500 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D49A280BB0 for ; Fri, 20 Jan 2023 07:39:00 -0800 (PST) Received: by mail-io1-xd32.google.com with SMTP id i70so2589295ioa.12 for ; Fri, 20 Jan 2023 07:39:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=gHZ4zxBKFj/78J0fghwgqaCjE6ht7Gwjai/lQVrZMf8=; b=gzg/QqiLfqNSaqONNPcY97/OcjrVcsvcFTexWk9phcHskdpA/awPSAPK+qKlGdaMWL tMmDAxtDSo4MhCTU9yCIXclGWEEsEii8lZmmogEkgXGIhh0RGjTxC7ILBVdtHC9MvCcI +3BoP0vdvEvHIS+VNFDhzZoK/UyAdx2WaY1mBZ9u94Vf34ZZk6HW+t5z+xprtptdDOMi njaXyLqgFCOPwbexbVkcX2SgD0SwDkT/doNPxWzFiIzG2OIR+t/M50uI4bh+RSKZLMnH O4+/pnWilxTCpHgCgRhrfCFpSpAfVX5A1kZtR4CfkkTFFT2U9JMYPBDoQqZsP1I8UkZS vvTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gHZ4zxBKFj/78J0fghwgqaCjE6ht7Gwjai/lQVrZMf8=; b=jU9Xl4Rw2vMolR26EJvF6BHGIMaXiABPKhBfa20cwdreQC61I7loPCu0fCdNsuhprG qQRCxfsw6xQi021b+ztprR5Z77xkoDHoLKBFL7OdKY2zHftF7IOHNd48jrl30NuU5Muc qXDpt+pqB8IJ4kDKgg5dP8OH6sIcs+HfbRxV0q+t82NXUMOUB6mTYxtzVetqU46g0Zyn HLUJgz0L6tupJWkSGveg+uuYZ7KZxo54m/jQj/NblJMnSL86/ZWDiGf3IAf6VjQRcfKL oL6X7SZlfjaw+yk/U94LALfiFCiNvis7LES6simAURn/oN2WPLTK2SLSr3M0GmrZnhjh xpPA== X-Gm-Message-State: AFqh2kr6wbJNz8eipqEqmfmA8dOEFxYJH7KNUXmmSQ+NS8bwBjHuLMyY X2wjirkMqgJ8EgcIGWxRtYGcAg== X-Received: by 2002:a5d:9e4d:0:b0:707:6808:45c0 with SMTP id i13-20020a5d9e4d000000b00707680845c0mr1239435ioi.1.1674229135632; Fri, 20 Jan 2023 07:38:55 -0800 (PST) Received: from [192.168.1.94] ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id t19-20020a056602141300b006e01740c3b6sm13476398iov.2.2023.01.20.07.38.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Jan 2023 07:38:55 -0800 (PST) Message-ID: Date: Fri, 20 Jan 2023 08:38:54 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH] io_uring: Enable KASAN for request cache Content-Language: en-US To: Pavel Begunkov , Breno Leitao , io-uring@vger.kernel.org Cc: kasan-dev@googlegroups.com, leit@fb.com, linux-kernel@vger.kernel.org References: <20230118155630.2762921-1-leitao@debian.org> From: Jens Axboe In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/20/23 8:09 AM, Pavel Begunkov wrote: > On 1/18/23 15:56, Breno Leitao wrote: >> Every io_uring request is represented by struct io_kiocb, which is >> cached locally by io_uring (not SLAB/SLUB) in the list called >> submit_state.freelist. This patch simply enabled KASAN for this free >> list. >> >> This list is initially created by KMEM_CACHE, but later, managed by >> io_uring. This patch basically poisons the objects that are not used >> (i.e., they are the free list), and unpoisons it when the object is >> allocated/removed from the list. >> >> Touching these poisoned objects while in the freelist will cause a KASAN >> warning. > > Doesn't apply cleanly to for-6.3/io_uring, but otherwise looks good > > Reviewed-by: Pavel Begunkov I ran testing on this yesterday and noticed the same thing, just a trivial fuzz reject. I can fix it up while applying. Thanks for reviewing! -- Jens Axboe