Received: by 10.213.65.68 with SMTP id h4csp224551imn; Mon, 12 Mar 2018 11:47:29 -0700 (PDT) X-Google-Smtp-Source: AG47ELvVOjtB8zChJLb3PGA4DTnPwj59xQZUzn4qpbTpmJ2BiO2kwXtMADBkgkZM0qolrnknp4Vy X-Received: by 2002:a17:902:5489:: with SMTP id e9-v6mr9247715pli.81.1520880449485; Mon, 12 Mar 2018 11:47:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520880449; cv=none; d=google.com; s=arc-20160816; b=rV7e77mAuNjBHSX7867IGABqNhhLfRifi9B07Texq6ESwxwzn7dO5yMhJEF11fYljS HdvWMO5mLkJHeoyUFmSXy2Q39GWvr8JlVgSFPfUIh8X7kKyB4R+agcKIZmQV4nPADPrf HtVxYmcC7kFl3ENNXuhSO4Dd8oRGWe90tGzm2mbigKKQD26pCiOHzTirYnuOTpIuScRo T6BxHEHew55l9V4MyIuP60ENo+UFujQRjIkDbxmjbbwiH6BhWv+fBt0h/9Hr5LyRHcV7 2HEMEtd4jvYmFjl/tI4qwtMaH1lrv8h2Hk5ANxjUPMIWYDs75+pSqXjyPRIRCKOjadTC bDag== 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 :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=pJcVN4K8MStWv9CMj+HnfDAMBAVRn2sFc/k0DLzj+zY=; b=moOkX7XA4AuLIkp3QwljlwR1wokHgcBkrozq4+VQRiWYUAUDeMkupxtLLFKwIKZFSK 9RbCcR6FTNmUgbG2YVLGC3pmnpPYgCAwzGI+aF7p6tdQymNSGrTSp6N42hNfPGekFPkd hYm1joBNRq3YbWN4SmZYLb53EFTm8FlviszOrRHfpYIYrV/rypWRJo1cut5PhiHdSn1Q 0psEyaIyUjru6ZA3o9QqtdB2q2DzWUTJgPuuhqBBlAxiZM61N9dFc9MqXTbdPvyTtw7f BWAIwLKpgGgct346bE9M6R3HBRGBEv4jW943avJLQjb8VLKf2wyyfWJDawTSpnaiTl2i CcyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=nuUHJlfp; dkim=fail header.i=@linux-foundation.org header.s=google header.b=OkGHv4b6; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b100-v6si6840654pli.417.2018.03.12.11.47.13; Mon, 12 Mar 2018 11:47:29 -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=fail header.i=@gmail.com header.s=20161025 header.b=nuUHJlfp; dkim=fail header.i=@linux-foundation.org header.s=google header.b=OkGHv4b6; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932338AbeCLSp4 (ORCPT + 99 others); Mon, 12 Mar 2018 14:45:56 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:33897 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932282AbeCLSpy (ORCPT ); Mon, 12 Mar 2018 14:45:54 -0400 Received: by mail-io0-f196.google.com with SMTP id e7so12682947ioj.1; Mon, 12 Mar 2018 11:45:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=pJcVN4K8MStWv9CMj+HnfDAMBAVRn2sFc/k0DLzj+zY=; b=nuUHJlfpAwIclFrAJvszE8f/C2K+8nQ5uoq8MsR05VsC1tbfehNL/ZnRQG99ZsgK/8 ObKo3Z74399E0ePFdgivoJIh5VrBo9xDMFAlHwXHBbLS4razvoxWX7KL1R5DTWu2aPjj bOhKxdyK6MCceShrZus+Vxe6OIXZV25wY/WqpHWk340AgyvZZd5OemxBAsyN09WD+Bu0 PHChiSwXXEdppaVXrHBq3MhS2yqNUx57z5U3ddHI9P3wij1nuQSjOIlHVACkaPocLa3E oqmxE6ZX4x6reTDeSyKVYgAiBGDUPlbKzYlDFEGONEUJmKpVMJlgA9tS7fqywuhcjcuJ CYnQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=pJcVN4K8MStWv9CMj+HnfDAMBAVRn2sFc/k0DLzj+zY=; b=OkGHv4b6bCA8g8j3L140kPanzxnf0OlATZMXE0FWS9/Kkf23D4lljvYj2YUCXTpIFE AL2EUGUboBL4bEkE4IUusm0nukdd2prw41nUrqpxQqj9CjGOK4+VCPMC3cHScueaMqBS bGfjDcTFq8TrS5a091jJD02S+8eGAcC4Onkzc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=pJcVN4K8MStWv9CMj+HnfDAMBAVRn2sFc/k0DLzj+zY=; b=NApG6kD4p95b77qAymfwLLM3jsgcaDBfzwSYZ3JAwYFeXCIIP10UrV/9Kc4QhURQB8 tGteyncKpkZYJPu3Vie/EXKtgAfOWoDILQv3ABO7o+XycJljnKgCTn016nCVrdQE12re 9xkEX1jB14WoBZB6Q53vNYaqW0DvfxKl/gwJaNvsnipAMaS+hc/q/AmXHgDUjLKlIOzs jYx9B7UGQowa6/Q72oi51Pfu5B5JIFXVfe3geXBcuGlugkhzA566FoXidUH4UpIN72tK d8tGj73Mbq9F2YLylyDNifKBHKTHHnYjBynTcGaqWfC9AsjuVuYB2SpEPK6lbSbWivx5 nTvA== X-Gm-Message-State: AElRT7F89kPFTpoyLJXcjB17KMD3JPxXDSRaQofO9554IU8jaHnpFma0 miNEJNMA5H0R2yywxViSA5z5VvCQydjZvDzB0ok= X-Received: by 10.107.22.1 with SMTP id 1mr10374836iow.238.1520880353882; Mon, 12 Mar 2018 11:45:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.135.221 with HTTP; Mon, 12 Mar 2018 11:45:53 -0700 (PDT) In-Reply-To: <20180312030834.GC8631@eros> References: <1520802418-17284-1-git-send-email-s.mesoraca16@gmail.com> <20180312030834.GC8631@eros> From: Linus Torvalds Date: Mon, 12 Mar 2018 11:45:53 -0700 X-Google-Sender-Auth: fG-oAOXPW5pcXl3KzCUaIUDFkO8 Message-ID: Subject: Re: [PATCH] scsi: eata: drop VLA in reorder() To: "Tobin C. Harding" , Arthur Marsh Cc: Salvatore Mesoraca , Linux Kernel Mailing List , Kernel Hardening , Linux SCSI List , "James E.J. Bottomley" , "Martin K. Petersen" , Dario Ballabio , Kees Cook , kernelnewbies@kernelnewbies.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 On Sun, Mar 11, 2018 at 8:08 PM, Tobin C. Harding wrote: > > I think we are going to see a recurring theme here. MAX_MAILBOXES==64 > so this patch adds 1536 bytes to the stack on a 64 bit machine or 768 > bytes on a 32 bit machine. Yeah, that's a bit excessive. It probably works, but one or two of those allocations will make the kernel stack really tight, so in general I really would suggest using kmalloc() instead, or figuring out some way to simply shrink the data structures. That said, I wonder if the solution to this particular driver is "delete it". Because the hardware is truly ancient and nobody sane would use it any more. The last patch that seemed to come from an actual _user_ finding a problem was in 2008 (commit 20c09df7eb9c: "[SCSI] eata: fix the data buffer accessors conversion regression"). And even then it apparently took a year for people to have noticed the breakage. But because the person who reported that problem is still around, I'll just add him to the cc, just in case. Arthur Marsh, you have the dubious honor and distinction of being the only person to have apparently used that driver in the last ten years. Do you still have hardware using that? Because maybe it's really time to retire that driver. Linus