lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 7 Mar 2019 09:01:33 +0800
From:   liaoweixiong <liaoweixiong@...winnertech.com>
To:     Randy Dunlap <rdunlap@...radead.org>,
        Kees Cook <keescook@...omium.org>,
        Anton Vorontsov <anton@...msg.org>,
        Colin Cross <ccross@...roid.com>,
        Tony Luck <tony.luck@...el.com>,
        Jonathan Corbet <corbet@....net>,
        Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Arnd Bergmann <arnd@...db.de>, Rob Herring <robh@...nel.org>
Cc:     linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v12 2/4] pstore/blk: add blkoops for pstore_blk

Hi,

I will fix all on next version. Thank you very much.

On 2019-03-06 09:14, Randy Dunlap wrote:
> Hi,
> 
> On 2/27/19 11:12 PM, liaoweixiong wrote:
>> diff --git a/fs/pstore/Kconfig b/fs/pstore/Kconfig
>> index defcb75..7dfe00b 100644
>> --- a/fs/pstore/Kconfig
>> +++ b/fs/pstore/Kconfig
>> @@ -160,3 +160,117 @@ config PSTORE_BLK
>>  	help
>>  	  This enables panic and oops message to be logged to a block dev
>>  	  where it can be read back at some later point.
>> +
>> +config PSTORE_BLKOOPS
>> +	tristate "pstore block with oops logger"
>> +	depends on PSTORE_BLK
>> +	help
>> +	  This is a sample for pstore block with oops logger.
>> +
>> +	  It CANNOT record panic log as no read/write apis for panic registered.
> 
> 	                                              APIs
> 

Fixed.

>> +
>> +	  It CAN record oops log even power failure if
>> +	  "PSTORE_BLKOOPS_BLKDEV" on Kconfig or "block-device" on dts or
>> +	  "blkdev" on module parameter is valid.
>> +
>> +	  Otherwise, it can only record data to ram buffer, which will be
>> +	  dropped when reboot.
> 
> 	  dropped on reboot.
> or
> 	  dropped when rebooting.
> 

Fixed.

>> +
>> +	  NOTE that, there are three ways to set parameters of blkoops and
>> +	  prioritize according to configuration flexibility. That is
>> +	  Kconfig < device tree < module parameters. It means that the value can
>> +	  be overwritten by higher priority settings.
>> +	  1. Kconfig
>> +	     It	just sets a default value.
>> +	  2. device tree
>> +	     It is set on device tree, which will overwrites value from Kconfig,
> 
> 	                                          overwrite the value from Kconfig,
> 

Fixed.

>> +	     but can also be overwritten by module parameters.
>> +	  3. module parameters
>> +	     It is the first priority. Take care of that blkoops will take lower
>> +	     priority settings if higher priority one do not set.
>> +
>> +config PSTORE_BLKOOPS_DMESG_SIZE
>> +	int "dmesg size in kbytes for blkoops"
>> +	depends on PSTORE_BLKOOPS
>> +	default 64
>> +	help
>> +	  This just sets size of dmesg (dmesg_size) for pstore/blk. The value
>> +	  must be a multiple of 4096.
>> +
>> +	  NOTE that, there are three ways to set parameters of blkoops and
>> +	  prioritize according to configuration flexibility. That is
>> +	  Kconfig < device tree < module parameters. It means that the value can
>> +	  be overwritten by higher priority settings.
>> +	  1. Kconfig
>> +	     It	just sets a default value.
>> +	  2. device tree
>> +	     It is set on device tree, which will overwrites value from Kconfig,
> 
> 	                                          overwrite the value from Kconfig,
> 

It cancels device tree support. I forget to delete it.

>> +	     but can also be overwritten by module parameters.
>> +	  3. module parameters
>> +	     It is the first priority. Take care of that blkoops will take lower
>> +	     priority settings if higher priority one do not set.
>> +
>> +config PSTORE_BLKOOPS_TOTAL_SIZE
>> +	int "total size in kbytes for blkoops"
>> +	depends on PSTORE_BLKOOPS
>> +	default 0
>> +	help
>> +	  The total size in kbytes pstore/blk can use. It must be less than or
>> +	  equal to size of block device if @blkdev valid. If @total_size is zero
>> +	  with @blkdev, @total_size will be set to equal to size of @blkdev.
> 
> 	                                    set equal to size of @blkdev.
> 

Fixed.

>> +	  The value must be a multiple of 4096.
>> +
>> +	  NOTE that, there are three ways to set parameters of blkoops and
>> +	  prioritize according to configuration flexibility. That is
>> +	  Kconfig < device tree < module parameters. It means that the value can
>> +	  be overwritten by higher priority settings.
>> +	  1. Kconfig
>> +	     It	just sets a default value.
>> +	  2. device tree
>> +	     It is set on device tree, which will overwrites value from Kconfig,
> 
> 	                                          overwrite the value from Kconfig,
> 

Fixed.

>> +	     but can also be overwritten by module parameters.
>> +	  3. module parameters
>> +	     It is the first priority. Take care of that blkoops will take lower
>> +	     priority settings if higher priority one do not set.
>> +
>> +config PSTORE_BLKOOPS_BLKDEV
>> +	string "block device for blkoops"
>> +	depends on PSTORE_BLKOOPS
>> +	default ""
>> +	help
>> +	  This just sets block device (blkdev) for pstore/blk. Pstore/blk
>> +	  will record data to this block device to avoid losing data due to
>> +	  power failure. So, If it is not set, pstore/blk will drop all data
> 
> 	                     if
> 

Fixed.

>> +	  when reboot.
> 
> 	  on reboot.
> 

Fixed.

>> +
>> +	  It accpet the following variants:
> 
> 	     accepts
> 

Fixed.

>> +	  1) <hex_major><hex_minor> device number in hexadecimal represents
>> +	     itself no leading 0x, for example b302.
>> +	  2) /dev/<disk_name> represents the device number of disk
>> +	  3) /dev/<disk_name><decimal> represents the device number
>> +	     of partition - device number of disk plus the partition number
>> +	  4) /dev/<disk_name>p<decimal> - same as the above, that form is
> 
> 	                                              above; this form is
> 

Fixed.

>> +	     used when disk name of partitioned disk ends on a digit.
> 
> 	                                             ends with a digit.
> 

Fixed.

>> +	  5) PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF representing the
>> +	     unique id of a partition if the partition table provides it.
>> +	     The UUID may be either an EFI/GPT UUID, or refer to an MSDOS
>> +	     partition using the format SSSSSSSS-PP, where SSSSSSSS is a zero-
>> +	     filled hex representation of the 32-bit "NT disk signature", and PP
>> +	     is a zero-filled hex representation of the 1-based partition number.
>> +	  6) PARTUUID=<UUID>/PARTNROFF=<int> to select a partition in relation
>> +	     to a partition with a known unique id.
>> +	  7) <major>:<minor> major and minor number of the device separated by
>> +	     a colon.
>> +
>> +	  NOTE that, there are three ways to set parameters of blkoops and
>> +	  prioritize according to configuration flexibility. That is
>> +	  Kconfig < device tree < module parameters. It means that the value can
>> +	  be overwritten by higher priority settings.
>> +	  1. Kconfig
>> +	     It	just sets a default value.
>> +	  2. device tree
>> +	     It is set on device tree, which will overwrites value from Kconfig,
> 
> 	                                          overwrite the value from Kconfig,
> 

Fixed.

>> +	     but can also be overwritten by module parameters.
>> +	  3. module parameters
>> +	     It is the first priority. Take care of that blkoops will take lower
>> +	     priority settings if higher priority one do not set.
> 
> 

-- 
liaoweixiong

Powered by blists - more mailing lists