From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753374AbbJUC5x (ORCPT ); Tue, 20 Oct 2015 22:57:53 -0400 Received: from m12-11.163.com ([220.181.12.11]:36428 "EHLO m12-11.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753289AbbJUC5j (ORCPT ); Tue, 20 Oct 2015 22:57:39 -0400 Date: Tue, 20 Oct 2015 19:52:55 -0700 From: Geliang Tang To: Kees Cook Cc: Anton Vorontsov , Colin Cross , Tony Luck , Geliang Tang , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/3] pstore: add pstore unregister Message-ID: <20151021025255.GA7402@ubuntu> References: <3908561D78D1C84285E8C5FCA982C28F32B59323@ORSMSX114.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-CM-TRANSID: C8CowEB55FQI_iZWgV7lEQ--.8495S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7KFWrZw1DXF43WrWxCrW7Jwb_yoW8WF1rpr 4kGr909F4UJ34xJF1DWFn0grn0kFWfAr1fKr4vkry0q3W5CFn7uay0v3W3GFWxZrW5Kw17 try5A3yDCr98Ja7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0zRQTmgUUUUU= X-Originating-IP: [218.17.162.133] X-CM-SenderInfo: 5jhoxtpqjwt0rj6rljoofrz/1tbiJQyamVUL7oHqTAAAs9 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 20, 2015 at 10:19:09AM -0700, Kees Cook wrote: > On Tue, Oct 20, 2015 at 12:39 AM, Geliang Tang wrote: > > On Mon, Oct 19, 2015 at 10:56:54PM +0000, Luck, Tony wrote: > >> Thanks for looking to close out this TODO item. > >> > >> The thing that scared me about unloading pstore was what happens to > >> a process that is in the middle of reading some /sys/fs/pstore/file-name-here > > Were you able to verify that this reading-while-rmmod case works correctly? > > -Kees $ sudo insmod zlib_deflate.ko $ sudo insmod pstore.ko $ lsmod Module Size Used by pstore 11225 0 zlib_deflate 18292 1 pstore $ sudo mount -t pstore pstore /sys/fs/pstore $ lsmod Module Size Used by pstore 11225 1 zlib_deflate 18292 1 pstore $ sudo insmod reed_solomon.ko $ sudo insmod ramoops.ko mem_address=0x40000000 mem_size=0x400000 $ lsmod Module Size Used by ramoops 9638 0 reed_solomon 5150 1 ramoops pstore 11225 2 ramoops zlib_deflate 18292 1 pstore $ tail -f /sys/fs/pstore/console-ramoops-0 & [1] 3483 $ lsmod Module Size Used by ramoops 9638 0 reed_solomon 5150 1 ramoops pstore 11225 3 ramoops zlib_deflate 18292 1 pstore $ kill -9 3483 $ lsmod Module Size Used by ramoops 9638 0 reed_solomon 5150 1 ramoops pstore 11225 2 ramoops zlib_deflate 18292 1 pstore $ sudo rmmod ramoops $ lsmod Module Size Used by reed_solomon 5150 0 pstore 11225 1 zlib_deflate 18292 1 pstore $ sudo umount /sys/fs/pstore/ $ lsmod Module Size Used by reed_solomon 5150 0 pstore 11225 0 zlib_deflate 18292 1 pstore $ sudo rmmod pstore $ lsmod Module Size Used by reed_solomon 5150 0 zlib_deflate 18292 0 Thanks. Geliang Tang