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
| ||
|
Date: Fri, 3 Feb 2012 17:05:53 -0800 From: Linus Torvalds <torvalds@...ux-foundation.org> To: Will Drewry <wad@...omium.org> Cc: "Serge E. Hallyn" <serge.hallyn@...onical.com>, linux-kernel@...r.kernel.org, keescook@...omium.org, john.johansen@...onical.com, coreyb@...ux.vnet.ibm.com, pmoore@...hat.com, eparis@...hat.com, djm@...drot.org, segoon@...nwall.com, rostedt@...dmis.org, jmorris@...ei.org, scarybeasts@...il.com, avi@...hat.com, penberg@...helsinki.fi, viro@...iv.linux.org.uk, luto@....edu, mingo@...e.hu, akpm@...ux-foundation.org, khilman@...com, borislav.petkov@....com, amwang@...hat.com, oleg@...hat.com, ak@...ux.intel.com, eric.dumazet@...il.com, gregkh@...e.de, dhowells@...hat.com, daniel.lezcano@...e.fr, linux-fsdevel@...r.kernel.org, linux-security-module@...r.kernel.org, olofj@...omium.org, mhalcrow@...gle.com, dlaor@...hat.com, corbet@....net, alan@...rguk.ukuu.org.uk, indan@....nu, mcgrathr@...omium.org Subject: Re: [PATCH v6 1/3] seccomp: kill the seccomp_t typedef On Fri, Feb 3, 2012 at 3:16 PM, Will Drewry <wad@...omium.org> wrote: > > task_struct { > ... > struct seccomp seccomp; > } > > was as ideal. I've noticed that almost all of the duplicate names in > the task struct use redundancy to differentiate the naming, but I'm > happy enough to rename if appropriate. The redundant "struct xyz_struct" naming is traditional, but we try to avoid it these days. The reason for it is that I long long ago was a bit confused about the C namespace rules, so for the longest time I made struct names unique for no really good reason. The struct/union namespace is separate from the other namespaces, so trying to make things unique really has no good reason. And obviously "struct task_struct" is one of those very old things, and then the "struct xyz_struct" naming kind of spread from there. I think "struct seccomp" is fine, and even if "struct x x" looks a bit odd, it's at least _less_ repetition than "struct x_struct x" which is just really repetitive. That said, just to make "grep" easier, please do the whole "struct xyz" always together, and always with just a single space in between them, so that git grep "struct xyz" does the right thing. And for the same reason, when declaring a struct, people should always use "struct xyz {", with that exact spacing. The exact details of spacing obviously has no semantic meaning, but making it easy to grep for use and for definition is really convenient. Linus -- 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