Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757711AbcJXWDB (ORCPT ); Mon, 24 Oct 2016 18:03:01 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:40466 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751821AbcJXWC6 (ORCPT ); Mon, 24 Oct 2016 18:02:58 -0400 Subject: Re: bio linked list corruption. To: Linus Torvalds , Andy Lutomirski References: <20161018234248.GB93792@clm-mbp.masoncoding.com> <332c8e94-a969-093f-1fb4-30d89be8993e@kernel.org> <20161020225028.czodw54tjbiwwv3o@codemonkey.org.uk> <20161020230341.jsxpia2sy53xn5l5@codemonkey.org.uk> <20161021200245.kahjzgqzdfyoe3uz@codemonkey.org.uk> <20161022152033.gkmm3l75kqjzsije@codemonkey.org.uk> <20161024044051.onmh4h6sc2bjxzzc@codemonkey.org.uk> CC: Dave Jones , Andy Lutomirski , Jens Axboe , Al Viro , Josef Bacik , David Sterba , linux-btrfs , Linux Kernel From: Chris Mason Message-ID: Date: Mon, 24 Oct 2016 18:02:35 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [2620:10d:c091:180::773d] X-ClientProxiedBy: BL2PR19CA0001.namprd19.prod.outlook.com (10.167.113.11) To DM5PR15MB1244.namprd15.prod.outlook.com (10.173.209.138) X-MS-Office365-Filtering-Correlation-Id: 90cb1a06-657f-4120-96b0-08d3fc5979c1 X-Microsoft-Exchange-Diagnostics: 1;DM5PR15MB1244;2:BWRSgSUaj1WsspmLEoh90PXlFzGTpMBiXUzpnJkOu81lTC8YrCQIelOL7lAixqZs51lXHegZUCI1dxQx18GEqWsIPGpRaCDnhTnoM2aEW9SrKfTRGZ88cxvAIHvlVCDsVGGcHlTdB8s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oS3X0LNFpCGyUxquPROBKkBAGjZh19dO+HVPkTMxgEAaIOUOqYioN/OF8+yAEr2fhOZawwwsKzQ4cIT26BwukvRhxEfHDuo=;4:Sd2CwWoWykYILA32Oc9pZ47uaTeqMqDfSIy6urX8H8zzxzpxcgxSNd7/FWtFTwSGRMfs51DWKTtQMXjaBuLz+ZJD3vPZhTkz8kYPyaGOOxBP0uZQbF3YJg4Ip3Dud5YYi4XMKuNiXLIu3jGnBSnd6blBRQjVBJFaRa9udZgfvfXinwZIpU3dIKmW74a7Y0D0wq2b9AqU9j84xdEnp1JcAnG3QSjLszN5Ry6WA1avzUoOS2Tz1uWN4h/W7vPqn1+RhTA5SlI8tBTGjvJAWbhMt3HkhhwNeC79S5RIZOTVtcOHFbFikDsMn2LdbahT7E+FsMglU7GKjXd2mMN9jbSkSCM0sJIc7bfLxQnDnlUWJ3kepUTzPJwAIk7RHwTzx2OXm/Eq5UZbQQdvLCDAJ8EERQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001);SRVR:DM5PR15MB1244;BCL:0;PCL:0;RULEID:;SRVR:DM5PR15MB1244; X-Forefront-PRVS: 0105DAA385 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(7916002)(24454002)(189002)(377454003)(199003)(54094003)(189998001)(2906002)(68736007)(8676002)(36756003)(586003)(50466002)(1706002)(101416001)(6116002)(4326007)(65806001)(305945005)(6666003)(7846002)(65956001)(47776003)(81166006)(230700001)(81156014)(19580395003)(19580405001)(42186005)(3480700004)(7736002)(31686004)(50986999)(76176999)(54356999)(65826007)(83506001)(106356001)(4001350100001)(5660300001)(64126003)(105586002)(2950100002)(77096005)(33646002)(5001770100001)(86362001)(93886004)(97736004)(92566002)(23676002)(31696002)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR15MB1244;H:[IPv6:2620:10d:c0a1:1110:8000::204d];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjE1TUIxMjQ0OzIzOmNyYUw1TElWUnRqNUluMmFkY0tQTnZRRW9V?= =?utf-8?B?bnpBc2gvWUQ5eG1mS3BSVnNNMTlNMHYwU0txNG1MZzFoZkJkVzI5S2NTdEtp?= =?utf-8?B?bXl2SUE0bHluVENFWjBZM1dWeXpSZHBTejNoS1pIc01jQU1QZldNeHFzcGNu?= =?utf-8?B?M0lXQks3TWh5V2VMSnpyT3hTRkZTenRwUEQxNzZNTWErQ0JwYzV5VVh2ZDcy?= =?utf-8?B?cG1oVGVhcVhiUncrSjJMelVHampwRlYzdU11ZjhGditzU1NtTWFXS0w1QTNX?= =?utf-8?B?WUR0QWRtczF6MXJSZS9lSW1OVmxLRWtnQ3k1cXlwK1hxWXFtNEZBOUFTVkhv?= =?utf-8?B?b2lPb0lZOWhkUElIYzdHUXVQcW1kY25ncmg1WDFac3lFeGdBUGlJVktPbVlE?= =?utf-8?B?d0NFRlBXVW9IWjNzNEV4Z2xQRElGTFAwcHVmWFFGV25ZU2VuWVNIVlhrZGJn?= =?utf-8?B?LzVic2JyR0FPNXJ5N0M2dFhQOFFVZDZLUVp4NkpUMHl0Z1VkVk9scTR2YXp0?= =?utf-8?B?WGEzSWNiVVVqQjRXZExMekdLenltSm1uN2ZUclZvbGcxN1RtZkFhcG03bTB1?= =?utf-8?B?Wm10QTRHKzJYbHZpNUQ3a214b3hSLzU3cm0zempqL05UVTd4MmxJWHVoYmYz?= =?utf-8?B?T09GNG9BTzVVSzBmaVU3b3ZKWU50bmYvRGFEVm9acU42RFVicUNJTzJBR0lq?= =?utf-8?B?Q3lnRno4V3FZR290ZVozeTVLT09uUVl3WW93Z1k2bGo1cGhGc0UyMUs5a29z?= =?utf-8?B?czBWQ1prSll3eVRJMmdhRG5OSDUxbW9hWG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SWbHwowR4DnviCH8a3HnRlrq32GSiGflr5JolymE5oJPZlmacS+s0zUlSYd1eSShShHkL7yH0IYdk+Vkk4/EZcWnjyaR+2XojSXzHit4d9c= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR15MB1244;20:nQ8KAuudI2VxK0hnk3iIZyXvk1mBbjtlWm7mWLt7b3CDB8widwv8Ph7DuHDofgbyqN0yROQbmXxqpieC/mnJmP+CMMqcOE3CZp2zmU0f/vKzNHRruG6rK7IiGw28Al3YlVDJs8xdYc4dokwvZda13ov6JbyJ1iRhsShF/lCuFW0= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2016 22:02:40.1159 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR15MB1244 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-24_16:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 854 Lines: 20 On 10/24/2016 05:50 PM, Linus Torvalds wrote: > On Mon, Oct 24, 2016 at 2:17 PM, Linus Torvalds > wrote: >> >> The vmalloc/vfree code itself is a bit scary. In particular, we have a >> rather insane model of TLB flushing. We leave the virtual area on a >> lazy purge-list, and we delay flushing the TLB and actually freeing >> the virtual memory for it so that we can batch things up. > > Never mind. If DaveJ is running with DEBUG_PAGEALLOC, then the code in > vmap_debug_free_range() should have forced a synchronous TLB flush fro > vmalloc ranges too, so that doesn't explain it either. > My big fear here is that we're just triggering an old stack corruption more reliably. I wonder if we can make it happen much faster by restricting the stacks to a static list and cycling through them in lifo fashion? -chris