4 ms·
Can someone explain how the GPL covers Grsecurity at all? It sounds like it's entirely their own code they wrote themselves and have all the rights to. It just
by averagewall 9y ago
Can someone explain how the GPL covers Grsecurity at all? It sounds like it's entirely their own code they wrote themselves and have all the rights to. It just happens to be something that their customers are going to use with GPL Linux. They're not distributing any GPL code are they? I can't believe a derivative work can include something that is merely compatible with GPL code but doesn't actually contain any. Or does it? Have they copied and pasted GPL code into the Grsecurity patch? In that case, then it does make sense that it should be GPL'd too.
- amluto 9y agoIf you open an old version of the patch, you'll find that it adds, removes, and changes lines in the middle of existing Linux functions. If it's not a derivative work, I don't know what is.
- averagewall 9y agoYou mean it contains copies of existing Linux functions which the Grsecurity authors have edited? That makes sense. A lot of the comments here seem to be about how tightly it interfaces with Linux, which is surely a different thing.
- amluto 9y agoThis is a little snippet of grsecurity: static void account_kernel_stack(struct task_struct *tsk, int account) { - void *stack = task_stack_page(tsk); struct vm_struct *vm = task_stack_vm_area(tsk); BUILD_BUG_ON(IS_ENABLED(CONFIG_VMAP_STACK) && PAGE_SIZE % 1024 != 0); @@ -303,8 +357,12 @@ static void account_kernel_stack(struct task_struct *tsk, int account) * All stack pages are in the same zone and belong to the * same memcg. */ +#ifdef CONFIG_GRKERNSEC_KSTACKOVERFLOW + struct page *first_page = virt_to_page(tsk->lowmem_stack); +#else + void *stack = task_stack_page(tsk); struct page *first_page = virt_to_page(stack); - +#endif mod_zone_page_state(page_zone(first_page), NR_KERNEL_STACK_KB, THREAD_SIZE / 1024 * account); Grsecurity isn't Linux plus some additional code. It's a modified version of Linux. Saying that a Linux 4.11 kernel patched with grsecurity isn't a derived work of Linux 4.11 is like saying that a Linux 4.11 kernel patched with patch-4.12.patch [1], otherwise known as Linux 4.12, is not a derived work of 4.11 [1] https://cdn.kernel.org/pub/linux/kernel/v4.x/patch-4.12.xz https://cdn.kernel.org/pub/linux/kernel/v4.x/patch-4.12.xz