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: <d6401cc5-990c-e46c-2d5c-148ce76c8b79@roeck-us.net>
Date:   Tue, 14 Mar 2023 09:14:50 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        William Breathitt Gray <william.gray@...aro.org>
Cc:     Wim Van Sebroeck <wim@...ux-watchdog.org>,
        linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org,
        Paul Demetrotion <pdemetrotion@...systems.com>,
        techsupport@...systems.com
Subject: Re: [PATCH v2] watchdog: ebc-c384_wdt: Migrate to the regmap API

On 3/14/23 08:50, Andy Shevchenko wrote:
> On Tue, Mar 14, 2023 at 11:29:16AM -0400, William Breathitt Gray wrote:
>> The regmap API supports IO port accessors so we can take advantage of
>> regmap abstractions rather than handling access to the device registers
>> directly in the driver.
> 
> ...
> 
>>   - Utilize watchdog_set_drvdata() and watchdog_get_drvdata()
> 
> I'm wondering why you can't use dev_get_regmap() instead.
> 

That function is quite expensive to use in code that is called
for each register access. Its typical use is to get the regmap
for a driver once and store it in a local data structure, not
to use it for each access.

Guenter

>>   - Map watchdog control registers based on offset 0x1 and adjust regmap
>>     configurations accordingly; offset 0x0 is unused in this driver so we
>>     should avoid unnecessary exposure of it
> 
> I'm wondering what bad could happen if you expose it.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ