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: <20200630075026.GN4817@hirez.programming.kicks-ass.net>
Date:   Tue, 30 Jun 2020 09:50:26 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Chen Ni <vulab@...as.ac.cn>
Cc:     mingo@...hat.com, acme@...nel.org, mark.rutland@....com,
        alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
        namhyung@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kernel: events: use offset_in_page macro

On Tue, Jun 30, 2020 at 07:42:58AM +0000, Chen Ni wrote:

> Use offset_in_page macro instead of (addr & ~PAGE_MASK).

Shees, so now we're replacing a trivial expression with something that's
actually longer to type? How does that make sense?

> -	memcpy(dst, kaddr + (vaddr & ~PAGE_MASK), len);
> +	memcpy(dst, kaddr + offset_in_page(vaddr), len);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ