Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753288AbbDGR7C (ORCPT ); Tue, 7 Apr 2015 13:59:02 -0400 Received: from arcturus.aphlor.org ([188.246.204.175]:51813 "EHLO arcturus.aphlor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751735AbbDGR67 (ORCPT ); Tue, 7 Apr 2015 13:58:59 -0400 Date: Tue, 7 Apr 2015 13:58:38 -0400 From: Dave Jones To: Linus Torvalds Cc: Sasha Levin , Ingo Molnar , Michal Hocko , Borislav Petkov , LKML , Rusty Russell , the arch/x86 maintainers Subject: Re: Hang on large copy_from_user with PREEMPT_NONE Message-ID: <20150407175838.GA2898@codemonkey.org.uk> Mail-Followup-To: Dave Jones , Linus Torvalds , Sasha Levin , Ingo Molnar , Michal Hocko , Borislav Petkov , LKML , Rusty Russell , the arch/x86 maintainers References: <5522D9A8.5080104@oracle.com> <20150407093145.GA10348@gmail.com> <20150407103955.GB14095@pd.tnic> <20150407110531.GA14136@gmail.com> <20150407143009.GG7935@dhcp22.suse.cz> <20150407143710.GA18777@gmail.com> <55240D40.6030206@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Report: Spam report generated by SpamAssassin on "arcturus.aphlor.org" Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Authenticated-User: davej@codemonkey.org.uk Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1074 Lines: 28 On Tue, Apr 07, 2015 at 10:33:49AM -0700, Linus Torvalds wrote: > On Tue, Apr 7, 2015 at 10:00 AM, Sasha Levin wrote: > > > > It locks up quickly without KASan as well. > > I suspect it's some virtualization artifact, where the writes cause > COW faults (or just memory allocations) in the L0 domain. > > Whatever. It's probably not worth fighting. Either we just decide that > "copy_from_user()" shouldn't bother to zero huge areas (limit the > zeroing to some arbitrary size), or we just special-case the module > loading. > > +#define COPY_CHUNK_SIZE (16*PAGE_SIZE) This needs to be bigger, just to accomodate things like xfs, which on my system is over 1mb. I think some out-of-tree modules (not that I care deeply) are even bigger. Special casing might be an easier call. Dave -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/