Received: by 10.213.65.16 with SMTP id m16csp194361imf; Sun, 11 Mar 2018 23:38:56 -0700 (PDT) X-Google-Smtp-Source: AG47ELtGcxunHGPlB4tYF0Wfr5Y9AnMbN46gZyXt2mtzHLbWrmkvNPkJl/gzVwAZVY62ovhkjKho X-Received: by 10.99.126.22 with SMTP id z22mr5844751pgc.131.1520836736129; Sun, 11 Mar 2018 23:38:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520836736; cv=none; d=google.com; s=arc-20160816; b=pNxWimFvRVSlv8LRNfC99PWgW+lDPCVHWcuRlFECf+sG2u6UC3YDjG5XlEt2lyf/0M XyFXdq8oO6y+b0xaCYLezElKQgY4gu2XD+iX3w8QxaD6Co0mKP5Co+eKtbE9zM5FJzVJ B5gRQOUa0vAIkri/Tpy5LrAG4P36XYwdI5omyoSE+Zwuy5a6SmKbzEWe01EKJbI9hxVk +6GjwscJKyDAR5pbLgix5dFzuhYmYU2nvgEQeQGK5CZgBZnTZ1roML/KmwojXjagobOH 7iwppBcWFzblzg+XCIsA/fLJTA37DVQPdGXLFZWC6XHkxgz6cLPJoTFZ6RioWCJmOtwn 8Qdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-transfer-encoding :mime-version:references:in-reply-to:subject:cc:to:from :arc-authentication-results; bh=BzPbi3eZO9uhMlKiRa9VEVaWnshxiVQk05HDx/vVkoE=; b=kwwqLQheYmA9Oe/0XUQ+nWE7DBWCFvurVx07W7JSRgwr+zTjMEhJuOE7/MOJh3C8cy 3RoKPNiVqvNYi8hXfgThogRAFCYIvEp4nb0dCadlnwQsvfHOZfRxEt1WcTfhwPvMdgVv 9tsc9N16b2zuWYusVkC9I86TETQ0GI16TBX2KtNAq1Eg+Z1hd0or7+can45YIDa8MM8O PdKhv5zg0uOCqsWnzxcZlYyw1FYeCkaiNHiu9NmwOyVBUHN/TXatf63yN3hXG1y8g/h/ JgjKeIsVg2npComoWU7XkE/w00XwsIiH8sBfbHxLn+hMqCd4NQI1U/z5ARtnm+evdraD LjHw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=vt.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9si5286348pfl.193.2018.03.11.23.38.42; Sun, 11 Mar 2018 23:38:56 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=vt.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752041AbeCLGgu (ORCPT + 99 others); Mon, 12 Mar 2018 02:36:50 -0400 Received: from outbound.smtp.vt.edu ([198.82.183.121]:59194 "EHLO omr1.cc.vt.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751976AbeCLGgs (ORCPT ); Mon, 12 Mar 2018 02:36:48 -0400 Received: from mr3.cc.vt.edu (mr3.cc.ipv6.vt.edu [IPv6:2607:b400:92:8500:0:7f:b804:6b0a]) by omr1.cc.vt.edu (8.14.4/8.14.4) with ESMTP id w2C6alAF001038 for ; Mon, 12 Mar 2018 02:36:47 -0400 Received: from mail-qt0-f198.google.com (mail-qt0-f198.google.com [209.85.216.198]) by mr3.cc.vt.edu (8.14.7/8.14.7) with ESMTP id w2C6agXc012679 for ; Mon, 12 Mar 2018 02:36:47 -0400 Received: by mail-qt0-f198.google.com with SMTP id z17so11931677qti.1 for ; Sun, 11 Mar 2018 23:36:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :mime-version:content-transfer-encoding:date:message-id; bh=BzPbi3eZO9uhMlKiRa9VEVaWnshxiVQk05HDx/vVkoE=; b=XTVeA2ktJFjkz2rwTk2IAjwrxLCa1Xfy1/6Hr9ZWfVT2WR7lL8aMKCq0xUqT8uKGYy V71x+nzByOPy3RcUS3V60FGcG20xNaRdZFu+voHL9oNTB5aNMFSLAR6316bxUxKZtigu w/oReCRzFb24yEq4o0Cyg9TDCZVMGJpBYV43x6XQZaQOU3m4jr0HJwz0QQxQUwa+wJjI oRWFVYNCxKerE8pynvIaa7skO6AHu9Gz+RiIglMPRMwlhw77WUWqfNZAC2CzfvEIh8l3 3fsZnU4xh1f3QVY50T1DmwfGS61fRqNvfFdJKMHXgLk4VeoVo1EtKlC3En54KflYUXIp 2+ug== X-Gm-Message-State: AElRT7HKpfgcMFsx2bzX64EIFB6Vi4pjHB7GEHK80+i4gKSUq4AZLdG7 DpFYMSCFLCit3T2T39IcGDyndzkkrH4By4fiRYxjWf5UIXb9VdfACeJeI5RGfXKjzLcrlm8trOv MO7ybcvtrPpukvy8pVU9jTSduCLu+HKaImFk= X-Received: by 10.237.49.105 with SMTP id 96mr10519146qtg.192.1520836602181; Sun, 11 Mar 2018 23:36:42 -0700 (PDT) X-Received: by 10.237.49.105 with SMTP id 96mr10519128qtg.192.1520836601871; Sun, 11 Mar 2018 23:36:41 -0700 (PDT) Received: from turing-police.cc.vt.edu ([2601:5c0:c001:4342:c151:2a51:8747:fc37]) by smtp.gmail.com with ESMTPSA id v73sm4574872qkb.72.2018.03.11.23.36.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Mar 2018 23:36:40 -0700 (PDT) From: valdis.kletnieks@vt.edu X-Google-Original-From: Valdis.Kletnieks@vt.edu X-Mailer: exmh version 2.8.0 04/21/2017 with nmh-1.7+dev To: "Tobin C. Harding" Cc: Salvatore Mesoraca , linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com, linux-scsi@vger.kernel.org, "James E.J. Bottomley" , "Martin K. Petersen" , Dario Ballabio , Kees Cook , Linus Torvalds , kernelnewbies@kernelnewbies.org Subject: Re: [PATCH] scsi: eata: drop VLA in reorder() In-Reply-To: <20180312030834.GC8631@eros> References: <1520802418-17284-1-git-send-email-s.mesoraca16@gmail.com> <20180312030834.GC8631@eros> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1520836598_3502P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Mon, 12 Mar 2018 02:36:38 -0400 Message-ID: <134937.1520836598@turing-police.cc.vt.edu> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --==_Exmh_1520836598_3502P Content-Type: text/plain; charset=us-ascii On Mon, 12 Mar 2018 14:08:34 +1100, "Tobin C. Harding" said: > removal patch that 768 was a lot of stack space. That comment did, > however say 'deep in some transfer call chain'. I don't know what a > 'transfer call chain' (the transfer bit) is but is there some heuristic > we can use to know how deep is deep? Or more to the point, is there some > heuristic we can use to know what is an acceptable amount of stack space > to use? The canonical "why we put kernel stacks on a diet" configuration: Imagine a bunch of ISCSI targets - with IPSec wrapping the connection. Arranged into a software RAID5. With LVM. With encryption on the LV. With XFS on the encrypted LV. And then the in-kernel sharing it out over NFS. With more IPSec wrapping the NFS TCP connection. Oh, and I/O interrupts, just for fun. And most of all of that has to fit their *entire* stack chain into 2 4K pages. Suddenly, that 768 bytes is taking close to 10% of *all* of the stack that all of that call chain has to share. And I see that patch is against scsi/eata.c - which means it can plausibly end up sharing that stack scenario above starting at 'software raid5'. (For bonus points, the alert reader is invited to figure out which stack each of the above actually ends up on. No, it isn't split across enough stacks that taking 768 bytes out of any of them is acceptable.. :) --==_Exmh_1520836598_3502P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Comment: Exmh version 2.8.0 04/21/2017 iQEVAwUBWqYf9o0DS38y7CIcAQLwGwgAsbjEunB2hZFHsWdo75SIaBMf5iCRpt18 8TZdZJwgBLqT/6mndzwmwc4DynfPCoxsE+fNsfTcTumGNiqWiBVPKM9YQhCvkdu4 Iygpn6H23C6pgSzExzwNuGGstGyVh9fLsiLBiU07aFQA0ReINi9XZGZscrrDbO2T cr4XIuJ0onTJX7367zOGBDNrFVfpO9ZJby7Zjy/1FL6XPg7IV6lUz4ciYAK2tcbv 0gb6AQdDSyz3BJcEorYoLc1wmdEBAiJ/UjGYL8c6V4O7jazhNl0pMn2HWuhupqKE HhlMt5TyCpt6fHYgSQqiNPidq5fvmqWut4bKY3EZwRf8YKUMHgNeAQ== =jNqk -----END PGP SIGNATURE----- --==_Exmh_1520836598_3502P--