Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp240243imd; Fri, 26 Oct 2018 07:53:27 -0700 (PDT) X-Google-Smtp-Source: AJdET5fLEFvxOddUVPI5++B+xT6IJdQodnysYLb/iRyIAp0fHTykuSQSaA8fsg5GwzBaNWlfsDHg X-Received: by 2002:a63:c45:: with SMTP id 5-v6mr3770626pgm.372.1540565607046; Fri, 26 Oct 2018 07:53:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540565607; cv=none; d=google.com; s=arc-20160816; b=h3Pz/AwqxZ7J7gFKStQXVWhZM/AqOBaGiMUjmsZ8aEPrVGShgBeILbIWLRT+mSpF5s XosLp/nWSjbpIxEcrX6GxLknjxxKA2QaDn8R1JNz7trjliOIWXf6in3pydCdma+NSbz1 wIrAwMDvJdq7nB8XM36Xb929A25nm7IZ2V0SftVgNS36CowoRZsqJXvomStj6Hd6uNjk Qj7TdtyDzQHt+bJDyla8JMhpE/K7nt5yumuX+2+WJb9rCL2P+gA+e428/uOYcQMVHHMl 98sZ0w4ZO1Gl0ZMfjwtcneto9nmuWpl5k7dnx1V2Tm/dqnpI0F16vLdSuyOE7sGf4Vox uEOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=MaONysL5Agp1vvXMb2D9FL4MPOKAVQs49dBxTujeo6A=; b=XyUaz0JgIDM17IJrkJs67HH2Krrx1HB6FPC5ZVmcWs1KnPGTxO4E2yQLIj8A4zhcxk wqTn5yb13jJdQJpUzIfS3dGnYvC5U5DLDxPEQekuq2V+XAxIOoCNjpIsznBktuReSYD0 1elY6bmSzFIaH7T+g/b9/cnjgEJ6on5oPTnSP7F+IP1mIm/uvQ5QLxzcv1GUmnqLUMQY wb6Qn5eF52cv7kGScxqYjU+o24wBmS8qi3mVDdCAveoowKeTbFUXyyRVOiK8SoK5Dn4e T4s1LdsRcp9x0SfNNeugnoqGKKsTytdZdrme+T5CJTejODies/erCdHY4vaLGDEmSZsx QAzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X76BQREZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3-v6si11612337plh.124.2018.10.26.07.53.11; Fri, 26 Oct 2018 07:53:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X76BQREZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727477AbeJZX2m (ORCPT + 99 others); Fri, 26 Oct 2018 19:28:42 -0400 Received: from mail-it1-f193.google.com ([209.85.166.193]:32770 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726179AbeJZX2m (ORCPT ); Fri, 26 Oct 2018 19:28:42 -0400 Received: by mail-it1-f193.google.com with SMTP id h6-v6so4770048ith.0; Fri, 26 Oct 2018 07:51:19 -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=MaONysL5Agp1vvXMb2D9FL4MPOKAVQs49dBxTujeo6A=; b=X76BQREZroqVVNyNMbK+eL4GJFcVISMAIh9ftA9A1Rhv7R7p8nQm/oF1zrljL8dg5P aLerx+/TI7ifdJ4l9TD+9uMhxiR2/jK0OTwf+Iaq7kjrmyI18bjNNdHDv6NIOEgsyHEN SqQ1sx6fxAQbxMgOUvXKBXn2rnvdFyKTIBuaxxHAnLH+CFeNZnEGEl7Cx5Ae7sfRLB9y WJ2kp05bWrjAVakhzlBaHe8HUIG03I/MM2tnqPrb6I0vzrUBCKoNgHlUl6VliAD8Y6ov HJsvexp1O/7D6BnQim/FCuBL4F8iua4t4Y/ixmOvLZf9nklol9gtLDufSYoR5B1ZeclH wSqQ== 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=MaONysL5Agp1vvXMb2D9FL4MPOKAVQs49dBxTujeo6A=; b=iGEjIw/UbXNj0BhAGKGUFSyDt+NfSVvLqDIFVv3MyWm/6BXCUxeb3/6qC/q7L11PYd dhf/SPpXY4MbpnCkGRyeAoeXIgjDRrn0WZzPKm/SxGs7p9g4U0IA4zi3aItznILzr6sv JuauXKm86qfa3TMo8lffugx4T9tMj/Y66wXUbP3UeeTjDYGzYsYw2FOHjmsyEZ/g0PGJ pR9H+Vgfaup/gzIzuLVVJk/+vD61+F1vShjvcBzHukXNlCVFdT7ote3tZAzDs9fnXvjD eqCu+Vf/dwhFfgcVXqzP+/8wqH20Nzh/OiJapdDz6OblMfzZDkd5irx7VV4W0AYIeMun phVQ== X-Gm-Message-State: AGRZ1gJz2oZeh3/0eYn0f9FQauhcQhxt9jPd80kkJZw/HTV+kbXNLBON XHUEJcl5EFCxjXZXP7rRBht/RThKrCNCasep39s= X-Received: by 2002:a05:660c:b03:: with SMTP id f3mr3891957itk.60.1540565479492; Fri, 26 Oct 2018 07:51:19 -0700 (PDT) MIME-Version: 1.0 References: <46e927f8-268c-866c-75f7-d1406252759a@kernel.dk> In-Reply-To: <46e927f8-268c-866c-75f7-d1406252759a@kernel.dk> From: Kyungtae Kim Date: Fri, 26 Oct 2018 10:51:07 -0400 Message-ID: Subject: Re: [PATCH] floppy: Avoid memory access beyond the array bounds in setup_rw_floppy() To: Jens Axboe Cc: jikos@kernel.org, Byoungyoung Lee , DaeRyong Jeong , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Do you mean mail client?? Well, I'm currently using gmail. On Fri, Oct 26, 2018 at 10:41 AM Jens Axboe wrote: > > On 10/26/18 8:39 AM, Kyungtae Kim wrote: > > > diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c > > index a8cfa01..41160a1 100644 > > --- a/drivers/block/floppy.c > > +++ b/drivers/block/floppy.c > > @@ -3146,6 +3146,9 @@ static int raw_cmd_copyin(int cmd, void __user *param, > > */ > > return -EINVAL; > > > > + if (ptr->cmd_count > ARRAY_SIZE(ptr->cmd)) > > + return -EINVAL; > > + > > for (i = 0; i < 16; i++) > > ptr->reply[i] = 0; > > ptr->resultcode = 0; > > Almost there, the tabs have been turned into spaces. This could be > a mailer issue, what are you using to send out the patch? > > -- > Jens Axboe >