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] [day] [month] [year] [list]
Message-ID: <20180103080742.6ad76c2d@vento.lan>
Date:   Wed, 3 Jan 2018 08:07:42 -0200
From:   Mauro Carvalho Chehab <mchehab@...pensource.com>
To:     Bryan O'Donoghue <pure.logic@...us-software.ie>
Cc:     mturquette@...libre.com, sboyd@...eaurora.org,
        linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org,
        linux-omap@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-mips@...ux-mips.org, linux-rpi-kernel@...ts.infradead.org,
        patches@...nsource.cirrus.com,
        uclinux-h8-devel@...ts.sourceforge.jp,
        linux-amlogic@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
        linux-soc@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
        linux-rockchip@...ts.infradead.org,
        linux-samsung-soc@...r.kernel.org, linux-tegra@...r.kernel.org,
        dri-devel@...ts.freedesktop.org,
        linux-mediatek@...ts.infradead.org,
        freedreno@...ts.freedesktop.org, linux-media@...r.kernel.org,
        linux-rtc@...r.kernel.org
Subject: Re: [PATCH v3 01/34] clk_ops: change round_rate() to return
 unsigned long

Em Mon,  1 Jan 2018 19:42:40 +0000
Bryan O'Donoghue <pure.logic@...us-software.ie> escreveu:

> Right now it is not possible to return a value larger than LONG_MAX on 32
> bit systems. You can pass a rate of ULONG_MAX but can't return anything
> past LONG_MAX due to the fact both the rounded_rate and negative error
> codes are represented in the return value of round_rate().
> 
> Most implementations either return zero on error or don't return error
> codes at all. A minority of implementations do return a negative number -
> typically -EINVAL or -ENODEV.
> 
> At the higher level then callers of round_rate() typically and rightly
> check for a value of <= 0.
> 
> It is possible then to convert round_rate() to an unsigned long return
> value and change error code indication for the minority from -ERRORCODE to
> a simple 0.
> 
> This patch is the first step in making it possible to scale round_rate past
> LONG_MAX, later patches will change the previously mentioned minority of
> round_rate() implementations to return zero only on error if those
> implementations currently return a negative error number. Implementations
> that do not return an error code of < 0 will be left as-is.
> 

>  drivers/media/platform/omap3isp/isp.c           |  4 ++--

Acked-by: Mauro Carvalho Chehab <mchehab@...pensource.com>

Thanks,
Mauro

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ