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  linux-cve-announce  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]
Message-ID: <72232efa-e29d-9e40-d3f5-96ac7fb556c0@intel.com>
Date:   Fri, 6 Jan 2023 10:50:06 -0800
From:   Jesse Brandeburg <jesse.brandeburg@...el.com>
To:     <m.chetan.kumar@...ux.intel.com>, <netdev@...r.kernel.org>
CC:     <kuba@...nel.org>, <davem@...emloft.net>,
        <johannes@...solutions.net>, <ryazanov.s.a@...il.com>,
        <loic.poulain@...aro.org>, <ilpo.jarvinen@...ux.intel.com>,
        <ricardo.martinez@...ux.intel.com>,
        <chiranjeevi.rapolu@...ux.intel.com>, <haijun.liu@...iatek.com>,
        <edumazet@...gle.com>, <pabeni@...hat.com>, <linuxwwan@...el.com>,
        <linuxwwan_5g@...el.com>, <chandrashekar.devegowda@...el.com>,
        <matthias.bgg@...il.com>, <linux-arm-kernel@...ts.infradead.org>,
        <linux-mediatek@...ts.infradead.org>,
        Mishra Soumya Prakash <soumya.prakash.mishra@...el.com>
Subject: Re: [PATCH v3 net-next 4/5] net: wwan: t7xx: Enable devlink based fw
 flashing and coredump collection

On 1/6/2023 8:27 AM, m.chetan.kumar@...ux.intel.com wrote:
> From: M Chetan Kumar <m.chetan.kumar@...ux.intel.com>
> 
> Adds support for t7xx wwan device firmware flashing & coredump collection
> using devlink.
> 
> 1> Driver Registers with Devlink framework.
> 2> Implements devlink ops flash_update callback that programs modem fw.
> 3> Creates region & snapshot required for device coredump log collection.
> 
> On early detection of wwan device in fastboot mode driver sets up CLDMA0 HW
> tx/rx queues for raw data transfer and then registers to devlink framework.
> On user space application issuing command for firmware update the driver
> sends fastboot flash command & firmware to program NAND.
> 
> In flashing procedure the fastboot command & response are exchanged between
> driver and device. Once firmware flashing is success completion status is
> reported to user space application.
> 
> Below is the devlink command usage for firmware flashing
> 
> $devlink dev flash pci/$BDF file ABC.img component ABC
> 
> Note: ABC.img is the firmware to be programmed to "ABC" partition.
> 
> In case of coredump collection when wwan device encounters an exception
> it reboots & stays in fastboot mode for coredump collection by host driver.
> On detecting exception state driver collects the core dump, creates the
> devlink region & reports an event to user space application for dump
> collection. The user space application invokes devlink region read command
> for dump collection.
> 
> Below are the devlink commands used for coredump collection.
> 
> devlink region new pci/$BDF/mr_dump
> devlink region read pci/$BDF/mr_dump snapshot $ID address $ADD length $LEN
> devlink region del pci/$BDF/mr_dump snapshot $ID
> 
> Signed-off-by: M Chetan Kumar <m.chetan.kumar@...ux.intel.com>
> Signed-off-by: Devegowda Chandrashekar <chandrashekar.devegowda@...el.com>
> Signed-off-by: Mishra Soumya Prakash <soumya.prakash.mishra@...el.com>
> --
> v3:
>   * No Change.
> v2:
>   * Remove devlink pointer inside the port state container.
>   * Rename t7xx_devlink_region_list to t7xx_devlink_region_infos &
>     use region index in initialization.
>   * Change t7xx_devlink_region_infos to const.
>   * Handle remaining packet data if the buffer is less than the skb data.
>   * Drop t7xx_devlink_fb_send_buffer(), push fragmentation logic to
>     t7xx_devlink_port_write().
>   * Add "\n" to log message.
>   * Move mrdump_region allocation to devlink initialization.
>   * Drop snprintf for CTS command fill.
>   * Drop intermediate mdata buffer & zipsize.
>   * For mcmd use strcmp instead of strncmp.
>   * Drop set_fastboot_dl instead use devlink param for fastboot operational mode.
>   * Drop unnecessary logs.
>   * Change t7xx_devlink_create_region to t7xx_devlink_create_regions.
>   * Use BUILD_BUG_ON on array size checks.
>   * Use ARRAY_SIZE inside loop.
>   * Correct indentation.
>   * Drop odd empty line.
>   * Push common devlink initialization code to t7xx_devlink_init.
>   * Use skb_queue_purge instead of running loop to free skbs.
>   * Change t7xx_regions index to enums.
>   * Remove dev in devlink container.
>   * Refactor struct to separate out devlink static and dynamic data structs.
>   * Use min_t.
>   * Drop unnecessary var assginment during initialization.
>   * Change while() to for().
>   * Correct size check.
>   * Rename result to ret.
>   * Clean-up error handling path in t7xx_devlink_fb_get_core & t7xx_devlink_fb_dump_log.
>   * Drop __func__ in log message.
>   * Change NOTY to NOTIFY.
>   * Push channel enable or disable cb to port proxy.
>   * Use array index in t7xx_devlink_region_list initialization.
>   * Drop t7xx_port_proxy_get_port_by_name() instead access port name directly via port_prox.
>   * Drop udev based event reporting logic.
>   * Drop get_core prefix in goto label.
>   * Remove unnessary header files.
>   * Allocate memory for mrdump_region->buf inside get_core.
>   * Remove 'region->buf' in t7xx_devlink_region_snapshot.
>   * Destroy workqueue on following error case in 'devlink_init'.
>   * Remove useless checks(dl->mode) and condition(dl->wq).
>   * Support devlink component versioning.
>   * Kconfig changes to select devlink.

LGTM, but I wouldn't mind having someone with more devlink flash 
experience review.

Reviewed-by: Jesse Brandeburg <jesse.brandeburg@...el.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ