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  linux-hardening  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:   Fri, 18 Sep 2020 09:54:31 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Jacob Keller <jacob.e.keller@...el.com>, netdev@...r.kernel.org
Subject: Re: [net-next v6 3/5] devlink: introduce flash update overwrite
 mask

On Thu, 17 Sep 2020 17:45:27 -0700 Jacob Keller wrote:
> Sections of device flash may contain settings or device identifying
> information. When performing a flash update, it is generally expected
> that these settings and identifiers are not overwritten.
> 
> However, it may sometimes be useful to allow overwriting these fields
> when performing a flash update. Some examples include, 1) customizing
> the initial device config on first programming, such as overwriting
> default device identifying information, or 2) reverting a device
> configuration to known good state provided in the new firmware image, or
> 3) in case it is suspected that current firmware logic for managing the
> preservation of fields during an update is broken.
> 
> Although some devices are able to completely separate these types of
> settings and fields into separate components, this is not true for all
> hardware.
> 
> To support controlling this behavior, a new
> DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK is defined. This is an
> nla_bitfield32 which will define what subset of fields in a component
> should be overwritten during an update.
> 
> If no bits are specified, or of the overwrite mask is not provided, then
> an update should not overwrite anything, and should maintain the
> settings and identifiers as they are in the previous image.
> 
> If the overwrite mask has the DEVLINK_FLASH_OVERWRITE_SETTINGS bit set,
> then the device should be configured to overwrite any of the settings in
> the requested component with settings found in the provided image.
> 
> Similarly, if the DEVLINK_FLASH_OVERWRITE_IDENTIFIERS bit is set, the
> device should be configured to overwrite any device identifiers in the
> requested component with the identifiers from the image.
> 
> Multiple overwrite modes may be combined to indicate that a combination
> of the set of fields that should be overwritten.
> 
> Drivers which support the new overwrite mask must set the
> DEVLINK_SUPPORT_FLASH_UPDATE_OVERWRITE_MASK in the
> supported_flash_update_params field of their devlink_ops.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@...el.com>

Reviewed-by: Jakub Kicinski <kuba@...nel.org>

Thanks!

Powered by blists - more mailing lists