<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.linux.kernel.api">
    <title>gmane.linux.kernel.api</title>
    <link>http://blog.gmane.org/gmane.linux.kernel.api</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2545"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2544"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2543"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2437"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2432"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2430"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2429"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2428"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2427"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2422"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2415"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2414"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2406"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2405"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2364"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2358"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2353"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2352"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2351"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.kernel.api/2350"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2545">
    <title>[PATCH 2/2] Documentation: sysfs for Physical Presence Interface</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2545</link>
    <description>&lt;pre&gt;From: Xiaoyan Zhang &amp;lt;xiaoyan.zhang-ral2JQCrhuEAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

Signed-off-by: Xiaoyan Zhang &amp;lt;xiaoyan.zhang-ral2JQCrhuEAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 Documentation/ABI/testing/sysfs-driver-ppi |   70 ++++++++++++++++++++++++++++
 1 files changed, 70 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-driver-ppi

diff --git a/Documentation/ABI/testing/sysfs-driver-ppi b/Documentation/ABI/testing/sysfs-driver-ppi
new file mode 100644
index 0000000..5da9acd
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-ppi
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,70 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+What:/sys/devices/pnp0/&amp;lt;bus-num&amp;gt;/ppi/
+Date:May 2012
+Kernel Version:3.4
+Contact:xiaoyan.zhang-ral2JQCrhuEAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org
+Description:
+This folder includes the attributes related with PPI (Physical
+Presence Interface). Only if TPM is supported by BIOS, this
+folder makes sense. The folder path can be got by command
+'find /sys/ -name 'pcrs''. For the detail information of PPI,
+please refer to the PPI specification from
+http://www.trustedcomputinggroup.org/
+
+What:/sys/devices/pnp0/&amp;lt;bus-num&amp;gt;/ppi/version
+Date:May 2012
+Contact:xiaoyan.zhang-ral2JQCrhuEAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org
+Description:
+This attribute shows the version of the PPI supported by the
+platform.
+This file is readonly.
+
+What:/sys/devices/pnp0/&amp;lt;bus-num&amp;gt;/ppi/request
+Date:May 2012
+Contact:xiaoyan.zhang-ral2JQCrhuEAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org
+Description:
+This attribute shows the request for an operation to be
+executed in the pre-OS environment. It is the only input from
+the OS to the pre-OS environment. The request should be an
+integer value range from 1 to 160, and 0 means no request.
+This file can be read and written.
+
+What:/sys/devices/pnp0/00:&amp;lt;bus-num&amp;gt;/ppi/response
+Date:May 2012
+Contact:xiaoyan.zhang-ral2JQCrhuEAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org
+Description:
+This attribute shows the response to the most recent operation
+request it acted upon. The format is "&amp;lt;request&amp;gt; &amp;lt;response num&amp;gt;
+: &amp;lt;response description&amp;gt;".
+This file is readonly.
+
+What:/sys/devices/pnp0/&amp;lt;bus-num&amp;gt;/ppi/transition_action
+Date:May 2012
+Contact:xiaoyan.zhang-ral2JQCrhuEAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org
+Description:
+This attribute shows the platform-specific action that should
+take place in order to transition to the BIOS for execution of
+a requested operation. The format is "&amp;lt;action num&amp;gt;: &amp;lt;action
+description&amp;gt;".
+This file is readonly.
+
+What:/sys/devices/pnp0/&amp;lt;bus-num&amp;gt;/ppi/tcg_operations
+Date:May 2012
+Contact:xiaoyan.zhang-ral2JQCrhuEAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org
+Description:
+This attribute shows whether it is allowed to request an
+operation to be executed in the pre-OS environment by the BIOS
+for the requests defined by TCG, i.e. requests from 1 to 22.
+The format is "&amp;lt;request&amp;gt; &amp;lt;status num&amp;gt;: &amp;lt;status description&amp;gt;".
+This attribute is only supported by PPI version 1.2+.
+This file is readonly.
+
+What:/sys/devices/pnp0/&amp;lt;bus-num&amp;gt;/ppi/vs_operations
+Date:May 2012
+Contact:xiaoyan.zhang-ral2JQCrhuEAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org
+Description:
+This attribute shows whether it is allowed to request an
+operation to be executed in the pre-OS environment by the BIOS
+for the vendor specific requests, i.e. requests from 128 to
+255. The format is same with tcg_operations. This attribute
+is also only supported by PPI version 1.2+.
+This file is readonly.
&lt;/pre&gt;</description>
    <dc:creator>Zhang, Xiaoyan</dc:creator>
    <dc:date>2012-05-23T03:35:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2544">
    <title>[PATCH 1/2] driver: add PPI support in tpm driver</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2544</link>
    <description>&lt;pre&gt;From: Xiaoyan Zhang &amp;lt;xiaoyan.zhang-ral2JQCrhuEAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

The Physical Presence Interface enables the OS and the BIOS to cooperate
and provides a simple and straightforward platform user experience for
administering the TPM without sacrificing security.

Signed-off-by: Xiaoyan Zhang &amp;lt;xiaoyan.zhang-ral2JQCrhuEAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 drivers/char/tpm/tpm.c |  462 ++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/char/tpm/tpm.h |   18 ++
 2 files changed, 480 insertions(+), 0 deletions(-)

diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
index ad7c732..afa7ec4 100644
--- a/drivers/char/tpm/tpm.c
+++ b/drivers/char/tpm/tpm.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -28,6 +28,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;linux/mutex.h&amp;gt;
 #include &amp;lt;linux/spinlock.h&amp;gt;
 #include &amp;lt;linux/freezer.h&amp;gt;
+#include &amp;lt;linux/acpi.h&amp;gt;
+#include &amp;lt;acpi/acpi_drivers.h&amp;gt;
 
 #include "tpm.h"
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -331,6 +333,50 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static const u8 tpm_ordinal_duration[TPM_MAX_ORDINAL] = {
 TPM_MEDIUM,
 };
 
+static const u8 tpm_ppi_uuid[] = {
+0xA6, 0xFA, 0xDD, 0x3D,
+0x1B, 0x36,
+0xB4, 0x4E,
+0xA4, 0x24,
+0x8D, 0x10, 0x08, 0x9D, 0x16, 0x53
+};
+static char *tpm_device_name = "TPM";
+
+#define TPM_PPI_REVISION_ID1
+#define TPM_PPI_FN_VERSION1
+#define TPM_PPI_FN_SUBREQ2
+#define TPM_PPI_FN_GETREQ3
+#define TPM_PPI_FN_GETACT4
+#define TPM_PPI_FN_GETRSP5
+#define TPM_PPI_FN_SUBREQ27
+#define TPM_PPI_FN_GETOPR8
+#define PPI_TPM_REQ_MAX22
+#define PPI_VS_REQ_START128
+#define PPI_VS_REQ_END255
+#define PPI_VERSION_LEN3
+
+static DEVICE_ATTR(version, S_IRUGO, tpm_show_ppi_version, NULL);
+static DEVICE_ATTR(request, S_IRUGO | S_IWUSR | S_IWGRP,
+   tpm_show_ppi_request, tpm_store_ppi_request);
+static DEVICE_ATTR(transition_action, S_IRUGO,
+   tpm_show_ppi_transition_action, NULL);
+static DEVICE_ATTR(response, S_IRUGO, tpm_show_ppi_response, NULL);
+static DEVICE_ATTR(tcg_operations, S_IRUGO, tpm_show_ppi_tcg_operations, NULL);
+static DEVICE_ATTR(vs_operations, S_IRUGO, tpm_show_ppi_vs_operations, NULL);
+
+static struct attribute *ppi_attrs[] = {
+&amp;amp;dev_attr_version.attr,
+&amp;amp;dev_attr_request.attr,
+&amp;amp;dev_attr_transition_action.attr,
+&amp;amp;dev_attr_response.attr,
+&amp;amp;dev_attr_tcg_operations.attr,
+&amp;amp;dev_attr_vs_operations.attr, NULL,
+};
+
+static struct attribute_group ppi_attr_grp = {
+.attrs = ppi_attrs
+};
+
 static void user_reader_timeout(unsigned long ptr)
 {
 struct tpm_chip *chip = (struct tpm_chip *) ptr;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1059,6 +1105,414 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; ssize_t tpm_show_timeouts(struct device *dev, struct device_attribute *attr,
 }
 EXPORT_SYMBOL_GPL(tpm_show_timeouts);
 
+static acpi_status ppi_callback(acpi_handle handle, u32 level, void *context,
+void **return_value)
+{
+acpi_status status;
+struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
+status = acpi_get_name(handle, ACPI_FULL_PATHNAME, &amp;amp;buffer);
+if (strstr(buffer.pointer, context) != NULL) {
+*return_value = handle;
+kfree(buffer.pointer);
+return AE_CTRL_TERMINATE;
+}
+return AE_OK;
+}
+
+static inline void ppi_assign_params(union acpi_object params[4],
+     u64 function_num)
+{
+params[0].type = ACPI_TYPE_BUFFER;
+params[0].buffer.length = sizeof(tpm_ppi_uuid);
+params[0].buffer.pointer = (char *)tpm_ppi_uuid;
+params[1].type = ACPI_TYPE_INTEGER;
+params[1].integer.value = TPM_PPI_REVISION_ID;
+params[2].type = ACPI_TYPE_INTEGER;
+params[2].integer.value = function_num;
+params[3].type = ACPI_TYPE_PACKAGE;
+params[3].package.count = 0;
+params[3].package.elements = NULL;
+}
+
+ssize_t tpm_show_ppi_version(struct device *dev, struct device_attribute *attr,
+     char *buf)
+{
+acpi_handle handle;
+acpi_status status;
+struct acpi_object_list input;
+struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
+union acpi_object params[4];
+union acpi_object *obj;
+
+input.count = 4;
+ppi_assign_params(params, TPM_PPI_FN_VERSION);
+input.pointer = params;
+status = acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
+     ACPI_UINT32_MAX, ppi_callback, NULL,
+     tpm_device_name, &amp;amp;handle);
+if (ACPI_FAILURE(status))
+return status;
+
+status = acpi_evaluate_object_typed(handle, "_DSM", &amp;amp;input, &amp;amp;output,
+ ACPI_TYPE_STRING);
+if (ACPI_FAILURE(status))
+return status;
+obj = (union acpi_object *)output.pointer;
+status = scnprintf(buf, PAGE_SIZE, "%s\n", obj-&amp;gt;string.pointer);
+kfree(output.pointer);
+return status;
+}
+EXPORT_SYMBOL_GPL(tpm_show_ppi_version);
+
+ssize_t tpm_show_ppi_request(struct device *dev,
+     struct device_attribute *attr,
+     char *buf)
+{
+acpi_handle handle;
+acpi_status status;
+struct acpi_object_list input;
+struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
+union acpi_object params[4];
+union acpi_object *ret_obj;
+
+input.count = 4;
+ppi_assign_params(params, TPM_PPI_FN_GETREQ);
+input.pointer = params;
+status = acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
+     ACPI_UINT32_MAX, ppi_callback, NULL,
+     tpm_device_name, &amp;amp;handle);
+if (ACPI_FAILURE(status))
+return status;
+
+status = acpi_evaluate_object_typed(handle, "_DSM", &amp;amp;input, &amp;amp;output,
+    ACPI_TYPE_PACKAGE);
+if (ACPI_FAILURE(status))
+return status;
+/*
+ * output.pointer should be of package type, including two integers.
+ * The first is function return code, 0 means success and 1 means
+ * error. The second is pending TPM operation requested by the OS, 0
+ * means none and &amp;gt;0 means operation value.
+ */
+ret_obj = ((union acpi_object *)output.pointer)-&amp;gt;package.elements;
+if (ret_obj-&amp;gt;type == ACPI_TYPE_INTEGER) {
+if (ret_obj-&amp;gt;integer.value) {
+status = AE_ERROR;
+goto cleanup;
+}
+ret_obj++;
+if (ret_obj-&amp;gt;type == ACPI_TYPE_INTEGER)
+status = scnprintf(buf, PAGE_SIZE, "%llu\n",
+   ret_obj-&amp;gt;integer.value);
+else
+status = AE_TYPE;
+} else {
+status = AE_TYPE;
+}
+cleanup:
+kfree(output.pointer);
+return status;
+}
+EXPORT_SYMBOL_GPL(tpm_show_ppi_request);
+
+ssize_t tpm_store_ppi_request(struct device *dev,
+      struct device_attribute *attr,
+      const char *buf, size_t count)
+{
+char version[PPI_VERSION_LEN + 1];
+acpi_handle handle;
+acpi_status status;
+struct acpi_object_list input;
+struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
+union acpi_object params[4];
+union acpi_object obj;
+u32 req;
+u64 ret;
+
+input.count = 4;
+ppi_assign_params(params, TPM_PPI_FN_VERSION);
+input.pointer = params;
+status = acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
+     ACPI_UINT32_MAX, ppi_callback, NULL,
+     tpm_device_name, &amp;amp;handle);
+if (ACPI_FAILURE(status))
+return status;
+
+status = acpi_evaluate_object_typed(handle, "_DSM", &amp;amp;input, &amp;amp;output,
+    ACPI_TYPE_STRING);
+if (ACPI_FAILURE(status))
+return status;
+strncpy(version,
+((union acpi_object *)output.pointer)-&amp;gt;string.pointer,
+PPI_VERSION_LEN);
+kfree(output.pointer);
+output.length = ACPI_ALLOCATE_BUFFER;
+output.pointer = NULL;
+/*
+ * the function to submit TPM operation request to pre-os environment
+ * is updated with function index from SUBREQ to SUBREQ2 since PPI
+ * version 1.1
+ */
+if (strcmp(version, "1.1") == -1)
+params[2].integer.value = TPM_PPI_FN_SUBREQ;
+else
+params[2].integer.value = TPM_PPI_FN_SUBREQ2;
+/*
+ * PPI spec defines params[3].type as ACPI_TYPE_PACKAGE. Some BIOS
+ * accept buffer/string/integer type, but some BIOS accept buffer/
+ * string/package type. For PPI version 1.0 and 1.1, use buffer type
+ * for compatibility, and use package type since 1.2 according to spec.
+ */
+if (strcmp(version, "1.2") == -1) {
+params[3].type = ACPI_TYPE_BUFFER;
+params[3].buffer.length = sizeof(req);
+sscanf(buf, "%d", &amp;amp;req);
+params[3].buffer.pointer = (char *)&amp;amp;req;
+} else {
+params[3].package.count = 1;
+obj.type = ACPI_TYPE_INTEGER;
+sscanf(buf, "%llu", &amp;amp;obj.integer.value);
+params[3].package.elements = &amp;amp;obj;
+}
+
+status = acpi_evaluate_object_typed(handle, "_DSM", &amp;amp;input, &amp;amp;output,
+    ACPI_TYPE_INTEGER);
+if (ACPI_FAILURE(status))
+return status;
+ret = ((union acpi_object *)output.pointer)-&amp;gt;integer.value;
+if (ret == 0)
+status = (acpi_status)count;
+else if (ret == 1)
+status = AE_NOT_IMPLEMENTED;
+else
+status = AE_ERROR;
+kfree(output.pointer);
+return status;
+}
+EXPORT_SYMBOL_GPL(tpm_store_ppi_request);
+
+ssize_t tpm_show_ppi_transition_action(struct device *dev,
+       struct device_attribute *attr,
+       char *buf)
+{
+char version[PPI_VERSION_LEN + 1];
+acpi_handle handle;
+acpi_status status;
+struct acpi_object_list input;
+struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
+union acpi_object params[4];
+u32 ret;
+char *info[] = {
+"None",
+"Shutdown",
+"Reboot",
+"OS Vendor-specific",
+"Error",
+};
+input.count = 4;
+ppi_assign_params(params, TPM_PPI_FN_VERSION);
+input.pointer = params;
+status = acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
+     ACPI_UINT32_MAX, ppi_callback, NULL,
+     tpm_device_name, &amp;amp;handle);
+if (ACPI_FAILURE(status))
+return status;
+
+status = acpi_evaluate_object_typed(handle, "_DSM", &amp;amp;input, &amp;amp;output,
+    ACPI_TYPE_STRING);
+if (ACPI_FAILURE(status))
+return status;
+strncpy(version,
+((union acpi_object *)output.pointer)-&amp;gt;string.pointer,
+PPI_VERSION_LEN);
+/*
+ * PPI spec defines params[3].type as empty package, but some platforms
+ * (e.g. Capella with PPI 1.0) need integer/string/buffer type, so for
+ * compatibility, define params[3].type as buffer, if PPI version &amp;lt; 1.2
+ */
+if (strcmp(version, "1.2") == -1) {
+params[3].type = ACPI_TYPE_BUFFER;
+params[3].buffer.length =  0;
+params[3].buffer.pointer = NULL;
+}
+params[2].integer.value = TPM_PPI_FN_GETACT;
+kfree(output.pointer);
+output.length = ACPI_ALLOCATE_BUFFER;
+output.pointer = NULL;
+status = acpi_evaluate_object_typed(handle, "_DSM", &amp;amp;input, &amp;amp;output,
+    ACPI_TYPE_INTEGER);
+if (ACPI_FAILURE(status))
+return status;
+ret = ((union acpi_object *)output.pointer)-&amp;gt;integer.value;
+if (ret &amp;lt; ARRAY_SIZE(info) - 1)
+status = scnprintf(buf, PAGE_SIZE, "%d: %s\n", ret, info[ret]);
+else
+status = scnprintf(buf, PAGE_SIZE, "%d: %s\n", ret,
+   info[ARRAY_SIZE(info)-1]);
+kfree(output.pointer);
+return status;
+}
+EXPORT_SYMBOL_GPL(tpm_show_ppi_transition_action);
+
+ssize_t tpm_show_ppi_response(struct device *dev,
+      struct device_attribute *attr,
+      char *buf)
+{
+acpi_handle handle;
+acpi_status status;
+struct acpi_object_list input;
+struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
+union acpi_object params[4];
+union acpi_object *ret_obj;
+u64 req;
+
+input.count = 4;
+ppi_assign_params(params, TPM_PPI_FN_GETRSP);
+input.pointer = params;
+status = acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
+     ACPI_UINT32_MAX, ppi_callback, NULL,
+     tpm_device_name, &amp;amp;handle);
+if (ACPI_FAILURE(status))
+return status;
+
+status = acpi_evaluate_object_typed(handle, "_DSM", &amp;amp;input, &amp;amp;output,
+    ACPI_TYPE_PACKAGE);
+if (ACPI_FAILURE(status))
+return status;
+/*
+ * parameter output.pointer should be of package type, including
+ * 3 integers. The first means function return code, the second means
+ * most recent TPM operation request, and the last means response to
+ * the most recent TPM operation request. Only if the first is 0, and
+ * the second integer is not 0, the response makes sense.
+ */
+ret_obj = ((union acpi_object *)output.pointer)-&amp;gt;package.elements;
+if (ret_obj-&amp;gt;type != ACPI_TYPE_INTEGER) {
+status = AE_TYPE;
+goto cleanup;
+}
+if (ret_obj-&amp;gt;integer.value) {
+status = AE_ERROR;
+goto cleanup;
+}
+ret_obj++;
+if (ret_obj-&amp;gt;type != ACPI_TYPE_INTEGER) {
+status = AE_TYPE;
+goto cleanup;
+}
+if (ret_obj-&amp;gt;integer.value) {
+req = ret_obj-&amp;gt;integer.value;
+ret_obj++;
+if (ret_obj-&amp;gt;type != ACPI_TYPE_INTEGER) {
+status = AE_TYPE;
+goto cleanup;
+}
+if (ret_obj-&amp;gt;integer.value == 0)
+status = scnprintf(buf, PAGE_SIZE, "%llu %s\n", req,
+   "0: Success");
+else if (ret_obj-&amp;gt;integer.value == 0xFFFFFFF0)
+status = scnprintf(buf, PAGE_SIZE, "%llu %s\n", req,
+   "0xFFFFFFF0: User Abort");
+else if (ret_obj-&amp;gt;integer.value == 0xFFFFFFF1)
+status = scnprintf(buf, PAGE_SIZE, "%llu %s\n", req,
+   "0xFFFFFFF1: BIOS Failure");
+else if (ret_obj-&amp;gt;integer.value &amp;gt;= 1 &amp;amp;&amp;amp;
+ ret_obj-&amp;gt;integer.value &amp;lt;= 0x00000FFF)
+status = scnprintf(buf, PAGE_SIZE, "%llu %llu: %s\n",
+   req, ret_obj-&amp;gt;integer.value,
+   "Corresponding TPM error");
+else
+status = scnprintf(buf, PAGE_SIZE, "%llu %llu: %s\n",
+   req, ret_obj-&amp;gt;integer.value,
+   "Error");
+} else {
+status = scnprintf(buf, PAGE_SIZE, "%llu: %s\n",
+   ret_obj-&amp;gt;integer.value, "No Recent Request");
+}
+cleanup:
+kfree(output.pointer);
+return status;
+}
+EXPORT_SYMBOL_GPL(tpm_show_ppi_response);
+
+static ssize_t show_ppi_operations(char *buf, u32 start, u32 end)
+{
+char *str = buf;
+char version[PPI_VERSION_LEN];
+acpi_handle handle;
+acpi_status status;
+struct acpi_object_list input;
+struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
+union acpi_object params[4];
+union acpi_object obj;
+int i;
+u32 ret;
+char *info[] = {
+"Not implemented",
+"BIOS only",
+"Blocked for OS by BIOS",
+"User required",
+"User not required",
+};
+input.count = 4;
+ppi_assign_params(params, TPM_PPI_FN_VERSION);
+input.pointer = params;
+status = acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
+     ACPI_UINT32_MAX, ppi_callback, NULL,
+     tpm_device_name, &amp;amp;handle);
+if (ACPI_FAILURE(status))
+return status;
+
+status = acpi_evaluate_object_typed(handle, "_DSM", &amp;amp;input, &amp;amp;output,
+ ACPI_TYPE_STRING);
+if (ACPI_FAILURE(status))
+return status;
+
+strncpy(version,
+((union acpi_object *)output.pointer)-&amp;gt;string.pointer,
+PPI_VERSION_LEN);
+kfree(output.pointer);
+output.length = ACPI_ALLOCATE_BUFFER;
+output.pointer = NULL;
+if (strcmp(version, "1.2") == -1)
+return AE_NOT_IMPLEMENTED;
+
+params[2].integer.value = TPM_PPI_FN_GETOPR;
+params[3].package.count = 1;
+obj.type = ACPI_TYPE_INTEGER;
+params[3].package.elements = &amp;amp;obj;
+for (i = start; i &amp;lt;= end; i++) {
+obj.integer.value = i;
+status = acpi_evaluate_object_typed(handle, "_DSM",
+ &amp;amp;input, &amp;amp;output, ACPI_TYPE_INTEGER);
+if (ACPI_FAILURE(status))
+return status;
+
+ret = ((union acpi_object *)output.pointer)-&amp;gt;integer.value;
+if (ret &amp;gt; 0 &amp;amp;&amp;amp; ret &amp;lt; ARRAY_SIZE(info))
+str += scnprintf(str, PAGE_SIZE, "%d %d: %s\n",
+ i, ret, info[ret]);
+kfree(output.pointer);
+output.length = ACPI_ALLOCATE_BUFFER;
+output.pointer = NULL;
+}
+return str - buf;
+}
+
+ssize_t tpm_show_ppi_tcg_operations(struct device *dev,
+   struct device_attribute *attr, char *buf)
+{
+return show_ppi_operations(buf, 0, PPI_TPM_REQ_MAX);
+}
+EXPORT_SYMBOL_GPL(tpm_show_ppi_tcg_operations);
+
+ssize_t tpm_show_ppi_vs_operations(struct device *dev,
+  struct device_attribute *attr, char *buf)
+{
+return show_ppi_operations(buf, PPI_VS_REQ_START, PPI_VS_REQ_END);
+}
+EXPORT_SYMBOL_GPL(tpm_show_ppi_vs_operations);
+
 ssize_t tpm_store_cancel(struct device *dev, struct device_attribute *attr,
 const char *buf, size_t count)
 {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1360,6 +1814,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct tpm_chip *tpm_register_hardware(struct device *dev,
 
 char *devname;
 struct tpm_chip *chip;
+struct kobject *ppi;
 
 /* Driver specific per-device data */
 chip = kzalloc(sizeof(*chip), GFP_KERNEL);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1416,6 +1871,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct tpm_chip *tpm_register_hardware(struct device *dev,
 return NULL;
 }
 
+ppi = kobject_create_and_add("ppi", &amp;amp;dev-&amp;gt;kobj);
+if (sysfs_create_group(ppi, &amp;amp;ppi_attr_grp)) {
+misc_deregister(&amp;amp;chip-&amp;gt;vendor.miscdev);
+put_device(chip-&amp;gt;dev);
+return NULL;
+}
+
 chip-&amp;gt;bios_dir = tpm_bios_log_setup(devname);
 
 /* Make chip available */
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index b1c5280..3346833 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -65,6 +65,24 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; extern ssize_t tpm_show_durations(struct device *,
   struct device_attribute *attr, char *);
 extern ssize_t tpm_show_timeouts(struct device *,
  struct device_attribute *attr, char *);
+extern ssize_t tpm_show_ppi_version(struct device *,
+    struct device_attribute *attr, char *);
+extern ssize_t tpm_show_ppi_request(struct device *,
+    struct device_attribute *attr, char *);
+extern ssize_t tpm_store_ppi_request(struct device *,
+     struct device_attribute *attr,
+     const char *, size_t);
+extern ssize_t tpm_show_ppi_transition_action(struct device *,
+      struct device_attribute *attr,
+      char *);
+extern ssize_t tpm_show_ppi_response(struct device *,
+     struct device_attribute *attr, char *);
+extern ssize_t tpm_show_ppi_tcg_operations(struct device *,
+   struct device_attribute *attr,
+   char *);
+extern ssize_t tpm_show_ppi_vs_operations(struct device *,
+  struct device_attribute *attr,
+  char *);
 
 struct tpm_chip;
 
&lt;/pre&gt;</description>
    <dc:creator>Zhang, Xiaoyan</dc:creator>
    <dc:date>2012-05-23T03:34:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2543">
    <title>[PATCH 0/2] Add PPI support in tpm driver</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2543</link>
    <description>&lt;pre&gt;The series of patches add PPI support in linux kernel.

The Physical Presence Interface enables the OS and the BIOS to cooperate to provide a simple and straightforward platform user experience for administering the TPM without sacrificing security.

PATCH 1: drivers: Add PPI support in tpm driver
PATCH 2: Documentation: sysfs for physical presence interface
&lt;/pre&gt;</description>
    <dc:creator>Zhang, Xiaoyan</dc:creator>
    <dc:date>2012-05-23T03:33:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2437">
    <title>[patch] Fix handling of overlength pathname in AF_UNIX sun_path</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2437</link>
    <description>&lt;pre&gt;Tetsuo Handa sent me a patch to document the kernel's odd 
behavior when asked to create a UNIX domain socket address where the 
pathname completely fills the sun_path field without including a null 
terminator [1]. 

One of the consequences of the current kernel behavior is that 
when a socket address is returned to userspace (via getsockname(), 
getpeername(), accept(), recvfrom()), applications can't reliably 
do things such as:

printf("%s\n", addr.sun_path);

Instead one must either write:

printf("%.*s\n", sizeof(addr.sun_path), addr.sun_path);

or, when retrieving a socket address structure, employ a buffer whose
size is:

sizeof(struct sockaddr_un) + 1

(This ensures that there is enough space to hold the null terminator
for the case where a socket was bound to a sun_path with non-NUL characters
in all 108 bytes. But it entails some casting.)

Tetsuo initially considered there might be a kernel bug here, 
but an attempt to change the kernel behavior met resistance [2].

The patch at the end of this message is a slightly different 
fix for the same problem. There are a few reasons why I think 
it (or some variation) should be considered:

1. Changing the kernel behavior prevents userspace having 
   to go through the sort of contortions described above
   in order to handle the 108-non-NUL-bytes-in-sun_path case.
2. POSIX says that sun_path is a pathname. By (POSIX) definition, 
   a pathname is null terminated.
3. Considering these two sets:

   (a) [applications that rely on the assumption that there
        is a null terminator inside sizeof(sun_path) bytes]
   (b) [applications that would break if the kernel behavior changed]

   I suspect that set (a) is rather larger than set (b)--or, more 
   likely still, applications ensure they go for the lowest common
   denominator limit of 92 (HP-UX) or 104 (historical BSD limit)
   bytes, and so avoid this issue completely.

The accompanying patch changes unix_mkname() to ensure that a terminating 
null byte is always located within the first 108 bytes of sun_path. 
It does change the ABI for the former case where a pathname ran to 108
bytes without a null terminator: for that case, the call now fails with
the error -EINVAL. What are people's thoughts on applying this?

[1] http://thread.gmane.org/gmane.linux.network/174473/focus=1861
[2] http://thread.gmane.org/gmane.linux.kernel/291038

Signed-off-by: Michael Kerrisk &amp;lt;mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

---

--- net/unix/af_unix.c.orig2012-04-17 09:50:07.383459311 +1200
+++ net/unix/af_unix.c2012-04-17 19:49:56.077852639 +1200
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -207,14 +207,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int unix_mkname(struct sockaddr_u
 if (!sunaddr || sunaddr-&amp;gt;sun_family != AF_UNIX)
 return -EINVAL;
 if (sunaddr-&amp;gt;sun_path[0]) {
-/*
- * This may look like an off by one error but it is a bit more
- * subtle. 108 is the longest valid AF_UNIX path for a binding.
- * sun_path[108] doesn't as such exist.  However in kernel space
- * we are guaranteed that it is a valid memory location in our
- * kernel address buffer.
- */
-((char *)sunaddr)[len] = 0;
+if (len == sizeof(*sunaddr)) {
+/*
+ * If 'sun_path' is completely filled, the user
+ * must include a terminator
+ */
+if (!memchr(sunaddr-&amp;gt;sun_path, '\0',
+sizeof(sunaddr-&amp;gt;sun_path)))
+return -EINVAL;
+} else
+((char *)sunaddr)[len] = 0;
 len = strlen(sunaddr-&amp;gt;sun_path)+1+sizeof(short);
 return len;
 }
&lt;/pre&gt;</description>
    <dc:creator>Michael Kerrisk</dc:creator>
    <dc:date>2012-04-17T10:44:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2432">
    <title>Why no flag to unlink a file on creation?</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2432</link>
    <description>&lt;pre&gt;Hello,
I'm not too familiar with the internals of the kernel, so this question
might be stupid, and I'm not sure whether this is the right place to ask
about it, but anyway:
Why is there no flag for the "open" syscall to specify that you want the
file you're opening to be deleted? I think that it would be very useful
in combination with O_CREAT - you could create temporary files without
actually leaving files on the filesystem, given that the filesystem
supports it.

Jann Horn
&lt;/pre&gt;</description>
    <dc:creator>Jann Horn</dc:creator>
    <dc:date>2012-03-27T13:29:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2430">
    <title>[PATCH 1/2] Define ENOAUTHSERVICE to indicate "Authentication service unavailable"</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2430</link>
    <description>&lt;pre&gt;As the kernel has or will have filesystems (and possibly other services) that
want to obtain authentication tokens and/or encryption data on demand (via
GSSAPI for example), it would seem useful to provide an additional error code
to indicate a problem with the lookup, rather than overloading some other error
code.

We already have EKEYREJECTED, EKEYREVOKED and EKEYEXPIRED to indicate problems
with a token that we already have, but what if the authentication server just
isn't available?

Define ENOAUTHSERVICE to indicate "Authentication service unavailable".  This
can be used to indicate, for example, that an attempt was made by request_key()
to retrieve a key, but the authentication server (e.g. a KDC) it is supposed to
contact didn't answer or that it couldn't determine the location of a suitable
server.

One way this can be used is that the user of a network filesystem could get a
TGT from the KDC and stash it in their session keyring, then the filesystem can
attempt to automatically get a ticket for accessing the filesystem - but if the
server is uncontactable then the ticket can be negatively instantiated with
KEYCTL_REJECT, giving the error to be handed to future requests as
ENOAUTHSERVICE and a small timeout so that the key will expire from the cache
and allow a retry after a short while to prevent thrashing.

I envision that this error would primarily be generated by a kernel upcall for
the kernel to then pass back to the original userspace caller.  The kernel
itself might not actually pay any attention to it, except as a hint as to
whether to retry.

Signed-off-by: David Howells &amp;lt;dhowells-H+wXaHxf7aLQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Acked-by: Jeff Layton &amp;lt;jlayton-H+wXaHxf7aLQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Acked-by: Steven Whitehouse &amp;lt;swhiteho-H+wXaHxf7aLQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Acked-by: Steve Dickson &amp;lt;steved-H+wXaHxf7aLQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Liked-by: Simo Sorce &amp;lt;simo-H+wXaHxf7aLQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---

 arch/alpha/include/asm/errno.h  |    2 ++
 arch/mips/include/asm/errno.h   |    1 +
 arch/parisc/include/asm/errno.h |    1 +
 arch/sparc/include/asm/errno.h  |    1 +
 include/asm-generic/errno.h     |    1 +
 5 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/alpha/include/asm/errno.h b/arch/alpha/include/asm/errno.h
index e5f29ca..dce5fc9 100644
--- a/arch/alpha/include/asm/errno.h
+++ b/arch/alpha/include/asm/errno.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -124,4 +124,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #define EHWPOISON139/* Memory page has hardware error */
 
+#defineENOAUTHSERVICE140/* Authentication service not available */
+
 #endif
diff --git a/arch/mips/include/asm/errno.h b/arch/mips/include/asm/errno.h
index 6dcd358..67c46bd 100644
--- a/arch/mips/include/asm/errno.h
+++ b/arch/mips/include/asm/errno.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -122,6 +122,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #defineERFKILL167/* Operation not possible due to RF-kill */
 
 #define EHWPOISON168/* Memory page has hardware error */
+#defineENOAUTHSERVICE169/* Authentication service not available */
 
 #define EDQUOT1133/* Quota exceeded */
 
diff --git a/arch/parisc/include/asm/errno.h b/arch/parisc/include/asm/errno.h
index 135ad60..3a6ffcd 100644
--- a/arch/parisc/include/asm/errno.h
+++ b/arch/parisc/include/asm/errno.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -123,5 +123,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #defineERFKILL256/* Operation not possible due to RF-kill */
 
 #define EHWPOISON257/* Memory page has hardware error */
+#defineENOAUTHSERVICE258/* Authentication service not available */
 
 #endif
diff --git a/arch/sparc/include/asm/errno.h b/arch/sparc/include/asm/errno.h
index c351aba..94a878f 100644
--- a/arch/sparc/include/asm/errno.h
+++ b/arch/sparc/include/asm/errno.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -113,5 +113,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #defineERFKILL134/* Operation not possible due to RF-kill */
 
 #define EHWPOISON135/* Memory page has hardware error */
+#defineENOAUTHSERVICE136/* Authentication service not available */
 
 #endif
diff --git a/include/asm-generic/errno.h b/include/asm-generic/errno.h
index a1331ce..5e2b296 100644
--- a/include/asm-generic/errno.h
+++ b/include/asm-generic/errno.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -109,5 +109,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #define ERFKILL132/* Operation not possible due to RF-kill */
 
 #define EHWPOISON133/* Memory page has hardware error */
+#defineENOAUTHSERVICE134/* Authentication service not available */
 
 #endif

&lt;/pre&gt;</description>
    <dc:creator>David Howells</dc:creator>
    <dc:date>2012-03-22T13:35:32</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2429">
    <title>LOAN OFFER &lt; at &gt;3% APPLY NOW.</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2429</link>
    <description>&lt;pre&gt;E-mail us for an urgent loan today for more details.
&lt;/pre&gt;</description>
    <dc:creator>STANDARD CREDIT INTERNATIONAL FINANCE</dc:creator>
    <dc:date>2012-03-09T01:02:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2428">
    <title>Notification of your payment</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2428</link>
    <description>&lt;pre&gt;See the attached letter for more details!!!&lt;/pre&gt;</description>
    <dc:creator>Dr Jeff Thabo</dc:creator>
    <dc:date>2012-02-27T06:59:56</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2427">
    <title>Can we discuss?</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2427</link>
    <description>&lt;pre&gt;would
like
to
discuss
a
project
with
you.
Please
email
me
back.
via saadi78-dbdLmdGazhY&amp;lt; at &amp;gt;public.gmane.org
&lt;/pre&gt;</description>
    <dc:creator>Saadi Gaddafi</dc:creator>
    <dc:date>2012-02-26T10:31:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2422">
    <title>[PATCH 1/2] Define ENOAUTHSERVICE to indicate "Authentication service unavailable" [ver #2]</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2422</link>
    <description>&lt;pre&gt;As the kernel has or will have filesystems (and possibly other services) that
want to obtain authentication tokens and/or encryption data on demand (via
GSSAPI for example), it would seem useful to provide an additional error code
to indicate a problem with the lookup, rather than overloading some other error
code.

We already have EKEYREJECTED, EKEYREVOKED and EKEYEXPIRED to indicate problems
with a token that we already have, but what if the authentication server just
isn't available?

Define ENOAUTHSERVICE to indicate "Authentication service unavailable".  This
can be used to indicate, for example, that an attempt was made by request_key()
to retrieve a key, but the authentication server (e.g. a KDC) it is supposed to
contact didn't answer or that it couldn't determine the location of a suitable
server.

One way this can be used is that the user of a network filesystem can get a TGT
from the KDC and stash it in their session keyring, then the filesystem can
attempt to automatically get a ticket for accessing the filesystem - but if the
server is uncontactable then the ticket can be negatively instantiated with
KEYCTL_REJECT, giving the error to be handed to future requests as
ENOAUTHSERVICE and a small timeout so that the key will expire from the cache
and allow a retry after a short while to prevent thrashing.

Signed-off-by: David Howells &amp;lt;dhowells-H+wXaHxf7aLQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---

 arch/alpha/include/asm/errno.h  |    2 ++
 arch/mips/include/asm/errno.h   |    1 +
 arch/parisc/include/asm/errno.h |    1 +
 arch/sparc/include/asm/errno.h  |    1 +
 include/asm-generic/errno.h     |    1 +
 5 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/alpha/include/asm/errno.h b/arch/alpha/include/asm/errno.h
index e5f29ca..dce5fc9 100644
--- a/arch/alpha/include/asm/errno.h
+++ b/arch/alpha/include/asm/errno.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -124,4 +124,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #define EHWPOISON139/* Memory page has hardware error */
 
+#defineENOAUTHSERVICE140/* Authentication service not available */
+
 #endif
diff --git a/arch/mips/include/asm/errno.h b/arch/mips/include/asm/errno.h
index 6dcd358..67c46bd 100644
--- a/arch/mips/include/asm/errno.h
+++ b/arch/mips/include/asm/errno.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -122,6 +122,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #defineERFKILL167/* Operation not possible due to RF-kill */
 
 #define EHWPOISON168/* Memory page has hardware error */
+#defineENOAUTHSERVICE169/* Authentication service not available */
 
 #define EDQUOT1133/* Quota exceeded */
 
diff --git a/arch/parisc/include/asm/errno.h b/arch/parisc/include/asm/errno.h
index 135ad60..3a6ffcd 100644
--- a/arch/parisc/include/asm/errno.h
+++ b/arch/parisc/include/asm/errno.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -123,5 +123,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #defineERFKILL256/* Operation not possible due to RF-kill */
 
 #define EHWPOISON257/* Memory page has hardware error */
+#defineENOAUTHSERVICE258/* Authentication service not available */
 
 #endif
diff --git a/arch/sparc/include/asm/errno.h b/arch/sparc/include/asm/errno.h
index c351aba..94a878f 100644
--- a/arch/sparc/include/asm/errno.h
+++ b/arch/sparc/include/asm/errno.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -113,5 +113,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #defineERFKILL134/* Operation not possible due to RF-kill */
 
 #define EHWPOISON135/* Memory page has hardware error */
+#defineENOAUTHSERVICE136/* Authentication service not available */
 
 #endif
diff --git a/include/asm-generic/errno.h b/include/asm-generic/errno.h
index a1331ce..5e2b296 100644
--- a/include/asm-generic/errno.h
+++ b/include/asm-generic/errno.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -109,5 +109,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #define ERFKILL132/* Operation not possible due to RF-kill */
 
 #define EHWPOISON133/* Memory page has hardware error */
+#defineENOAUTHSERVICE134/* Authentication service not available */
 
 #endif

&lt;/pre&gt;</description>
    <dc:creator>David Howells</dc:creator>
    <dc:date>2012-02-09T10:13:40</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2415">
    <title>[PATCH 1/2] Define ENOAUTHSERVICE to indicate "Authentication service unavailable"</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2415</link>
    <description>&lt;pre&gt;As the kernel has or will have filesystems (and possibly other services) that
want to obtain authentication tokens and/or encryption data on demand (via
GSSAPI for example), it would seem useful to provide an additional error code
to indicate a problem with the lookup, rather than overloading some other error
code.

We already have EKEYREJECTED, EKEYREVOKED and EKEYEXPIRED to indicate problems
with a token that we already have, but what if the authentication server just
isn't available?

Define ENOAUTHSERVICE to indicate "Authentication service unavailable".  This
can be used to indicate, for example, that an attempt was made by request_key()
to retrieve a key, but the authentication server (e.g. a KDC) it is supposed to
contact didn't answer or that it couldn't determine the location of a suitable
server.

One way this can be used is that the user of a network filesystem can get a TGT
from the KDC and stash it in their session keyring, then the filesystem can
attempt to automatically get a ticket for accessing the filesystem - but if the
server is uncontactable then the ticket can be negatively instantiated with
KEYCTL_REJECT, giving the error to be handed to future requests as
ENOAUTHSERVICE and a small timeout so that the key will expire from the cache
and allow a retry after a short while to prevent thrashing.

Signed-off-by: David Howells &amp;lt;dhowells-H+wXaHxf7aLQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---

 arch/alpha/include/asm/errno.h  |    1 +
 arch/mips/include/asm/errno.h   |    1 +
 arch/parisc/include/asm/errno.h |    1 +
 arch/sparc/include/asm/errno.h  |    1 +
 include/asm-generic/errno.h     |    1 +
 5 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/alpha/include/asm/errno.h b/arch/alpha/include/asm/errno.h
index e5f29ca..5edc21e 100644
--- a/arch/alpha/include/asm/errno.h
+++ b/arch/alpha/include/asm/errno.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -121,6 +121,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #defineENOTRECOVERABLE137/* State not recoverable */
 
 #defineERFKILL138/* Operation not possible due to RF-kill */
+#defineENOAUTHSERVICE139/* Authentication service not available */
 
 #define EHWPOISON139/* Memory page has hardware error */
 
diff --git a/arch/mips/include/asm/errno.h b/arch/mips/include/asm/errno.h
index 6dcd358..9e0b83f 100644
--- a/arch/mips/include/asm/errno.h
+++ b/arch/mips/include/asm/errno.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -120,6 +120,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #defineENOTRECOVERABLE166/* State not recoverable */
 
 #defineERFKILL167/* Operation not possible due to RF-kill */
+#defineENOAUTHSERVICE168/* Authentication service not available */
 
 #define EHWPOISON168/* Memory page has hardware error */
 
diff --git a/arch/parisc/include/asm/errno.h b/arch/parisc/include/asm/errno.h
index 135ad60..c4598b6 100644
--- a/arch/parisc/include/asm/errno.h
+++ b/arch/parisc/include/asm/errno.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -121,6 +121,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #define ENOTRECOVERABLE255/* State not recoverable */
 
 #defineERFKILL256/* Operation not possible due to RF-kill */
+#defineENOAUTHSERVICE257/* Authentication service not available */
 
 #define EHWPOISON257/* Memory page has hardware error */
 
diff --git a/arch/sparc/include/asm/errno.h b/arch/sparc/include/asm/errno.h
index c351aba..ab4f9f5 100644
--- a/arch/sparc/include/asm/errno.h
+++ b/arch/sparc/include/asm/errno.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -111,6 +111,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #defineENOTRECOVERABLE133/* State not recoverable */
 
 #defineERFKILL134/* Operation not possible due to RF-kill */
+#defineENOAUTHSERVICE135/* Authentication service not available */
 
 #define EHWPOISON135/* Memory page has hardware error */
 
diff --git a/include/asm-generic/errno.h b/include/asm-generic/errno.h
index a1331ce..52325ca 100644
--- a/include/asm-generic/errno.h
+++ b/include/asm-generic/errno.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -107,6 +107,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #defineENOTRECOVERABLE131/* State not recoverable */
 
 #define ERFKILL132/* Operation not possible due to RF-kill */
+#defineENOAUTHSERVICE133/* Authentication service not available */
 
 #define EHWPOISON133/* Memory page has hardware error */
 

&lt;/pre&gt;</description>
    <dc:creator>David Howells</dc:creator>
    <dc:date>2012-02-08T12:29:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2414">
    <title>Fund transfer/confidential.</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2414</link>
    <description>&lt;pre&gt;Open the attachment file for Fund transfer/confidential.&lt;/pre&gt;</description>
    <dc:creator>MAKULEKE</dc:creator>
    <dc:date>2012-02-02T11:28:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2406">
    <title>[Bug] epoll_wait return EPOLLOUT even with EPOLLET flag</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2406</link>
    <description>&lt;pre&gt;Hi,

I am a linux user and I found some question when using epoll with EPOLLET.

My program's step:

1. create a socket (sfd) and connect to server
2. create epoll (efd)
3. add socket descriptor (sfd) to epoll (efd) with flag EPOLLET
4. get a EPOLLOUT event through epoll_wait

After that, the program will nerver get a EPOLLOUT event because ituse
EPOLLET mode (the same event will not be got twice)

BUT，when a message comes from server，the client socket will get aevent
and this event contains EPOLLOUT and EPOLLIN, looks epoll_waitreturn
too much events than it should

My question is: Is this a bug for epoll ?

Any reply will be appreciate.

--
--
Best Regard
Robin Dong
&lt;/pre&gt;</description>
    <dc:creator>Robin Dong</dc:creator>
    <dc:date>2011-11-17T08:07:56</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2405">
    <title>(unknown)</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2405</link>
    <description>&lt;pre&gt;
I am Bar Yasser, I have a very important Business matters i will like to
discuss with you.If this your Email is valid Contact me through my personal
email:rawashdeh.asseral11&amp;lt; at &amp;gt;w.cn Thank you Mr. Yasser Al


&lt;/pre&gt;</description>
    <dc:creator>Bar Yasser</dc:creator>
    <dc:date>2011-10-31T05:54:03</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2364">
    <title>sendmmsg(2) draft man pages</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2364</link>
    <description>&lt;pre&gt;Hello Anton,

Stephan Mueller made an initial shot at a manual page for the
sendmmsg() syscall that you recently added to the kernel. This
inspired me to come up with a more complete version, which I'd like to
get reviewed before including in man-pages. Could you take a look
("man -l &amp;lt;file&amp;gt;") at the version below and let me know any errors or
omissions.

Thanks

Michael Kerrisk

.\" Copyright (c) 2011 by Michael Kerrisk &amp;lt;mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
.\" with some material from a draft by
.\" Stephan Mueller &amp;lt;stephan.mueller-fwYZOkdEjagAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
.\" in turn based on Andi Kleen's recvmmsg.2 page.
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.TH SENDMMSG 2 2011-09-09 "Linux" "Linux Programmer's Manual"
.SH NAME
sendmmsg \- send multiple messages on a socket
.SH SYNOPSIS
.nf
.B "#define _GNU_SOURCE"
.BI "#include &amp;lt;sys/socket.h&amp;gt;"

.BI "int sendmmsg(int " sockfd ", struct mmsghdr *" msgvec \
", unsigned int " vlen ","
.BI "             unsigned int " flags ");"
.fi
.SH DESCRIPTION
The
.BR sendmmsg ()
system call is an extension of
.BR sendmsg (2)
that allows the caller to transmit multiple messages on a socket
using a single system call.
(This has performance benefits for some applications.)
.\" See commit 228e548e602061b08ee8e8966f567c12aa079682

The
.I sockfd
argument is the file descriptor of the socket
on which data is to be transmitted.

The
.I msgvec
argument is a pointer to an array of
.I mmsghdr
structures.
The size of this array is specified in
.IR vlen .

The
.I mmsghdr
structure is defined in
.I &amp;lt;sys/socket.h&amp;gt;
as:

.in +4n
.nf
struct mmsghdr {
    struct msghdr msg_hdr;  /* Message header */
    unsigned int  msg_len;  /* Number of bytes transmitted */
};
.fi
.in
.PP
The
.I msg_hdr
field is a
.I msghdr
structure, as described in
.BR sendmsg (2).
The
.I msg_len
field is used to return the number of bytes sent from the message in
.IR msg_hdr
(i.e., the same as the return value from a single
.BR sendmsg (2)
call).

The
.I flags
argument contains flags ORed together.
The flags are the same as for
.BR sendmsg (2).

A blocking
.BR sendmmsg ()
call blocks until
.I vlen
messages have been sent.
A nonblocking call sends as many messages as possible
(up to the limit specified by
.IR vlen )
and returns immediately.

On return from
.BR sendmmsg (),
the
.I msg_len
fields of successive elements of
.IR msgvec
are updated to contain the number of bytes transmitted from the corresponding
.IR msg_hdr .
The return value of the call indicates the number of elements of
.I msgvec
that have been updated.
.SH RETURN VALUE
On success,
.BR sendmmsg ()
returns the number of messages sent from
.IR msgvec ;
if this is less than
.IR vlen ,
the caller can retry with a further
.BR sendmmsg ()
call to send the remaining messages.

On error, \-1 is returned, and
.I errno
is set to indicate the error.
.SH ERRORS
Errors are as for
.BR sendmsg (2).
An error is returned only if no datagrams could be sent.
.\" commit 728ffb86f10873aaf4abd26dde691ee40ae731fe
.\"     ... only return an error if no datagrams could be sent.
.\"     If less than the requested number of messages were sent, the application
.\"     must retry starting at the first failed one and if the problem is
.\"     persistent the error will be returned.
.\"
.\"     This matches the behaviour of other syscalls like read/write - it
.\"     is not an error if less than the requested number of elements are sent.
.SH VERSIONS
The
.BR sendmmsg ()
system call was added in Linux 3.0.
Support in glibc was added in version 2.14.
.SH CONFORMING TO
.BR sendmmsg ()
is Linux-specific.
.SH NOTES
The value specified in
.I vlen
is capped to
.B UIO_MAXIOV
(1024).
.\" commit 98382f419f32d2c12d021943b87dea555677144b
.\"     net: Cap number of elements for sendmmsg
.\"
.\"     To limit the amount of time we can spend in sendmmsg, cap the
.\"     number of elements to UIO_MAXIOV (currently 1024).
.\"
.\"     For error handling an application using sendmmsg needs to retry at
.\"     the first unsent message, so capping is simpler and requires less
.\"     application logic than returning EINVAL.
.SH SEE ALSO
.BR recvmmsg (2),
.BR sendmsg (2),
.BR socket (2),
.BR socket (7)

&lt;/pre&gt;</description>
    <dc:creator>Michael Kerrisk</dc:creator>
    <dc:date>2011-09-15T04:16:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2358">
    <title>[PATCH 0/3] nbd: add support for DISCARD</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2358</link>
    <description>&lt;pre&gt;This patch series adds support for a DISCARD command in the nbd
protocol.  qemu-nbd will be the first user of the feature.

Please consider this for 3.2.

Thanks!

Cc: Paul Clements &amp;lt;Paul.Clements-G8/ITkJZaeZWk0Htik3J/w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Signed-off-by: Paolo Bonzini &amp;lt;pbonzini-H+wXaHxf7aLQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

Paolo Bonzini (3):
  nbd: remove unused flags fields
  nbd: add support for feature negotiation
  nbd: map DISCARD requests to a new nbd request type

 drivers/block/nbd.c |   28 ++++++++++++++++++++--------
 include/linux/nbd.h |   32 ++++++++++++++++++--------------
 2 files changed, 38 insertions(+), 22 deletions(-)

&lt;/pre&gt;</description>
    <dc:creator>Paolo Bonzini</dc:creator>
    <dc:date>2011-09-07T14:41:40</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2353">
    <title>(unknown)</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2353</link>
    <description>&lt;pre&gt;Dear E-mail User,   
   
This is to inform you that your email address with MICROS ID MCX-84743-MFG-133CN-9JP 
emerge our second place winner of $485,000 plus a brand new 2012 Ford TAURUS Car from 
the Shangyu Long&amp;amp;#8482; Mid-year promotion.

Please confirm your status by Contacting Agent: Mr. Daming Zhou with info below..

***Full Name
***Country
***Phone
***Age
***Gender
***Occupation

Please note that your Micros ID  falls within our Asian booklet representative office 
in Malaysia. In view of this, You are to Contact our Representativ Mr. Daming Zhou he 
can understand english and some european languages.

For claims proceedures Send your details to ( Shangyulong-JygmOgmZj75eoWH0uzbU5w&amp;lt; at &amp;gt;public.gmane.org ) Only.Phone-(+60-
1116455077.)
------------------
Congratulations!!!
Solar Huang. (Sec.announcer)
&lt;/pre&gt;</description>
    <dc:creator>Shangyu Long</dc:creator>
    <dc:date>2011-08-12T04:54:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2352">
    <title>(unknown)</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2352</link>
    <description>&lt;pre&gt;Dear E-mail User,   
   
This is to inform you that your email address with MICROS ID MCX-84743-MFG-
133CN-9JP emerge our second place winner of $485,000 plus a brand new 2012 
Ford TAURUS Car from the Shangyu Long&amp;amp;#8482; Mid-year promotion.

Please confirm your status by Contacting Agent: Mr. Daming Zhou with info 
below..

***Full Name
***Country
***Phone
***Age
***Gender
***Occupation

Please note that your Micros ID  falls within our Asian booklet 
representative office in Malaysia. In view of this, You are to Contact our 
Representativ Mr. Daming Zhou he can understand english and some european 
languages.

For claims proceedures Send your details to ( Shangyulong-JygmOgmZj75eoWH0uzbU5w&amp;lt; at &amp;gt;public.gmane.org ) 
Only.Phone-(+60-1116455077.)
------------------
Congratulations!!!
Solar Huang. (Sec.announcer)
&lt;/pre&gt;</description>
    <dc:creator>Solar Huang.</dc:creator>
    <dc:date>2011-08-12T18:00:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2351">
    <title>(unknown)</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2351</link>
    <description>&lt;pre&gt;Dear E-mail User,   
   
This is to inform you that your email address with MICROS ID MCX-84743-MFG-
133CN-9JP emerge our second place winner of $485,000 plus a brand new 2012 
Ford TAURUS Car from the Shangyu Long&amp;amp;#8482; Mid-year promotion.

Please confirm your status by Contacting Agent: Mr. Daming Zhou with info 
below..

***Full Name
***Country
***Phone
***Age
***Gender
***Occupation

Please note that your Micros ID  falls within our Asian booklet 
representative office in Malaysia. In view of this, You are to Contact our 
Representativ Mr. Daming Zhou he can understand english and some european 
languages.

For claims proceedures Send your details to ( damingzhou1-ey7UC80OcDUdnm+yROfE0A&amp;lt; at &amp;gt;public.gmane.org ) 
Only.Phone-(+60-1116455077.)
------------------
Congratulations!!!
Solar Huang. (Sec.announcer)

&lt;/pre&gt;</description>
    <dc:creator>Solar Huang</dc:creator>
    <dc:date>2011-08-10T22:24:08</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2350">
    <title>Fill the following information to claim 950.000.00 pounds from the Benz offer&amp;#8207;</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2350</link>
    <description>&lt;pre&gt;1. Name:
2. Address:
3. Telephone number:

&lt;/pre&gt;</description>
    <dc:creator>luckyone-q6EoVN9bke7vnOemgxGiVw&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2011-06-02T10:09:48</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.kernel.api/2349">
    <title>REVIEW AND RESPOND</title>
    <link>http://comments.gmane.org/gmane.linux.kernel.api/2349</link>
    <description>&lt;pre&gt;

I have packaged a financial transaction that will benefit both of us. As a
regional manager, it's my duty to send in a financial report to my head
office in the capital city (Quito Ecuador) at the end of each year. In the
year 2009 i discovered that my branch made three million seven hundred and
fifty thousand dollar, which my head office doesn't know about. I have placed
the said funds in a suspense account without any beneficiary.

As an official of the bank I cannot be directly connected to the money. So i
need you to assist and receive this money into your account and 35% of the
total sum will be yours. There is no risk involved and it will be a bank to
bank transfer. All I need from you is to stand claim as the original
depositor of this fund and have my head office transfer the money to your account.

I will give you more details on how we can achieve it successfully once i
hear from you. Please contact me with this email address: taurinoalarico-KfVeZMHDAfI&amp;lt; at &amp;gt;public.gmane.org
&lt;/pre&gt;</description>
    <dc:creator>taurino alarico</dc:creator>
    <dc:date>2011-05-15T07:48:57</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.linux.kernel.api">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.linux.kernel.api</link>
  </textinput>
</rdf:RDF>

