diff options
-rw-r--r-- | arch/ppc/kernel/ppc_ksyms.c | 2 | ||||
-rw-r--r-- | fs/isofs/compress.c | 6 | ||||
-rw-r--r-- | include/asm-ppc/pgtable.h | 26 | ||||
-rw-r--r-- | include/linux/zlib.h | 5 |
4 files changed, 25 insertions, 14 deletions
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c index d59ad07de8e7..e7d40cc6c1b6 100644 --- a/arch/ppc/kernel/ppc_ksyms.c +++ b/arch/ppc/kernel/ppc_ksyms.c | |||
@@ -324,7 +324,7 @@ EXPORT_SYMBOL(__res); | |||
324 | 324 | ||
325 | EXPORT_SYMBOL(next_mmu_context); | 325 | EXPORT_SYMBOL(next_mmu_context); |
326 | EXPORT_SYMBOL(set_context); | 326 | EXPORT_SYMBOL(set_context); |
327 | EXPORT_SYMBOL(handle_mm_fault); /* For MOL */ | 327 | EXPORT_SYMBOL_GPL(__handle_mm_fault); /* For MOL */ |
328 | EXPORT_SYMBOL(disarm_decr); | 328 | EXPORT_SYMBOL(disarm_decr); |
329 | #ifdef CONFIG_PPC_STD_MMU | 329 | #ifdef CONFIG_PPC_STD_MMU |
330 | extern long mol_trampoline; | 330 | extern long mol_trampoline; |
diff --git a/fs/isofs/compress.c b/fs/isofs/compress.c index 34a44e451689..4917315db732 100644 --- a/fs/isofs/compress.c +++ b/fs/isofs/compress.c | |||
@@ -129,8 +129,14 @@ static int zisofs_readpage(struct file *file, struct page *page) | |||
129 | cend = le32_to_cpu(*(__le32 *)(bh->b_data + (blockendptr & bufmask))); | 129 | cend = le32_to_cpu(*(__le32 *)(bh->b_data + (blockendptr & bufmask))); |
130 | brelse(bh); | 130 | brelse(bh); |
131 | 131 | ||
132 | if (cstart > cend) | ||
133 | goto eio; | ||
134 | |||
132 | csize = cend-cstart; | 135 | csize = cend-cstart; |
133 | 136 | ||
137 | if (csize > deflateBound(1UL << zisofs_block_shift)) | ||
138 | goto eio; | ||
139 | |||
134 | /* Now page[] contains an array of pages, any of which can be NULL, | 140 | /* Now page[] contains an array of pages, any of which can be NULL, |
135 | and the locks on which we hold. We should now read the data and | 141 | and the locks on which we hold. We should now read the data and |
136 | release the pages. If the pages are NULL the decompressed data | 142 | release the pages. If the pages are NULL the decompressed data |
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h index c41c7958ea1f..92f30b28b252 100644 --- a/include/asm-ppc/pgtable.h +++ b/include/asm-ppc/pgtable.h | |||
@@ -227,21 +227,21 @@ extern unsigned long ioremap_bot, ioremap_base; | |||
227 | * doesn't support SMP. So we can use this as software bit, like | 227 | * doesn't support SMP. So we can use this as software bit, like |
228 | * DIRTY. | 228 | * DIRTY. |
229 | * | 229 | * |
230 | * PPC Book-E Linux implementation uses PPC HW PTE bit field definition, | 230 | * With the PPC 44x Linux implementation, the 0-11th LSBs of the PTE are used |
231 | * even it doesn't have HW PTE. 0-11th LSB of PTE stand for memory | 231 | * for memory protection related functions (see PTE structure in |
232 | * protection-related function. (See PTE structure in include/asm-ppc/mmu.h) | 232 | * include/asm-ppc/mmu.h). The _PAGE_XXX definitions in this file map to the |
233 | * Definition of _PAGE_XXX in "include/asm-ppc/pagetable.h" stands for | 233 | * above bits. Note that the bit values are CPU specific, not architecture |
234 | * above bits. Note that those bits values are CPU dependent, not | 234 | * specific. |
235 | * architecture. | ||
236 | * | 235 | * |
237 | * Kernel PTE entry holds arch-dependent swp_entry structure under certain | 236 | * The kernel PTE entry holds an arch-dependent swp_entry structure under |
238 | * situation. In other words, in such situation, some portion of PTE bits | 237 | * certain situations. In other words, in such situations some portion of |
239 | * are used as swp_entry. In PPC implementation, 3-24th LSB are shared with | 238 | * the PTE bits are used as a swp_entry. In the PPC implementation, the |
240 | * swp_entry, however 0-2nd three LSB still hold protection values. | 239 | * 3-24th LSB are shared with swp_entry, however the 0-2nd three LSB still |
241 | * That means three protection bits are reserved for both PTE and SWAP | 240 | * hold protection values. That means the three protection bits are |
242 | * entry at the most three LSBs. | 241 | * reserved for both PTE and SWAP entry at the most significant three |
242 | * LSBs. | ||
243 | * | 243 | * |
244 | * There are three protection bits available for SWAP entry; | 244 | * There are three protection bits available for SWAP entry: |
245 | * _PAGE_PRESENT | 245 | * _PAGE_PRESENT |
246 | * _PAGE_FILE | 246 | * _PAGE_FILE |
247 | * _PAGE_HASHPTE (if HW has) | 247 | * _PAGE_HASHPTE (if HW has) |
diff --git a/include/linux/zlib.h b/include/linux/zlib.h index 850076ea14d3..74f7b78c22d2 100644 --- a/include/linux/zlib.h +++ b/include/linux/zlib.h | |||
@@ -506,6 +506,11 @@ extern int zlib_deflateReset (z_streamp strm); | |||
506 | stream state was inconsistent (such as zalloc or state being NULL). | 506 | stream state was inconsistent (such as zalloc or state being NULL). |
507 | */ | 507 | */ |
508 | 508 | ||
509 | static inline unsigned long deflateBound(unsigned long s) | ||
510 | { | ||
511 | return s + ((s + 7) >> 3) + ((s + 63) >> 6) + 11; | ||
512 | } | ||
513 | |||
509 | extern int zlib_deflateParams (z_streamp strm, int level, int strategy); | 514 | extern int zlib_deflateParams (z_streamp strm, int level, int strategy); |
510 | /* | 515 | /* |
511 | Dynamically update the compression level and compression strategy. The | 516 | Dynamically update the compression level and compression strategy. The |