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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 23 Aug 2020 16:21:30 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Giuseppe Scrivano <gscrivan@...hat.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Xu Wang <vulab@...as.ac.cn>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH] hugetlb_cgroup: convert comma to semicolon

On Wed, Aug 19, 2020 at 10:14:11AM +0200, Giuseppe Scrivano wrote:
> >> -	cft->file_offset = offsetof(struct hugetlb_cgroup, events_file[idx]),
> >> +	cft->file_offset = offsetof(struct hugetlb_cgroup, events_file[idx]);
> >>  	cft->flags = CFTYPE_NOT_ON_ROOT;
> 
> I think in this case having two expressions as part of the same
> statement is equivalent to having two separate statements.  Both
> cft->file_offset and cft->flags get the expected value.

That's not how the comma operator works.

It will evaluate offsetof(struct hugetlb_cgroup, events_file[idx]) and
then discard the result.  Since it has no side-effects, this is effectively
doing:

	cft->file_offset = cft->flags = CFTYPE_NOT_ON_ROOT;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ