All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
To: Michal Kubecek <mkubecek@suse.cz>
Cc: <netdev@vger.kernel.org>
Subject: Re: [PATCH ethtool v2 08/13] ethtool: fix runtime errors found by sanitizers
Date: Fri, 9 Dec 2022 09:42:59 -0800	[thread overview]
Message-ID: <52408830-e05b-03bd-3c3c-4195af1efbf2@intel.com> (raw)
In-Reply-To: <20221208063432.rt3iunzactq6bxcp@lion.mk-sys.cz>

On 12/7/2022 10:34 PM, Michal Kubecek wrote:
> On Wed, Dec 07, 2022 at 05:11:17PM -0800, Jesse Brandeburg wrote:

>> -	INTR			= (1 << 31),
>> +	INTR			= (1UL << 31),
>>   	PCSINT			= (1 << 28),
>>   	LCINT			= (1 << 27),
>>   	APINT5			= (1 << 26),
> 
> While the signedness issue only directly affects only INTR value,
> I would rather prefer to keep the code consistent and fix the whole enum.
> Also, as you intend to introduce the BIT() macro in the series anyway,
> wouldn't it be cleaner to move this patch after the UAPI update and use
> BIT() instead?

I had done it this way to separate the "most minimal fix" from the 
"refactor", as I figure that is a clearer way to delineate changes. 
Also, this specifically addresses the issues found by the undefined 
behavior sanitizer.

I'll do it whichever way you like, but you're correct, later in this 
series I fix up all the BIT() usages. Maybe we can just leave this patch 
as is, knowing the full fix comes during the refactor in 10/13 ?


  reply	other threads:[~2022-12-09 17:43 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08  1:11 [PATCH ethtool v2 00/13] ethtool: clean up and fix Jesse Brandeburg
2022-12-08  1:11 ` [PATCH ethtool v2 01/13] ethtool: convert boilerplate licenses to SPDX Jesse Brandeburg
2022-12-08  8:17   ` Michal Kubecek
2022-12-08  1:11 ` [PATCH ethtool v2 02/13] ethtool: fix trivial issue in allocation Jesse Brandeburg
2022-12-08  8:26   ` Michal Kubecek
2022-12-08  1:11 ` [PATCH ethtool v2 03/13] ethtool: disallow passing null to find_option Jesse Brandeburg
2022-12-08  9:14   ` Michal Kubecek
2022-12-08  1:11 ` [PATCH ethtool v2 04/13] ethtool: commonize power related strings Jesse Brandeburg
2022-12-08 10:25   ` Michal Kubecek
2022-12-08  1:11 ` [PATCH ethtool v2 05/13] ethtool: fix extra warnings Jesse Brandeburg
2022-12-08 10:43   ` Michal Kubecek
2022-12-08  1:11 ` [PATCH ethtool v2 06/13] ethtool: fix uninitialized local variable use Jesse Brandeburg
2022-12-08  2:06   ` Andrew Lunn
2022-12-08  1:11 ` [PATCH ethtool v2 07/13] ethtool: avoid null pointer dereference Jesse Brandeburg
2022-12-08  6:23   ` Michal Kubecek
2022-12-09 17:36     ` Jesse Brandeburg
2022-12-09 18:06       ` Michal Kubecek
2022-12-08  1:11 ` [PATCH ethtool v2 08/13] ethtool: fix runtime errors found by sanitizers Jesse Brandeburg
2022-12-08  6:34   ` Michal Kubecek
2022-12-09 17:42     ` Jesse Brandeburg [this message]
2022-12-09 18:09       ` Michal Kubecek
2022-12-09 22:09         ` Jesse Brandeburg
2022-12-08  1:11 ` [PATCH ethtool v2 09/13] ethtool: merge uapi changes to implement BIT and friends Jesse Brandeburg
2022-12-08  6:44   ` Michal Kubecek
2022-12-09 17:53     ` Jesse Brandeburg
2022-12-08  1:11 ` [PATCH ethtool v2 10/13] ethtool: refactor bit shifts to use BIT and BIT_ULL Jesse Brandeburg
2022-12-08  1:11 ` [PATCH ethtool v2 11/13] ethtool: fix missing free of memory after failure Jesse Brandeburg
2022-12-08 10:52   ` Michal Kubecek
2022-12-08  1:11 ` [PATCH ethtool v2 12/13] ethtool: fix leak of memory after realloc Jesse Brandeburg
2022-12-08 11:30   ` Michal Kubecek
2022-12-08  1:11 ` [PATCH ethtool v2 13/13] ethtool: fix bug and use standard string parsing Jesse Brandeburg
2022-12-08 11:48   ` Michal Kubecek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52408830-e05b-03bd-3c3c-4195af1efbf2@intel.com \
    --to=jesse.brandeburg@intel.com \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.