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] [thread-next>] [day] [month] [year] [list]
Message-ID: <87sf3fcdl1.fsf@yhuang6-desk2.ccr.corp.intel.com>
Date: Wed, 03 Jan 2024 11:15:06 +0800
From: "Huang, Ying" <ying.huang@...el.com>
To: Gregory Price <gregory.price@...verge.com>
Cc: Gregory Price <gourry.memverge@...il.com>,  <linux-mm@...ck.org>,
  <linux-doc@...r.kernel.org>,  <linux-fsdevel@...r.kernel.org>,
  <linux-kernel@...r.kernel.org>,  <linux-api@...r.kernel.org>,
  <x86@...nel.org>,  <akpm@...ux-foundation.org>,  <arnd@...db.de>,
  <tglx@...utronix.de>,  <luto@...nel.org>,  <mingo@...hat.com>,
  <bp@...en8.de>,  <dave.hansen@...ux.intel.com>,  <hpa@...or.com>,
  <mhocko@...nel.org>,  <tj@...nel.org>,  <corbet@....net>,
  <rakie.kim@...com>,  <hyeongtak.ji@...com>,  <honggyu.kim@...com>,
  <vtavarespetr@...ron.com>,  <peterz@...radead.org>,
  <jgroves@...ron.com>,  <ravis.opensrc@...ron.com>,
  <sthanneeru@...ron.com>,  <emirakhur@...ron.com>,  <Hasan.Maruf@....com>,
  <seungjun.ha@...sung.com>,  Johannes Weiner <hannes@...xchg.org>,  Hasan
 Al Maruf <hasanalmaruf@...com>,  Hao Wang <haowang3@...com>,  Dan Williams
 <dan.j.williams@...el.com>,  "Michal Hocko" <mhocko@...e.com>,  Zhongkun
 He <hezhongkun.hzk@...edance.com>,  "Frank van der Linden"
 <fvdl@...gle.com>,  John Groves <john@...alactic.com>,  Jonathan Cameron
 <Jonathan.Cameron@...wei.com>
Subject: Re: [PATCH v5 00/11] mempolicy2, mbind2, and weighted interleave

Gregory Price <gregory.price@...verge.com> writes:

>> >> > struct mpol_args {
>> >> >         /* Basic mempolicy settings */
>> >> >         __u16 mode;
>> >> >         __u16 mode_flags;
>> >> >         __s32 home_node;
>> >> >         __u64 pol_maxnodes;
>> >> 
>> >> I understand that we want to avoid hole in struct.  But I still feel
>> >> uncomfortable to use __u64 for a small.  But I don't have solution too.
>> >> Anyone else has some idea?
>> >>
>> >
>> > maxnode has been an `unsigned long` in every other interface for quite
>> > some time.  Seems better to keep this consistent rather than it suddenly
>> > become `unsigned long` over here and `unsigned short` over there.
>> 
>> I don't think that it matters.  The actual maximum node number will be
>> less than maximum `unsigned short`.
>> 
>
> the structure will end up being
>
> struct mpol_args {
> 	__u16 mode;
> 	__u16 mode_flags;
> 	__s32 home_node;
> 	__u16 pol_maxnodes;
> 	__u8  rsv[6];
> 	__aligned_u64 pol_nodes;
> 	__aligned_u64 il_weights;
> }
>
> If you're fine with that, i'll make the change.

This looks OK for me.  But, I don't know whether others think this is
better.

--
Best Regards,
Huang, Ying

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ