Re: [PATCH] deprecated.rst: Remove now removed uninitialized_var

2020-08-31 Thread Jonathan Corbet
On Wed, 26 Aug 2020 20:12:01 -0700
Joe Perches  wrote:

> It's now gone from the kernel so remove it from the deprecated API text.
> 
> Signed-off-by: Joe Perches 
> ---
>  Documentation/process/deprecated.rst | 18 --
>  1 file changed, 18 deletions(-)

Applied, thanks.

jon


Re: [PATCH] deprecated.rst: Remove now removed uninitialized_var

2020-08-27 Thread Joe Perches
On Thu, 2020-08-27 at 07:58 -0700, Kees Cook wrote:
> On Wed, Aug 26, 2020 at 08:12:01PM -0700, Joe Perches wrote:
> > It's now gone from the kernel so remove it from the deprecated API text.
> > 
> > Signed-off-by: Joe Perches 
> 
> Oh! Right, thank you. I forgot to rewrite this. I'd like to keep the
> details about why "tricking the compiler to be quiet" should not be
> done.

Probably better in coding style.

>  One of my fears about removing uninitialized_var() is that folks
> may start adding open-coded versions to silence warnings. I'd like to
> keep a section in deprecated.rst that describes the problem and why
> those kinds of work-arounds should not be used.
> 



Re: [PATCH] deprecated.rst: Remove now removed uninitialized_var

2020-08-27 Thread Kees Cook
On Wed, Aug 26, 2020 at 08:12:01PM -0700, Joe Perches wrote:
> It's now gone from the kernel so remove it from the deprecated API text.
> 
> Signed-off-by: Joe Perches 

Oh! Right, thank you. I forgot to rewrite this. I'd like to keep the
details about why "tricking the compiler to be quiet" should not be
done. One of my fears about removing uninitialized_var() is that folks
may start adding open-coded versions to silence warnings. I'd like to
keep a section in deprecated.rst that describes the problem and why
those kinds of work-arounds should not be used.

-- 
Kees Cook


Re: [PATCH] deprecated.rst: Remove now removed uninitialized_var

2020-08-26 Thread Nick Desaulniers
On Wed, Aug 26, 2020 at 8:12 PM Joe Perches  wrote:
>
> It's now gone from the kernel so remove it from the deprecated API text.
>
> Signed-off-by: Joe Perches 

Thanks Joe.
Reviewed-by: Nick Desaulniers 

> ---
>  Documentation/process/deprecated.rst | 18 --
>  1 file changed, 18 deletions(-)
>
> diff --git a/Documentation/process/deprecated.rst 
> b/Documentation/process/deprecated.rst
> index 918e32d76fc4..70720f00b9aa 100644
> --- a/Documentation/process/deprecated.rst
> +++ b/Documentation/process/deprecated.rst
> @@ -51,24 +51,6 @@ to make sure their systems do not continue running in the 
> face of
>  "unreachable" conditions. (For example, see commits like `this one
>  `_.)
>
> -uninitialized_var()
> 
> -For any compiler warnings about uninitialized variables, just add
> -an initializer. Using the uninitialized_var() macro (or similar
> -warning-silencing tricks) is dangerous as it papers over `real bugs
> -`_
> -(or can in the future), and suppresses unrelated compiler warnings
> -(e.g. "unused variable"). If the compiler thinks it is uninitialized,
> -either simply initialize the variable or make compiler changes. Keep in
> -mind that in most cases, if an initialization is obviously redundant,
> -the compiler's dead-store elimination pass will make sure there are no
> -needless variable writes.
> -
> -As Linus has said, this macro
> -`must 
> `_
> -`be 
> `_
> -`removed 
> `_.
> -
>  open-coded arithmetic in allocator arguments
>  
>  Dynamic size calculations (especially multiplication) should not be
>
>


-- 
Thanks,
~Nick Desaulniers