)]}'
{
  "commit": "d7e7528bcd456f5c36ad4a202ccfb43c5aa98bc4",
  "tree": "ef49503b1dc52c52102e728dbd979c9309d5756b",
  "parents": [
    "85e7bac33b8d5edafc4e219c7dfdb3d48e0b4e31"
  ],
  "author": {
    "name": "Eric Paris",
    "email": "eparis@redhat.com",
    "time": "Tue Jan 03 14:23:06 2012 -0500"
  },
  "committer": {
    "name": "Al Viro",
    "email": "viro@zeniv.linux.org.uk",
    "time": "Tue Jan 17 16:16:56 2012 -0500"
  },
  "message": "Audit: push audit success and retcode into arch ptrace.h\n\nThe audit system previously expected arches calling to audit_syscall_exit to\nsupply as arguments if the syscall was a success and what the return code was.\nAudit also provides a helper AUDITSC_RESULT which was supposed to simplify things\nby converting from negative retcodes to an audit internal magic value stating\nsuccess or failure.  This helper was wrong and could indicate that a valid\npointer returned to userspace was a failed syscall.  The fix is to fix the\nlayering foolishness.  We now pass audit_syscall_exit a struct pt_reg and it\nin turns calls back into arch code to collect the return value and to\ndetermine if the syscall was a success or failure.  We also define a generic\nis_syscall_success() macro which determines success/failure based on if the\nvalue is \u003c -MAX_ERRNO.  This works for arches like x86 which do not use a\nseparate mechanism to indicate syscall failure.\n\nWe make both the is_syscall_success() and regs_return_value() static inlines\ninstead of macros.  The reason is because the audit function must take a void*\nfor the regs.  (uml calls theirs struct uml_pt_regs instead of just struct\npt_regs so audit_syscall_exit can\u0027t take a struct pt_regs).  Since the audit\nfunction takes a void* we need to use static inlines to cast it back to the\narch correct structure to dereference it.\n\nThe other major change is that on some arches, like ia64, MIPS and ppc, we\nchange regs_return_value() to give us the negative value on syscall failure.\nTHE only other user of this macro, kretprobe_example.c, won\u0027t notice and it\nmakes the value signed consistently for the audit functions across all archs.\n\nIn arch/sh/kernel/ptrace_64.c I see that we were using regs[9] in the old\naudit code as the return value.  But the ptrace_64.h code defined the macro\nregs_return_value() as regs[3].  I have no idea which one is correct, but this\npatch now uses the regs_return_value() function, so it now uses regs[3].\n\nFor powerpc we previously used regs-\u003eresult but now use the\nregs_return_value() function which uses regs-\u003egprs[3].  regs-\u003egprs[3] is\nalways positive so the regs_return_value(), much like ia64 makes it negative\nbefore calling the audit code when appropriate.\n\nSigned-off-by: Eric Paris \u003ceparis@redhat.com\u003e\nAcked-by: H. Peter Anvin \u003chpa@zytor.com\u003e [for x86 portion]\nAcked-by: Tony Luck \u003ctony.luck@intel.com\u003e [for ia64]\nAcked-by: Richard Weinberger \u003crichard@nod.at\u003e [for uml]\nAcked-by: David S. Miller \u003cdavem@davemloft.net\u003e [for sparc]\nAcked-by: Ralf Baechle \u003cralf@linux-mips.org\u003e [for mips]\nAcked-by: Benjamin Herrenschmidt \u003cbenh@kernel.crashing.org\u003e [for ppc]\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f5cb27614e35df7c4027094e7ac1d6626091021c",
      "old_mode": 33188,
      "old_path": "arch/ia64/include/asm/ptrace.h",
      "new_id": "68c98f5b3ca625aaca9f342addd31c68c48c27af",
      "new_mode": 33188,
      "new_path": "arch/ia64/include/asm/ptrace.h"
    },
    {
      "type": "modify",
      "old_id": "8848f43d819e55ba91bf07fc6ae8756f88e7ad36",
      "old_mode": 33188,
      "old_path": "arch/ia64/kernel/ptrace.c",
      "new_id": "2c154088cce71e496e431be6136f5d814b5f9b0d",
      "new_mode": 33188,
      "new_path": "arch/ia64/kernel/ptrace.c"
    },
    {
      "type": "modify",
      "old_id": "816bee64b1961d202f35a1aa9c4d2be0fc1d640e",
      "old_mode": 33188,
      "old_path": "arch/microblaze/include/asm/ptrace.h",
      "new_id": "94e92c8058592f786cfd6fac942c90b308664e85",
      "new_mode": 33188,
      "new_path": "arch/microblaze/include/asm/ptrace.h"
    },
    {
      "type": "modify",
      "old_id": "043cb58f9c443e72843fa44a9ebd399442a965b5",
      "old_mode": 33188,
      "old_path": "arch/microblaze/kernel/ptrace.c",
      "new_id": "f564b1bfd3869e1824ec530c2089415dc8b09f29",
      "new_mode": 33188,
      "new_path": "arch/microblaze/kernel/ptrace.c"
    },
    {
      "type": "modify",
      "old_id": "de39b1f343ea2537b459eed56f53ea9b35732554",
      "old_mode": 33188,
      "old_path": "arch/mips/include/asm/ptrace.h",
      "new_id": "7d409505df2d6c48e2cef09bba62f3274194a7d7",
      "new_mode": 33188,
      "new_path": "arch/mips/include/asm/ptrace.h"
    },
    {
      "type": "modify",
      "old_id": "4e6ea1ffad46617b3e1c0880c4061371f7aa5885",
      "old_mode": 33188,
      "old_path": "arch/mips/kernel/ptrace.c",
      "new_id": "ab0f1963a7bdb85a4d8c583cc60271ec907c7140",
      "new_mode": 33188,
      "new_path": "arch/mips/kernel/ptrace.c"
    },
    {
      "type": "modify",
      "old_id": "48223f9b8728d5e1433c6d13ab9c1c583780d2cb",
      "old_mode": 33188,
      "old_path": "arch/powerpc/include/asm/ptrace.h",
      "new_id": "78a205162fd7d48ad0b1a3de78bd42453dae5c0a",
      "new_mode": 33188,
      "new_path": "arch/powerpc/include/asm/ptrace.h"
    },
    {
      "type": "modify",
      "old_id": "5de73dbd15c7e404a16257ae5239e9b1af293f65",
      "old_mode": 33188,
      "old_path": "arch/powerpc/kernel/ptrace.c",
      "new_id": "09d31c12a5e3e9d159d99cf9ad1479a394bb16b6",
      "new_mode": 33188,
      "new_path": "arch/powerpc/kernel/ptrace.c"
    },
    {
      "type": "modify",
      "old_id": "56da355678f4aa7feed766a016b84282381451ba",
      "old_mode": 33188,
      "old_path": "arch/s390/include/asm/ptrace.h",
      "new_id": "aeb77f01798504cd250aebbd8748516b8c64e113",
      "new_mode": 33188,
      "new_path": "arch/s390/include/asm/ptrace.h"
    },
    {
      "type": "modify",
      "old_id": "573bc29551ef471fee58b89d02df0ea0ff956503",
      "old_mode": 33188,
      "old_path": "arch/s390/kernel/ptrace.c",
      "new_id": "f527586009801a2e5e2c55ee4f21038ede7b5577",
      "new_mode": 33188,
      "new_path": "arch/s390/kernel/ptrace.c"
    },
    {
      "type": "modify",
      "old_id": "6c2239cca1a2d86204a52ecef53ab5514f8a6073",
      "old_mode": 33188,
      "old_path": "arch/sh/include/asm/ptrace_32.h",
      "new_id": "2d3e906aa72252d3b827a12405546465127d5f78",
      "new_mode": 33188,
      "new_path": "arch/sh/include/asm/ptrace_32.h"
    },
    {
      "type": "modify",
      "old_id": "bf9be7764d69f250978300cfb5c3e556e0d71e76",
      "old_mode": 33188,
      "old_path": "arch/sh/include/asm/ptrace_64.h",
      "new_id": "eb3fcceaf64b7bb5942a081637e78c5d479bad86",
      "new_mode": 33188,
      "new_path": "arch/sh/include/asm/ptrace_64.h"
    },
    {
      "type": "modify",
      "old_id": "92b3c276339a3a50d95a027c1d2a2e902a507ee3",
      "old_mode": 33188,
      "old_path": "arch/sh/kernel/ptrace_32.c",
      "new_id": "c0b5c179d27b955910c9df573f944b1d3d3b99f2",
      "new_mode": 33188,
      "new_path": "arch/sh/kernel/ptrace_32.c"
    },
    {
      "type": "modify",
      "old_id": "c8f97649f354b5f4b80366b79a95c9a9a0f4d4bb",
      "old_mode": 33188,
      "old_path": "arch/sh/kernel/ptrace_64.c",
      "new_id": "ba720d68643503a755e73b5811d97ddf1f1eba8f",
      "new_mode": 33188,
      "new_path": "arch/sh/kernel/ptrace_64.c"
    },
    {
      "type": "modify",
      "old_id": "a0e1bcf843a1ed5f9931a89c6cc63d4cd636d4ae",
      "old_mode": 33188,
      "old_path": "arch/sparc/include/asm/ptrace.h",
      "new_id": "c00c3b5c2806edfac2b2b7f44f79045ae1bfec01",
      "new_mode": 33188,
      "new_path": "arch/sparc/include/asm/ptrace.h"
    },
    {
      "type": "modify",
      "old_id": "96ee50a806613b782ce11e8627f1911ede3fde3f",
      "old_mode": 33188,
      "old_path": "arch/sparc/kernel/ptrace_64.c",
      "new_id": "c73c8c50f11706d67208e1b1d645a446e9152088",
      "new_mode": 33188,
      "new_path": "arch/sparc/kernel/ptrace_64.c"
    },
    {
      "type": "modify",
      "old_id": "c9da32b0c707015c19db39b49785cd8b0610a35a",
      "old_mode": 33188,
      "old_path": "arch/um/kernel/ptrace.c",
      "new_id": "2ccf25c42febc8786eda3f2a4c4eb64d96bb7989",
      "new_mode": 33188,
      "new_path": "arch/um/kernel/ptrace.c"
    },
    {
      "type": "modify",
      "old_id": "3e274564f6bf0d89f06b489484eb7d86faa049d6",
      "old_mode": 33188,
      "old_path": "arch/x86/ia32/ia32entry.S",
      "new_id": "64ced0b8f8fd822edf9d8ebdce56bfd83e6c513c",
      "new_mode": 33188,
      "new_path": "arch/x86/ia32/ia32entry.S"
    },
    {
      "type": "modify",
      "old_id": "22d0e21b4dd793fa509e52541bf9b57e7778d1d7",
      "old_mode": 33188,
      "old_path": "arch/x86/kernel/entry_32.S",
      "new_id": "a22facf06f0e27b736baaadef91b5583044743ab",
      "new_mode": 33188,
      "new_path": "arch/x86/kernel/entry_32.S"
    },
    {
      "type": "modify",
      "old_id": "a20e1cb9dc87fea597cbd69cda747d314f4ad68e",
      "old_mode": 33188,
      "old_path": "arch/x86/kernel/entry_64.S",
      "new_id": "e51393dd93a34b4546f5dad5f19010111064e284",
      "new_mode": 33188,
      "new_path": "arch/x86/kernel/entry_64.S"
    },
    {
      "type": "modify",
      "old_id": "89a04c7b5bb6f600ff764bf3c91900880e47db4e",
      "old_mode": 33188,
      "old_path": "arch/x86/kernel/ptrace.c",
      "new_id": "8b0218758775f29f7767e77a9fe9f83c386de497",
      "new_mode": 33188,
      "new_path": "arch/x86/kernel/ptrace.c"
    },
    {
      "type": "modify",
      "old_id": "863f8753ab0ae696f8981ef30d9ee031dd0e310b",
      "old_mode": 33188,
      "old_path": "arch/x86/kernel/vm86_32.c",
      "new_id": "af17e1c966dc194dd61bec0685ed063d016a485e",
      "new_mode": 33188,
      "new_path": "arch/x86/kernel/vm86_32.c"
    },
    {
      "type": "modify",
      "old_id": "711b1621747f2e45e8497a13c7c81b9bc260916f",
      "old_mode": 33188,
      "old_path": "arch/x86/um/shared/sysdep/ptrace.h",
      "new_id": "5ef9344a8b241d9a69448602b48240d5165e9c1b",
      "new_mode": 33188,
      "new_path": "arch/x86/um/shared/sysdep/ptrace.h"
    },
    {
      "type": "modify",
      "old_id": "6e1c533f9b46044c895ad18855adb47b79748f47",
      "old_mode": 33188,
      "old_path": "include/linux/audit.h",
      "new_id": "3d65e4b3ba0674aeacaeabad25916e8034469118",
      "new_mode": 33188,
      "new_path": "include/linux/audit.h"
    },
    {
      "type": "modify",
      "old_id": "800f113bea66382fd16dc28c85eeae34e44761b0",
      "old_mode": 33188,
      "old_path": "include/linux/ptrace.h",
      "new_id": "dd4cefa6519dbaaad33ba80c7f3c992e3a494624",
      "new_mode": 33188,
      "new_path": "include/linux/ptrace.h"
    },
    {
      "type": "modify",
      "old_id": "e9bcb93800d8b6bad4622d2795cc8c816eb26ca7",
      "old_mode": 33188,
      "old_path": "kernel/auditsc.c",
      "new_id": "3d2853808185cc916d76aac12eb04bc554ece10f",
      "new_mode": 33188,
      "new_path": "kernel/auditsc.c"
    }
  ]
}
