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: <817ecb6f1002011448l7a9d5de4m47bd37f5e8503877@mail.gmail.com>
Date:	Mon, 1 Feb 2010 17:48:16 -0500
From:	Siarhei Liakh <sliakh.lkml@...il.com>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	linux-kernel@...r.kernel.org,
	linux-security-module@...r.kernel.org, linux-next@...r.kernel.org,
	Arjan van de Ven <arjan@...radead.org>,
	James Morris <jmorris@...ei.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andi Kleen <ak@....de>, Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...e.hu>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Dave Jones <davej@...hat.com>
Subject: Re: [PATCH V9] RO/NX protection for loadable kernel modules

> But not compile tested:
[...]
> The casts here should cause a warning.

I did compile it prior to submission and the resulting kernel boots.
However, you are right about the warnings as they scrolled off the
screen when I did not pay attention.
Will fix.

>> +     if (total_size > text_size) {
>> +             begin_pfn = PFN_UP((unsigned long)base + text_size);
>> +             end_pfn = PFN_UP((unsigned long)base + total_size);
>> +             if (end_pfn > begin_pfn)
>> +                     set_memory_nx(begin_pfn << PAGE_SHIFT,
>> +                                             end_pfn - begin_pfn);
>
> Use the helper here too?

No, not really. The helper uses PFN_DUWN, and we need PFN_UP here.
This is the only place where I use PFN_UP, so another helper would not
make much sense.

Thanks.
--
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