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: <36ca99e90804281031v5b211833sfb7cda05fedcea6@mail.gmail.com>
Date:	Mon, 28 Apr 2008 19:31:31 +0200
From:	"Bert Wesarg" <bert.wesarg@...glemail.com>
To:	"Mike Travis" <travis@....com>
Cc:	"Paul Jackson" <pj@....com>,
	"WANG Cong" <xiyou.wangcong@...il.com>, mingo@...e.hu,
	linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
	akpm@...ux-foundation.org
Subject: Re: [PATCH] Fix calculus of bitmap_scnprintf_len()

On Mon, Apr 28, 2008 at 7:09 PM, Mike Travis <travis@....com> wrote:
> Paul Jackson wrote:
>  > Bert wrote:
>  >> The function bitmap_scnprintf_len() is currently not used
>  >
>  > Paul Jackson wrote:
>  >> How about we just remove that function?
>  >
>  > WANG Cong wrote:
>  >> I am afraid no. See:
>  >>
>  >> include/linux/cpumask.h:292:    return bitmap_scnprintf_len(len);
>  >
>  > Good point.
>  >
>  >
>  > Then how about we also remove from cpumask.h:
>  >
>  > #define cpumask_scnprintf_len(len) \
>  >                         __cpumask_scnprintf_len((len))
>  > static inline int __cpumask_scnprintf_len(int len)
>  > {
>  >         return bitmap_scnprintf_len(len);
>  > }
>  >
>
>  That's fine with me.  A later version of the patch did have
>  the function removed but it didn't get picked up.  The other
>  changes there were to use function pointers instead of the
>  flag variable to select list or mask output format, and the
>  addition of mask variants for the cpu/{present,possible,
>  online,system} map outputs.
I'm fine with this too. I did a hasty audit of cpumask_scnprintf()
users, and no one can use these functions.

But one last note to the cpumask_scnprintf_len() macro: this macro
should really not have an argument, it should be forced to NR_CPUS.
Else a user could have a too small buffer for the call to
cpumask_scnprintf(), which always calls bitmap_scnprintf() with
NR_CPUS nbits.

>
>  I'll dig that one back up and resubmit it.
Fine.

Regards.
Bert
>
>  Thanks,
>  Mike
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ