Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1268689
| From | Xishi Qiu <qiuxishi@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCHv2 2/2] arm64: Allow changing of attributes outside of modules |
| Date | 2015-11-13 09:40 +0100 |
| Message-ID | <qui3M-41Z-3@gated-at.bofh.it> (permalink) |
| References | <qtsRz-4Cy-3@gated-at.bofh.it> <qtsRA-4Cy-11@gated-at.bofh.it> <quhU6-3Y7-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
>> +static int update_pmd_range(struct mm_struct *mm, pud_t *pud,
>> + unsigned long addr, unsigned long end,
>> + pgprot_t clear, pgprot_t set)
>> +{
>> + pmd_t *pmd;
>> + unsigned long next;
>> + int err = 0;
>> +
>> + if (pud_sect(*pud)) {
>> + if (!IS_ENABLED(CONFIG_DEBUG_CHANGE_PAGEATTR)) {
>> + err = -EINVAL;
>> + goto out;
>> + }
>> + pmd = pmd_alloc_one(&init_mm, addr);
>> + if (!pmd) {
>> + err = -ENOMEM;
>> + goto out;
>> + }
>> + split_pud(pud, pmd);
>> + pud_populate(&init_mm, pud, pmd);
>> + }
>> +
>>
>> - pte = clear_pte_bit(pte, cdata->clear_mask);
>> - pte = set_pte_bit(pte, cdata->set_mask);
>> + pmd = pmd_offset(pud, addr);
>> + if (pmd_none(*pmd)) {
>> + err = -EFAULT;
>> + goto out;
>> + }
>> +
>> + do {
>> + next = pmd_addr_end(addr, end);
>> + if (((addr | end) & ~SECTION_MASK) == 0) {
>
> Hi Laura,
>
> Why not like this?
> if (pmd_sect(*pmd) && ((addr | nest) & ~SECTION_MASK) == 0) {
Sorry, typo error, nest -> next
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCHv2 0/2] Support for set_memory_* outside of module space Laura Abbott <labbott@fedoraproject.org> - 2015-11-11 03:00 +0100
[PATCHv2 1/2] arm64: Get existing page protections in split_pmd Laura Abbott <labbott@fedoraproject.org> - 2015-11-11 03:00 +0100
Re: [PATCHv2 1/2] arm64: Get existing page protections in split_pmd Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2015-11-15 08:40 +0100
[PATCHv2 2/2] arm64: Allow changing of attributes outside of modules Laura Abbott <labbott@fedoraproject.org> - 2015-11-11 03:00 +0100
Re: [PATCHv2 2/2] arm64: Allow changing of attributes outside of modules zhong jiang <zhongjiang@huawei.com> - 2015-11-12 13:00 +0100
Re: [PATCHv2 2/2] arm64: Allow changing of attributes outside of modules Laura Abbott <labbott@redhat.com> - 2015-11-12 17:40 +0100
Re: [PATCHv2 2/2] arm64: Allow changing of attributes outside of modules zhong jiang <zhongjiang@huawei.com> - 2015-11-13 03:10 +0100
Re: [PATCHv2 2/2] arm64: Allow changing of attributes outside of modules Laura Abbott <labbott@redhat.com> - 2015-11-13 20:10 +0100
Re: [PATCHv2 2/2] arm64: Allow changing of attributes outside of modules zhong jiang <zhongjiang@huawei.com> - 2015-11-13 03:50 +0100
Re: [PATCHv2 2/2] arm64: Allow changing of attributes outside of modules Xishi Qiu <qiuxishi@huawei.com> - 2015-11-13 09:30 +0100
Re: [PATCHv2 2/2] arm64: Allow changing of attributes outside of modules Xishi Qiu <qiuxishi@huawei.com> - 2015-11-13 09:40 +0100
Re: [PATCHv2 2/2] arm64: Allow changing of attributes outside of modules Laura Abbott <labbott@redhat.com> - 2015-11-13 20:10 +0100
csiph-web