From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by gnuweeb.org (Postfix) with ESMTPS id E543581845 for ; Sun, 22 Jan 2023 17:48:00 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (2048-bit key; unprotected) header.d=kernel-dk.20210112.gappssmtp.com header.i=@kernel-dk.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=M7K0zj+a; dkim-atps=neutral Received: by mail-pl1-f175.google.com with SMTP id v23so9440136plo.1 for ; Sun, 22 Jan 2023 09:48: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=mklioiOy2SPx/+Wl0XHLwjVP/zb0IvNHLalin7YERKQ=; b=M7K0zj+abUg4/PHuIjVVaLh/6Dh6z4S40ydjuMtgh8TTGjrAJay2yDEpujiOG0iimK 0rkHFyi1c45orbeUtUtr0w8xWwpm7vJ2bc3oRZYmmPqCvCO7w0ZZb6a3O4ubjKkU1Q4k SCNg+a7Tkgo42yykChZJ2Gk8LDIRAno/b4eTcwPcM190m4sdAYwY0eJhVLuupx0ut5lY gDeWIr8QBmVgO6ttAkCQDUNFLpyZKy2SDHH9r7OVkYt4zO17r+lkt7p2+DGxli1svwo0 2BBf9LVSkZAoUEdmz5WJ7lddrS81CdvQkmmEeFTq8W6OCsRNLQAQwhfSc2IqssZmNDrW gxKw== 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=mklioiOy2SPx/+Wl0XHLwjVP/zb0IvNHLalin7YERKQ=; b=coAzzzsdemVb3kMJUGq+awwsnNS3rjyTwl33rZpcvEYvV8w8Oo1k3mrM4n7djbV5uA VyDpfe0gmbIXWWxnfVvcI9qAh5n893tJSgAHra8bbOD9W5i15CZwLb33ptxcuXWyF97E f4UC6KW33AKUR5IB/Q5/v90VsVGbRAHca7QZkwJX43I/+C2MGYNYpOyjE7LPVewams5s QySQNFCNJpQ19ssINJqMQg9KL1fZyC0MwNXDlFNthScVHPb5XWb7pTJNtOKsJtBHaW2v uQ/n3Y2lIFCN4So3AhoNG6T6uxYWgjFUvssF3/Pc2lSGhE5fWr8a7kDCYrcuHmCeR5xe xU3w== X-Gm-Message-State: AFqh2kpWsEl/tcAGvU/6+6AtXSfda9u8nV/HbVGKPDD/zBcwpoKkxJWL aaKyB5d1Xu1kuULmVQoxKB3usw== X-Google-Smtp-Source: AMrXdXtIsNAlL0SxiNFyN2BzVxFTaLZUMTQq4Dc994DQ4GgrymgUQhe8oFoWQrNuXqIFlcJSF1/PHQ== X-Received: by 2002:a17:90b:3c84:b0:22a:348:c7b5 with SMTP id pv4-20020a17090b3c8400b0022a0348c7b5mr2458138pjb.2.1674409680338; Sun, 22 Jan 2023 09:48:00 -0800 (PST) Received: from [192.168.1.136] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id p11-20020a17090ad30b00b00229b17bb1e8sm5125788pju.34.2023.01.22.09.47.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 22 Jan 2023 09:47:59 -0800 (PST) Message-ID: <8fa86861-2713-ae11-99ef-14d90b2943d7@kernel.dk> Date: Sun, 22 Jan 2023 10:47:58 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: FAILED: patch "[PATCH] io_uring: Clean up a false-positive warning from GCC 9.3.0" failed to apply to 5.10-stable tree Content-Language: en-US To: Alviro Iskandar Setiawan , Greg Kroah-Hartman Cc: Ammar Faizi , Pavel Begunkov , Dan Carpenter , kernel test robot , "Chen Rong A." , stable@vger.kernel.org, io-uring Mailing list , GNU/Weeb Mailing List References: <167439864617430@kroah.com> From: Jens Axboe In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: On 1/22/23 8:43 AM, Alviro Iskandar Setiawan wrote: > On Sun, Jan 22, 2023 at 9:44 PM wrote: >> The patch below does not apply to the 5.10-stable tree. >> If someone wants it applied there, or to any other stable or longterm >> tree, then please email the backport, including the original git commit >> id to . > > That uninitialized reading is living in 5.10.y branch now > https://github.com/gregkh/linux/blob/v5.10.162/io_uring/io_uring.c#L4989-L5017 > > If this: > > ret = import_single_range(RE AD, buf, sr->len, &iov, &msg.msg_iter); > > fails, this one (flags & MSG_WAITALL) may read an uninitialized > variable because @flags is uninitialized. > > Fortunately, if import_single_range() fails, (ret < min_ret) is always > true, so this: > > ret < min_ret || ((flags & MSG_WAITALL) > > will always short circuit. But no one tells the compiler if @ret is > always less than @min_ret in that case. So it can't prove that @flags > is never actually read. That still falls to undefined behavior anyway, > the compiler may emit "ud2" or similar trap for that or behave > randomly. IDK... Now handled for both trees. -- Jens Axboe