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: <20191017060247.GA12487@codeaurora.org>
Date:   Wed, 16 Oct 2019 23:02:47 -0700
From:   Guru Das Srinagesh <gurus@...eaurora.org>
To:     Thierry Reding <thierry.reding@...il.com>
Cc:     linux-pwm@...r.kernel.org, kernel-team@...roid.com,
        Mark Salyzyn <salyzyn@...gle.com>,
        Sandeep Patil <sspatil@...gle.com>,
        Subbaraman Narayanamurthy <subbaram@...eaurora.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] pwm: Convert period and duty cycle to u64

On Wed, Oct 16, 2019 at 12:15:39PM +0200, Thierry Reding wrote:
> On Tue, Oct 15, 2019 at 07:11:39PM -0700, Guru Das Srinagesh wrote:
> > Because period and duty cycle are defined as ints with units of
> > nanoseconds, the maximum time duration that can be set is limited to
> > ~2.147 seconds. Change their definitions to u64 so that higher durations
> > may be set.
> > 
> > Signed-off-by: Guru Das Srinagesh <gurus@...eaurora.org>
> > ---
> >  drivers/pwm/core.c  |  4 ++--
> >  drivers/pwm/sysfs.c | 10 +++++-----
> >  include/linux/pwm.h | 16 ++++++++--------
> >  3 files changed, 15 insertions(+), 15 deletions(-)
> 
> Actually, we can't do that without further preparatory work. The reason
> is that consumers use the period and duty_cycle members in computations
> of their own, which lead to errors such as this:
> 
> 	armv7l-unknown-linux-gnueabihf-ld: drivers/video/backlight/pwm_bl.o: in function `pwm_backlight_probe':
> 	pwm_bl.c:(.text+0x3b0): undefined reference to `__aeabi_uldivmod'
> 
> So I think we need to audit all consumers carefully and make sure that
> they use do_div() where necessary to avoid such errors.
> 
> Thierry

Hi Thierry,

I would like to try doing the preparatory work by fixing the errors seen
in consumers so that this u64 patch may be applied without issues.

Before sending the patch, I tried "make"-ing for arm, arm64 and i386
architectures to check for compilation/linking errors and encountered
none. I see that the above error arises from using a cross-compiler for
arm v7, which I haven't tried yet.

Could you please provide details of the compile tests that you run at
your end? I could then try to reproduce the errors you see in the
consumer drivers and fix them. Please do share any other ideas or
suggestions you may have in this regard.

Thank you.

Guru Das.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ