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: <1e365b63-64da-4ad6-9fea-1026c55b88a3@stanley.mountain>
Date: Tue, 27 Aug 2024 00:56:13 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Riyan Dhiman <riyandhiman14@...il.com>
Cc: gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
	linux-staging@...ts.linux.dev
Subject: Re: [PATCH] staging: vme_user: Remove unnecessary type casting and
 data type of geoid to u32

On Mon, Aug 26, 2024 at 08:14:30PM +0530, Riyan Dhiman wrote:
> Removed unncessesary typecasting to int.
> Changed geoid data type to u32 because it will always going to be positive.
> 

This does several things that aren't necessarily related.  But it really needs
to add some bounds checking to the probe() function to ensure that geoid is < 31.

Here is like a life hack: The one thing per patch rule is slightly ambiguous so
when you're writing commit messages you really need to sell what the one thing
is that you're fixing.  But in this case the changes to resource_to_user() are
clearly unrelated.

I am going to give you the most conservative advice.  I don't necessarily like
to split it up this way personally but it's the least common denominator path
and we will merge it.

patch 1: add bounds checking
patch 2: change the type to u32 and remove the check for negatives that you
         will add in patch 1.
patch 3: remove the cast in tsi148_slot_get()
patch 4: remove the cast in resource_to_user()

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ