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: <b2a15247-fbe6-47bd-9857-5d5163834dfc@paulmck-laptop>
Date:   Fri, 20 Oct 2023 12:22:08 -0700
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Pedro Falcato <pedro.falcato@...il.com>
Cc:     rcu@...r.kernel.org, Joel Fernandes <joel@...lfernandes.org>,
        Josh Triplett <josh@...htriplett.org>,
        Boqun Feng <boqun.feng@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Lai Jiangshan <jiangshanlai@...il.com>,
        Zqiang <qiang.zhang1211@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rcu: Remove unused macros from rcupdate.h

On Fri, Oct 20, 2023 at 06:30:15PM +0100, Pedro Falcato wrote:
> ulong2long, USHORT_CMP_GE and USHORT_CMP_LT are redundant and have been
> unused for quite a few releases.
> 
> Signed-off-by: Pedro Falcato <pedro.falcato@...il.com>
> ---
> Just a boring chore patch that cleans up a few unused macros.
> 
> I'm *very* interested in knowing how that ulong2long macro came along,
> though. What was wrong with '(long) a'?

Signed integer overflow, if I remember correctly.  But the Linux-kernel
build process forced signed integer overflow to be defined.

Queued for v6.8, thank you!

							Thanx, Paul

>  include/linux/rcupdate.h | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> index 5e5f920ade9..b9b6b828115 100644
> --- a/include/linux/rcupdate.h
> +++ b/include/linux/rcupdate.h
> @@ -34,9 +34,6 @@
>  
>  #define ULONG_CMP_GE(a, b)	(ULONG_MAX / 2 >= (a) - (b))
>  #define ULONG_CMP_LT(a, b)	(ULONG_MAX / 2 < (a) - (b))
> -#define ulong2long(a)		(*(long *)(&(a)))
> -#define USHORT_CMP_GE(a, b)	(USHRT_MAX / 2 >= (unsigned short)((a) - (b)))
> -#define USHORT_CMP_LT(a, b)	(USHRT_MAX / 2 < (unsigned short)((a) - (b)))
>  
>  /* Exported common interfaces */
>  void call_rcu(struct rcu_head *head, rcu_callback_t func);
> -- 
> 2.42.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ