Re: [GIT PULL] Disintegrate UAPI for x86

2012-10-05 Thread David Howells
H. Peter Anvin wrote: > That branch does have generic patches which are not yet in upstream. I > presume that is intentional. Yeah. It works better if the generic patches are there first. I thought that as long as everyone pulls the same disintegrate-asm-generic branch at the bottom of their

[PATCH] UAPI: Fix tools/vm/page-types.c

2012-10-23 Thread David Howells
Reported-by: Daniel Hazelton Signed-off-by: David Howells cc: Fengguang Wu --- tools/vm/page-types.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/vm/page-types.c b/tools/vm/page-types.c index cd1b03e..b76edf2 100644 --- a/tools/vm/page-types.c +++ b/tools/vm/page

Re: [PATCH 1/2] x86: Provide a comment in uapi/asm/hw_breakpoint.h

2012-10-24 Thread David Howells
Ingo Molnar wrote: > Just wondering, have the tools/perf/ issues been solved in your > tree, are the x86 UAPI disintegration changes pullable? Did you have a look at the set of five patches I sent? I think those should fix up perf and building tools with O=, but I'm not sure whether we want th

Re: [RFC][PATCH 0/5] tools, perf: Fix up for x86 UAPI disintegration

2012-10-25 Thread David Howells
Borislav Petkov wrote: > David, where can get that x86 UAPI disintegration patch? The tip tree has it in branch x86/uapi or you can get it from: git://git.infradead.org/users/dhowells/linux-headers.git branch disintegrate-x86 or tag disintegrate-x86-20121009. I've posted a couple of a

Re: [PATCH 07/37] Security: De-embed task security record from task and use refcounting

2008-02-11 Thread David Howells
James Morris <[EMAIL PROTECTED]> wrote: > > Remove the temporarily embedded task security record from task_struct. > > Instead it is made to dangle from the task_struct::sec and > > task_struct::act_as pointers with references counted for each. > > ... > > These patches are kind of huge. Yeah,

Re: [PATCH 4/4] KEYS: Add keyctl function to get a security label

2008-02-13 Thread David Howells
Andrew Morton <[EMAIL PROTECTED]> wrote: > > + key_ref = lookup_user_key(NULL, keyid, 0, 1, KEY_VIEW); > > + if (IS_ERR(key_ref)) { > > + if (PTR_ERR(key_ref) != -EACCES) > > + return PTR_ERR(key_ref); > > + > > + /* viewing a key under construction is als

Re: [PATCH 2/4] KEYS: Check starting keyring as part of search

2008-02-13 Thread David Howells
Andrew Morton <[EMAIL PROTECTED]> wrote: > > + (keyring->expiry && now.tv_sec >= keyring->expiry)) > > time_after()? Possibly. tv_sec oughtn't to wrap, though. I thought time_after() is really for comparing jiffies which might wrap. David -- To unsubscribe from this list: send the line

[PATCH] FRV: Fix up parse error in linker script

2008-02-13 Thread David Howells
Fix up parse error in FRV linker script, presumably introduced through changes to the INIT_TEXT and EXIT_TEXT macros. Signed-off-by: David Howells <[EMAIL PROTECTED]> --- arch/frv/kernel/vmlinux.lds.S |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/arch/frv/

Re: Compiler for mn10300?

2008-02-13 Thread David Howells
Adrian Bunk <[EMAIL PROTECTED]> wrote: > How can I get a compiler suitable for mn10300? ftp://ftp.redhat.com/pub/redhat/gnupro/AM33/am33-04r2-5/tools David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo inf

Re: [Linux-am33-list] Cross-Compiling mn10300: Assembler messages: junk at end of line: 0

2008-02-15 Thread David Howells
Jan Dittmer <[EMAIL PROTECTED]> wrote: > + make ARCH=mn10300 HOSTCC=gcc-4.0 CROSS_COMPILE=mn10300-elf- > CROSS32_COMPILE= O=../2.6.25-rc1-mn10300/ Hmmm... There seems to be some confusion somewhere, probably because the documentation there doesn't say which compiler you should use for what. Ca

[PATCH 1/2] MN10300: Define HZ as a config option

2008-02-15 Thread David Howells
Define HZ as a config option. Signed-off-by: David Howells <[EMAIL PROTECTED]> --- arch/mn10300/Kconfig|4 include/asm-mn10300/param.h |2 +- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig index eedc3a5..6

[PATCH 2/2] MN10300: Define SO_MARK

2008-02-15 Thread David Howells
Define SO_MARK for MN10300. Signed-off-by: David Howells <[EMAIL PROTECTED]> --- include/asm-mn10300/socket.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/asm-mn10300/socket.h b/include/asm-mn10300/socket.h index 99ca648..80af9c4 100644 --- a/inclu

Re: [PATCH 16/23] pefile: Parse a PE binary to find a key and a signature contained therein

2012-10-31 Thread David Howells
Kees Cook wrote: > Which means this loop will walk past the end of the memory (loop is > bounded by n_sections, so secs[loop] can go past datalen). While > data_addr and raw_data_size will stay bounded, the read of sec->name > can be out of bounds. Assuming n_sections is checked, sec->name can't

Re: [PATCH 1/2] x86: Provide a comment in uapi/asm/hw_breakpoint.h

2012-10-31 Thread David Howells
Ingo Molnar wrote: > Just wanted to inquire about the current status of it, as I'd > rather not pull anything that introduces breakages and is still > work in progress. Once it's all sorted out I'll have a look. Should I pull the x86 disintegration and perf fixes onto a tree derived from tipbo

[GIT PULL] FRV fixes

2012-11-02 Thread David Howells
-0400) FRV fixes for 3.7 Al Viro (2): frv: switch to saner kernel_execve() semantics frv: fix the broken preempt David Howells (5): FRV: Add missing linux/export.h #inclusions FRV:

tools, perf: Fix up for x86 UAPI disintegration

2012-11-05 Thread David Howells
with UAPI disintegration applied (2012-11-05 21:16:51 +) perf fixes 2012-11-05 -------- David Howells (5): x86: Export asm/{svm.h,vmx.h,perf_regs.h} UAPI: Expo

Re: tools, perf: Fix up for x86 UAPI disintegration

2012-11-05 Thread David Howells
David Howells wrote: > I've posted a revised version of my perf patches to my UAPI disintegration GIT > tree. Hmmm... It seems to break some things according to Fengguang's kbuild test robot. David -- To unsubscribe from this list: send the line "unsubscribe linux-ker

Re: [PATCH 00/13] UAPI header file split

2012-07-26 Thread David Howells
Michael Kerrisk wrote: > >> >> 3. HEADER COMMENTS NOT RETAINED IN KAPI FILES > > > > How about the attached changes? This is a delta to the disintegrate markers > > diff I sent earlier. > > That looks about right to me. > > Acked-by: Michael Kerrisk Excellent, thanks. The question is where

Re: [PATCH 00/13] UAPI header file split

2012-07-26 Thread David Howells
Oh, and thanks for the write up! David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 00/13] UAPI header file split

2012-07-26 Thread David Howells
d name space clashes + */ #define BITS_PER_LONG 32 diff --git a/arch/frv/include/uapi/asm/types.h b/arch/frv/include/uapi/asm/types.h index 9ec9d4c..cf23149 100644 --- a/arch/frv/include/uapi/asm/types.h +++ b/arch/frv/include/uapi/asm/types.h @@ -1 +1,11 @@ +/* types.h: FRV types + * +

Re: [PATCH 00/13] UAPI header file split

2012-07-26 Thread David Howells
Michael Kerrisk wrote: > I haven't looked over the changes yet, but what do my scripts now say? > (If all's well, they generate no output beyond the list of files.) Okay, the comparator script gives me: warthog>sh /tmp/mtk-cmp.sh include/linux/irqnr.h include/uapi/linu

Re: [PATCH] sysctl: fix improper indication of integer sysctl parameter

2012-07-31 Thread David Howells
Mitsuo Hayasaka wrote: > When we read the sysctl parameter, they are always treated > as signed integer, and are casted into unsigned long type > in the current kernel. If we set a value equivalent to > (the maximum value in signed integer + 1) Wouldn't it be better to return EINVAL or EDOM? Da

[GIT PULL] Asymmetric keys and module signing

2012-09-24 Thread David Howells
ure (2012-09-24 20:51:59 +0100) -------- (from the branch description for modsign-post-KS local branch) post Kernel-Summit module signing David Howells (26): KEYS:

Re: [GIT PULL] Asymmetric keys and module signing

2012-09-24 Thread David Howells
David Howells wrote: > Note, this implementation of the X.509 certificate parser uses a couple of > patterns to drive a reusable ASN.1 decoder. I do, however, have a direct > in-line decoder implementation also that can only decode X.509 certs. The > stack space usage is greater,

Wrong system clock vs X.509 date specifiers

2012-09-25 Thread David Howells
The X.509 certificate has a pair of times in it that delineate the valid period of the cert, and I'm checking that the system clock is within the bounds they define before permitting you to use the cert. I've been setting the expiry date to be 100 years in the future - by which time hopefully I w

Re: Wrong system clock vs X.509 date specifiers

2012-09-25 Thread David Howells
Alan Cox wrote: > Generate a certificate that is valid from a few minutes before the > wallclock time. It's a certificate policy question not a kernel hackery > one. That doesn't seem to be possible with openssl req. What would you recommend? David -- To unsubscribe from this list: send the li

Re: [GIT PULL] Asymmetric keys and module signing

2012-09-25 Thread David Howells
Kasatkin, Dmitry wrote: > Just one question about key description... > request_asymmetric_key uses format for key description: ": ". > Preparsing code creates description from those values. > I see that key id is not 8 bytes anymore but full hash size of 20 bytes. Remember: This is for viewing

Re: Wrong system clock vs X.509 date specifiers

2012-09-25 Thread David Howells
Tomas Mraz wrote: > You can use openssl ca that allows to set arbitrary start date to > generate selfsigned certs as well (-selfsign option). That seems to require some stuff I don't have installed: warthog>openssl ca -in signing_key.priv -extensions v3_ca -out newcert.pem Using configuration f

Re: Wrong system clock vs X.509 date specifiers

2012-09-25 Thread David Howells
How about the attached? I knew perl had to be good for something... David --- #!/usr/bin/perl -w # # Generate an X.509 certificate from a public key. # # Format: # # gen-x509-cert \ # [C=] [O=] [CN=] [Email=] \ # [--from=] [--to=output # use strict; use POSIX qw(strftime

Re: [GIT PULL] Asymmetric keys and module signing

2012-09-26 Thread David Howells
Rusty Russell wrote: > We do a very simple search for a particular string appended to the module > (which is cache-hot and about to be SHA'd anyway). There's both a config > option and a boot parameter which control whether we accept (and taint) or > fail with unsigned modules. I've adjusted yo

[PATCH 01/23] KEYS: Rename public key parameter name arrays

2012-10-30 Thread David Howells
Rename the arrays of public key parameters (public key algorithm names, hash algorithm names and ID type names) so that the array name ends in "_name". Signed-off-by: David Howells --- crypto/asymmetric_keys/public_key.c | 14 +++--- crypto/asymmetric_keys/x509_pu

[PATCH 02/23] KEYS: Move the algorithm pointer array from x509 to public_key.c

2012-10-30 Thread David Howells
Move the public-key algorithm pointer array from x509_public_key.c to public_key.c as it isn't X.509 specific. Signed-off-by: David Howells --- crypto/asymmetric_keys/public_key.c |8 crypto/asymmetric_keys/x509_public_key.c | 11 +-- include/crypto/public_

[PATCH 06/23] x509: struct x509_certificate needs struct tm declaring

2012-10-30 Thread David Howells
struct x509_certificate needs struct tm declaring by #inclusion of linux/time.h prior to its definition. Signed-off-by: David Howells --- crypto/asymmetric_keys/x509_parser.h |1 + 1 file changed, 1 insertion(+) diff --git a/crypto/asymmetric_keys/x509_parser.h b/crypto/asymmetric_keys

[PATCH 09/23] X.509: Handle certificates that lack an authorityKeyIdentifier field

2012-10-30 Thread David Howells
Handle certificates that lack an authorityKeyIdentifier field by assuming they're self-signed and checking their signatures against themselves. Signed-off-by: David Howells --- crypto/asymmetric_keys/x509_public_key.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-)

[PATCH 07/23] X.509: Add bits needed for PKCS#7

2012-10-30 Thread David Howells
PKCS#7 validation requires access to the serial number and the raw names in an X.509 certificate. Signed-off-by: David Howells --- crypto/asymmetric_keys/x509.asn1 |2 +- crypto/asymmetric_keys/x509_cert_parser.c | 17 + crypto/asymmetric_keys/x509_parser.h

[PATCH 08/23] X.509: Embed public_key_signature struct and create filler function

2012-10-30 Thread David Howells
to these. Whilst we're at it, export both x509_check_signature() and the new x509_get_sig_params(). Signed-off-by: David Howells --- crypto/asymmetric_keys/x509_cert_parser.c | 30 ++ crypto/asymmetric_keys/x509_parser.h | 14 +++-- crypto/asymmetric_keys/x509_public_

[PATCH 12/23] PKCS#7: Digest the data in a signed-data message

2012-10-30 Thread David Howells
Digest the data in a PKCS#7 signed-data message and attach to the public_key_signature struct contained in the pkcs7_message struct. Signed-off-by: David Howells --- crypto/asymmetric_keys/Makefile |3 + crypto/asymmetric_keys/pkcs7_verify.c | 130

[PATCH 13/23] PKCS#7: Find the right key in the PKCS#7 key list and verify the signature

2012-10-30 Thread David Howells
Find the appropriate key in the PKCS#7 key list and verify the signature with it. There may be several keys in there forming a chain. Any link in that chain or the root of that chain may be in our keyrings. Signed-off-by: David Howells --- crypto/asymmetric_keys/pkcs7_verify.c | 61

[PATCH 15/23] Provide PE binary definitions

2012-10-30 Thread David Howells
Provide some PE binary structural and constant definitions as taken from the pesign package sources. Signed-off-by: David Howells --- include/linux/pe.h | 448 1 file changed, 448 insertions(+) create mode 100644 include/linux/pe.h diff

[PATCH 17/23] pefile: Strip the wrapper off of the cert data block

2012-10-30 Thread David Howells
The certificate data block in a PE binary has a wrapper around the PKCS#7 signature we actually want to get at. Strip this off and check that we've got something that appears to be a PKCS#7 signature. Signed-off-by: David Howells --- crypto/asymmetric_keys/pefile_parser.c |

[PATCH 03/23] KEYS: Store public key algo ID in public_key struct

2012-10-30 Thread David Howells
Store public key algo ID in public_key struct for reference purposes. This allows it to be removed from the x509_certificate struct and used to find a default in public_key_verify_signature(). Signed-off-by: David Howells --- crypto/asymmetric_keys/x509_cert_parser.c |5 +++-- crypto

[PATCH 04/23] KEYS: Split public_key_verify_signature() and make available

2012-10-30 Thread David Howells
also. Signed-off-by: David Howells --- crypto/asymmetric_keys/public_key.c | 38 -- crypto/asymmetric_keys/public_key.h |6 + crypto/asymmetric_keys/x509_public_key.c |2 +- 3 files changed, 37 insertions(+), 9 deletions(-) diff --git a

[PATCH 16/23] pefile: Parse a PE binary to find a key and a signature contained therein

2012-10-30 Thread David Howells
Parse a PE binary to find a key and a signature contained therein. Later patches will check the signature and add the key if the signature checks out. Signed-off-by: David Howells --- crypto/asymmetric_keys/Kconfig | 10 ++ crypto/asymmetric_keys/Makefile|8 + crypto

[PATCH 18/23] pefile: Parse the presumed PKCS#7 content of the certificate blob

2012-10-30 Thread David Howells
Parse the content of the certificate blob, presuming it to be PKCS#7 format. Signed-off-by: David Howells --- crypto/asymmetric_keys/pefile_parser.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/crypto/asymmetric_keys/pefile_parser.c b/crypto

[PATCH 11/23] PKCS#7: Implement a parser [RFC 2315]

2012-10-30 Thread David Howells
Implement a parser for a PKCS#7 signed-data message as described in part of RFC 2315. Signed-off-by: David Howells --- crypto/asymmetric_keys/Kconfig|9 + crypto/asymmetric_keys/Makefile | 13 + crypto/asymmetric_keys/pkcs7.asn1 | 127 + crypto

[PATCH 14/23] PKCS#7: Verify internal certificate chain

2012-10-30 Thread David Howells
Verify certificate chain in the X.509 certificates contained within the PKCS#7 message as far as possible. If any signature that we should be able to verify fails, we reject the whole lot. Signed-off-by: David Howells --- crypto/asymmetric_keys/pkcs7_verify.c | 67

[PATCH 21/23] PKCS#7: Find intersection between PKCS#7 message and known, trusted keys

2012-10-30 Thread David Howells
Find the intersection between the X.509 certificate chain contained in a PKCS#7 message and a set of keys that we already know and trust. Signed-off-by: David Howells --- crypto/asymmetric_keys/Makefile|1 crypto/asymmetric_keys/pefile_parser.c |6 + crypto/asymmetric_keys

[PATCH 22/23] PEFILE: Load the contained key if we consider the container to be validly signed

2012-10-30 Thread David Howells
. Signed-off-by: David Howells --- crypto/asymmetric_keys/pefile_parser.c | 11 ++- crypto/asymmetric_keys/x509_parser.h |3 +++ crypto/asymmetric_keys/x509_public_key.c |2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/crypto/asymmetric_keys

[PATCH 23/23] KEYS: Add a 'trusted' flag and a 'trusted only' flag

2012-10-30 Thread David Howells
. Signed-off-by: David Howells --- crypto/asymmetric_keys/pefile_parser.c |2 +- crypto/asymmetric_keys/pkcs7_parser.h |3 ++- crypto/asymmetric_keys/pkcs7_trust.c |6 +- include/linux/key-type.h |1 + include/linux/key.h|3 +++ kernel

[PATCH 19/23] pefile: Parse the "Microsoft individual code signing" data blob

2012-10-30 Thread David Howells
The PKCS#7 certificate should contain a "Microsoft individual code signing" data blob as its signed content. This blob contains a digest of the signed content of the PE binary and the OID of the digest algorithm used (typically SHA256). Signed-off-by: David Howells --- crypto/asymm

[PATCH 20/23] pefile: Digest the PE binary and compare to the PKCS#7 data

2012-10-30 Thread David Howells
Digest the signed parts of the PE binary, canonicalising the section table before we need it, and then compare the the resulting digest to the one in the PKCS#7 signed content. Signed-off-by: David Howells --- crypto/asymmetric_keys/pefile_parser.c | 198 1

[PATCH 10/23] X.509: Export certificate parse and free functions

2012-10-30 Thread David Howells
Export certificate parse and free functions for use by modules. Signed-off-by: David Howells --- crypto/asymmetric_keys/x509_cert_parser.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/crypto/asymmetric_keys/x509_cert_parser.c b/crypto/asymmetric_keys/x509_cert_parser.c index

[PATCH 05/23] KEYS: Store public key algo ID in public_key_signature struct

2012-10-30 Thread David Howells
Store public key algorithm ID in public_key_signature struct for reference purposes. This allows a public_key_signature struct to be embedded in struct x509_certificate and struct pkcs7_message more easily. Signed-off-by: David Howells --- include/crypto/public_key.h |1 + 1 file changed

[RFC][PATCH 00/23] Load keys from signed PE binaries

2012-10-30 Thread David Howells
-shared -Bsymbolic $(CRT0) $< -o $@ \ -L /usr/lib64 -lefi -lgnuefi \ -L /usr/lib/gcc/x86_64-redhat-linux/4.7.2 -lgcc pekey.o: pekey.c Makefile $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ David --- David Howells (23):

Re: [PATCH 16/23] pefile: Parse a PE binary to find a key and a signature contained therein

2012-10-30 Thread David Howells
Kees Cook wrote: > This multiplication can push the cursor out of bounds. (n_data_dirents > is unverified). > ... > Both of these cases of n_sections multiplications can wrap. > Ultimately, you can end up with cursor close to zero, but n_sections > being giant. Good points. I wonder if I should

Re: [PATCH 17/23] pefile: Strip the wrapper off of the cert data block

2012-10-30 Thread David Howells
Kees Cook wrote: > > + memcpy(&wrapper, prep->data + ctx->sig_offset, 8); > > Instead of the literal 8, sizeof(wrapper)? Reasonable. It was originally an array of bytes until I found out that it had structure. Even so, I should probably have used sizeof() then. > > + if (

[GIT PULL] Expand keyring capacity and provide support for libkrb5

2013-08-28 Thread David Howells
Kerberos ticket persistence support -------- David Howells (12): KEYS: Skip key state checks when checking for possession KEYS: Use bool in make_key_ref() and is_key_possessed() KEYS: key_is_dead() should take a const key pointer a

Re: [PATCH] Fix generic hugetlb pte check return type.

2013-10-03 Thread David Howells
se all the time. > > Reported-by: Gurudas Pai > Signed-off-by: David S. Miller Acked-by: David Howells -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: 3.10-rc1: commit ccdfcc398594 broke uClibc build.

2013-07-09 Thread David Howells
Geert Uytterhoeven wrote: > The #include added to include/uapi/linux/netlink.h causes > the uClibc build to go: > > In file included from include/linux/kernel.h:4, > from include/linux/netlink.h:4, > from include/linux/rtnetlink.h:5, > from libc

[GIT PULL] CIFS FS-Cache bugfix

2013-09-16 Thread David Howells
) David Howells (1): CIFS: FS-Cache: Uncache unread pages in cifs_readpages() before freeing them fs/cifs/file.c| 8 fs/cifs/fscache.c | 7 +++ fs/cifs/fscache.h | 13 + 3 files changed, 28 insertions(+) -- To unsubscribe from this list: send the line

Re: [GIT PULL] Keyrings patches

2013-09-17 Thread David Howells
There's a slight change upstream that means that my patchset needs regenerating (the initconst changes). Can you bring your -next branch up to date with linus/master so that I can rebase on top of it? Thanks, David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-18 Thread David Howells
Joe Perches wrote: > On Tue, 2013-09-17 at 18:08 -0500, danielfsan...@att.net wrote: > > This adds an extension for the integral format specifier suffix of 'e', > > so that the format %[duxXo]e will result in printing an number (as > > before) in addition to a name and descrption for an error cod

Re: [PATCH 0/5] Preliminary: Add error names & descrptions to printks

2013-09-18 Thread David Howells
danielfsan...@att.net wrote: > Typically, we don't care about error messages or names in the kernel because > userspace will manage that. But sometimes we need to output an error number > to printks and that creates a situation where a user, system admistrator or > developer must find an error nu

Re: [PATCH 1/5] scripts: Add mkstrerror.sh

2013-09-18 Thread David Howells
danielfsan...@att.net wrote: > This is a simple bash script that parses our errno*.h files and formats > them into the error_strings.h header that our strerror and strerror_name > functions will use later. I presume you haven't tried building with a "make O=foo" build directory? I see: /b

Re: [GIT PULL] Keyrings patches

2013-09-18 Thread David Howells
Stephen Rothwell wrote: > Is there some reason that those fixups cannot be done in a merge commit? > i.e. are they more than simple text updates? That's somewhat up to James. *He* would be the person doing the merge, not me. I'm changing the lines in my patches also. > /me thinks that most re

Re: [PATCH 1/5] scripts: Add mkstrerror.sh

2013-09-18 Thread David Howells
David Howells wrote: > (1) Why are you double-NUL'ing all your strings? (see the \0 in the strings) Ah... I see what you're doing. I missed the fact that you don't have a comma after each string. > (3) You are storing a pointer to the symbolic name for each error

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-20 Thread David Howells
Joe Perches wrote: > > Yeah, I do agree, I just don't see how to do it without introducing > > unnecessary bloat. > > I think the code size cost of %pE is pretty trivial > compared to the log size/runtime cost. > > I would not want to see it used generically. I suspect he doesn't really need

[PATCH 2/2] CacheFiles: Don't try to dump the index key if the cookie has been cleared

2013-09-20 Thread David Howells
->netfs_data pointers have been cleared - and a NULL pointer exception will ensue, usually just after a: CacheFiles: Error: Unexpected object collision error is reported. Signed-off-by: David Howells --- fs/cachefiles/namei.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(

[PATCH 1/2] CacheFiles: Fix memory leak in cachefiles_check_auxdata error paths

2013-09-20 Thread David Howells
appropriately typed variable rather than to ret. Signed-off-by: Josh Boyer Signed-off-by: David Howells cc: Hongyi Jia cc: Milosz Tanski --- fs/cachefiles/xattr.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/fs/cachefiles/xattr.c

[PATCH 1/3] FS-Cache: Add use/unuse/wake cookie wrappers

2013-09-20 Thread David Howells
that we don't have to deal with undoing it if anything earlier fails. Possibly this should be moved into fscache_submit_op() which could look at FSCACHE_OP_UNUSE_COOKIE. Signed-off-by: David Howells --- fs/fscache/cookie.c |7 +-- fs/fscache

[RFC][PATCH 0/3] FS-Cache: NFS(/CIFS/Ceph/9P): Fix start-caching whilst writing race

2013-09-20 Thread David Howells
s probably safe. David --- David Howells (3): FS-Cache: Add use/unuse/wake cookie wrappers FS-Cache: Provide the ability to enable/disable cookies NFS: Use i_writecount to control whether to get an fscache cookie in nfs_open() Documentation/filesystems/caching/netfs-api.

[PATCH 3/3] NFS: Use i_writecount to control whether to get an fscache cookie in nfs_open()

2013-09-20 Thread David Howells
's also possible to have a two-way race on this if the file is opened O_TRUNC|O_RDONLY instead. Reported-by: Mark Moseley Signed-off-by: David Howells --- fs/nfs/dir.c |2 - fs/nfs/fscache.c | 192 ++-- fs/nfs/fscache.h |

[PATCH 2/3] FS-Cache: Provide the ability to enable/disable cookies

2013-09-20 Thread David Howells
se no one else can get at the cookie before this returns. Signed-off-by: David Howells cache = fscache_acquire_cookie(afs_cache_netfs.primary_index, &afs_cell_cache_index_def, -

Re: [PATCHv4 0/5] ceph: persistent caching with fscache

2013-09-04 Thread David Howells
Sage Weil wrote: > David, are the fscache patches here ready for the next merge window? Do > you have a preference for whose tree they go through? There's only one problem - patch 1 needs to come _after_ patch 2 to avoid breaking git bisect. Plus these patches 2 and 4 extend the fscache API w

Re: [PATCH 2/5] new fscache interface to check cache consistency

2013-09-04 Thread David Howells
Hongyi Jia wrote: > +bool __fscache_check_consistency(struct fscache_cookie *cookie) > +{ > + struct fscache_object *object; > + > + if (cookie->def->type != FSCACHE_COOKIE_TYPE_DATAFILE) > + return false; > + > + if (hlist_empty(&cookie->backing_objects)) > +

Re: [PATCH 2/5] new fscache interface to check cache consistency

2013-09-04 Thread David Howells
Milosz Tanski wrote: > If the cache is withdrawn and we're starting anew I would consider > that to okay. I would consider an empty page cache for a cookie to be > consistent since there's nothing stale that I can read. Unless there's > another synchronization issue that I'm missing in fscache.

Re: [PATCH 2/5] new fscache interface to check cache consistency

2013-09-04 Thread David Howells
Milosz Tanski wrote: > Is it as simple as stick a mutex at the top of the > __fscache_check_consistency function before we try to find the object? You can lock a mutex in a function, but where are you actually going to place the mutex struct? And what other code is going to take it? To do this

[GIT PULL] Keyrings patches

2013-09-04 Thread David Howells
keys-devel local branch) clone of "master" X.509 key improvements and fixes David Howells (27): KEYS: Skip key state checks when checking for possession KEYS: Use bool in make_key_ref() and is_key_possessed

Re: [PATCHv4 0/5] ceph: persistent caching with fscache

2013-09-05 Thread David Howells
I've pushed the non-Ceph bits of the bad-page fix to here: http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=fscache and added a CIFS fix. David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.

[PATCH 2/8] CacheFiles: Implement interface to check cache consistency

2013-09-05 Thread David Howells
Implement the FS-Cache interface to check the consistency of a cache object in CacheFiles. Original-author: Hongyi Jia Signed-off-by: David Howells cc: Hongyi Jia cc: Milosz Tanski --- fs/cachefiles/interface.c | 26 ++ fs/cachefiles/internal.h |1 + fs

[PATCH 1/8] FS-Cache: Add interface to check consistency of a cached object

2013-09-05 Thread David Howells
Cache takes care of pinning the object and the cookie in memory and managing this call with respect to the object state. Original-author: Hongyi Jia Signed-off-by: David Howells cc: Hongyi Jia cc: Milosz Tanski --- Documentation/filesystems/caching/backend-api.txt |9 +++ Document

Re: [PATCH 0/8] ceph: fscache support & upstream changes

2013-09-06 Thread David Howells
Milosz Tanski wrote: > After running this for a day on some loaded machines I ran into what > looks like an old issue with the new code. I remember you saw an issue > that manifested it self in a similar way a while back. > > [13837253.462779] FS-Cache: Assertion failed > [13837253.462782] 3 ==

Re: [GIT PULL] Keyrings patches

2013-09-06 Thread David Howells
James Morris wrote: > > Could you pull these patches into the security tree? They're based on your > > next branch. > > This missed the merge for 3.12. Do you want me to queue the changes up, > or do you want to send a pull request again after -rc1 ? Can you queue them up now in your 'next'

Re: [PATCH 0/8] ceph: fscache support & upstream changes

2013-09-09 Thread David Howells
Milosz Tanski wrote: > - (1 << FSCACHE_OP_WAITING); > + (1 << FSCACHE_OP_WAITING) | > + (1 << FSCACHE_OP_UNUSE_COOKIE); Yeah... That'll do it. We could just decrement n_active directly after calling into the backend - after all, we cannot reduce n_acti

Re: [PATCH 0/8] ceph: fscache support & upstream changes

2013-09-09 Thread David Howells
Milosz Tanski wrote: > I think that change does the trick. I had it running on the same > machine for 5 hours and had the kernel forcefully drop some of the > inodes in the cache (via drop caches) without a crash. I'll send a > proper patch email after you take a look and make sure I did the righ

Re: [GIT PULL] Keyrings patches

2013-09-10 Thread David Howells
James Morris wrote: > > > This missed the merge for 3.12. Do you want me to queue the changes up, > > > or do you want to send a pull request again after -rc1 ? > > > > Can you queue them up now in your 'next' branch? > > Nope, new patches can't go into -next until -rc1. I think I misunderst

Re: [PATCH] fscache: check consistency does not decrement refcount

2013-09-10 Thread David Howells
/0x200 [ceph] > [] ? __fsnotify_inode_delete+0xe/0x10 > [] destroy_inode+0x3c/0x70 > [] evict+0x119/0x1b0 > > Signed-off-by: Milosz Tanski Acked-by: David Howells -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to maj

[PATCH] mn10300: Fix crash just after starting userspace on !CONFIG_PREEMPT

2013-09-10 Thread David Howells
instruction f : This commit fix the problem. It was introduced by the commit d17fc238ac14 (MN10300: Enable IRQs more in system call exit work path). Signed-off-by: Akira Takeuchi Signed-off-by: Kiyoshi Owada Signed-off-by: David Howells --- arch/mn10300/kernel/entry.S |6 -- 1 files

[PATCH] CacheFiles: Fix memory leak in cachefiles_check_auxdata error paths

2013-09-11 Thread David Howells
it to an appropriately typed variable rather than to ret. Signed-off-by: Josh Boyer Signed-off-by: David Howells cc: Hongyi Jia cc: Milosz Tanski --- fs/cachefiles/xattr.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/fs/cachefiles/xattr.c

Re: [GIT PULL] Expand keyring capacity and provide support for libkrb5

2013-08-29 Thread David Howells
James Morris wrote: > > Could you pull these patches into the security tree? > > 944 files changed, 17114 insertions(+), 9157 deletions(-) Ummm... Where did that come from? That doesn't look like what's in my tree... David -- To unsubscribe from this list: send the line "unsubscribe linux-ke

Re: [GIT PULL] Expand keyring capacity and provide support for libkrb5

2013-08-30 Thread David Howells
James Morris wrote: > Is your tree based on mine? No. As I said in my original email: If you need the patches basing on your tree instead, that can be done. ;-) David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger

Please discard "checkpatch: warn when using extern with function prototypes in .h files"

2013-09-02 Thread David Howells
I noticed that a patch got committed to checkpatch to complain about function prototypes prefixed by "extern". Please discard/revert this patch: commit 7cd0f806622836e386ef18ad1950a9a729803019 Author: Joe Perches Date: Wed Aug 28 10:16:00 2013 +1000 checkpatch:

Re: [Ksummit-2013-discuss] [PATCH] checkpatch: Add comment about updating Documentation/CodingStyle

2013-09-02 Thread David Howells
Josh Triplett wrote: > > There are many checkpatch rules (like semicolons) that > > are not in CodingStyle. > > It's a rule of thumb, not a mandate. In *general*, checkpatch.pl should > not be enforcing style rules that aren't documented in CodingStyle. Except that it becomes a mandate when so

Re: [guv v2 04/31] net: Replace __get_cpu_var uses

2013-09-02 Thread David Howells
Would it be possible to use __thread annotations for per-CPU variables, I wonder? David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read t

Re: [GIT PULL] Expand keyring capacity and provide support for libkrb5

2013-09-03 Thread David Howells
James Morris wrote: > > Ummm... Where did that come from? That doesn't look like what's in my > > tree... > > Is your tree based on mine? It is now. See: http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=keys-devel based on your "next" branch. If you can ta

Re: [guv v2 04/31] net: Replace __get_cpu_var uses

2013-09-03 Thread David Howells
David Miller wrote: > > Would it be possible to use __thread annotations for per-CPU > > variables, I wonder? > > Paul Mackerras tried it on powerpc and you can't do it. > > The problem is that there is no way to tell the compiler that sched() > and similar (potentially) change the thread point

Re: [PATCH] NFS: Don't use debug-printk-only local variables

2013-09-26 Thread David Howells
Olof Johansson wrote: > Due to commit 996a2493ed5d3a8d5db03b560fcbbf1ca3f10897 (NFS: > Use i_writecount to control whether to get an fscache cookie in > nfs_open(), in two instances a local variable is only used in debug > print statements. Said statements might be compiled out, which results > i

Re: [PATCH] NFS: Don't use debug-printk-only local variables

2013-09-26 Thread David Howells
Olof Johansson wrote: > - struct nfs_inode *nfsi = NFS_I(page->mapping->host); > struct fscache_cookie *cookie = > nfs_i_fscache(page->mapping->host); > > BUG_ON(!cookie); > dfprintk(FSCACHE, "NFS: fscache releasepage (0x%p/0x%p/0x%p)\n", >

[RFC][PATCH 0/4] SunRPC/NFS: Use no_printk() in

2013-09-26 Thread David Howells
BUG unnecessary. David --- David Howells (4): SunRPC: Use the standard varargs macro method for dfprintk() and co. SunRPC: Declare and use rpc_task_pid() to wrap task->tk_pid SunRPC: Use no_printk() for the null dprintk() and dfprintk() SunRPC: Kill RPC_IFDEBUG() and NFS_IFD

[PATCH 1/4] SunRPC: Use the standard varargs macro method for dfprintk() and co.

2013-09-26 Thread David Howells
Use the standard varargs macro method rather than the old gcc method for dfprintk() and co. Signed-off-by: David Howells --- include/linux/sunrpc/debug.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc

<    1   2   3   4   5   6   7   8   9   10   >