Hello community,

here is the log from the commit of package librtas for openSUSE:Factory checked 
in at 2018-07-06 10:37:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/librtas (Old)
 and      /work/SRC/openSUSE:Factory/.librtas.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "librtas"

Fri Jul  6 10:37:24 2018 rev:40 rq:620235 version:2.0.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/librtas/librtas-doc.changes      2017-09-07 
22:14:33.179654954 +0200
+++ /work/SRC/openSUSE:Factory/.librtas.new/librtas-doc.changes 2018-07-06 
10:37:28.947576760 +0200
@@ -1,0 +2,6 @@
+Mon Jul  2 12:30:18 UTC 2018 - jloe...@suse.com
+
+- version update to 2.0.2 (fate#324947)
+  * interface for ibm,physical-attestation rtas call
+
+-------------------------------------------------------------------
librtas.changes: same change

Old:
----
  librtas-2.0.1.tar.gz

New:
----
  librtas-2.0.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ librtas-doc.spec ++++++
--- /var/tmp/diff_new_pack.5k5gJ3/_old  2018-07-06 10:37:30.127575358 +0200
+++ /var/tmp/diff_new_pack.5k5gJ3/_new  2018-07-06 10:37:30.131575353 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           librtas-doc
-Version:        2.0.1
+Version:        2.0.2
 Release:        0
 BuildRequires:  autoconf
 BuildRequires:  automake

++++++ librtas.spec ++++++
--- /var/tmp/diff_new_pack.5k5gJ3/_old  2018-07-06 10:37:30.143575339 +0200
+++ /var/tmp/diff_new_pack.5k5gJ3/_new  2018-07-06 10:37:30.143575339 +0200
@@ -19,7 +19,7 @@
 %define sover 2
 
 Name:           librtas
-Version:        2.0.1
+Version:        2.0.2
 Release:        0
 Summary:        Libraries to provide access to RTAS calls and RTAS events
 License:        LGPL-2.1+

++++++ librtas-2.0.1.tar.gz -> librtas-2.0.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/librtas-2.0.1/Changelog new/librtas-2.0.2/Changelog
--- old/librtas-2.0.1/Changelog 2016-07-12 00:06:49.000000000 +0200
+++ new/librtas-2.0.2/Changelog 2018-06-15 01:49:01.000000000 +0200
@@ -1,3 +1,22 @@
+Changelog for librtas-2.0.2
+=======================================
+commit 26970c42bc017ad68b864e7134cf941c07443aa8
+Author: Chris Engel <cen...@linux.vnet.ibm.com>
+Date:   Tue Aug 22 14:59:06 2017 -0500
+
+    Interface for ibm,physical-attestation rtas call
+    
+    The physical attestation interfaces are provided to allow a
+    trusted 3rd party client to retrieve information about the
+    trusted boot state of the target PowerVM system.  This makes
+    use of the systems physical TPM(s).  These TPM(s) are used
+    by system firmware to extend measurements during the
+    boot process.
+    
+    Signed-off-by: Chris Engel <cen...@linux.vnet.ibm.com>
+    Reviewed-by: Vasant Hegde <hegdevas...@linux.vnet.ibm.com>
+    Signed-off-by: Tyrel Datwyler <tyr...@linux.vnet.ibm.com>
+
 Changelog for librtas-2.0.1
 =======================================
 commit 7f841902eb50ca77c3aa884e3fd924c2bbd817ca
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/librtas-2.0.1/configure.ac 
new/librtas-2.0.2/configure.ac
--- old/librtas-2.0.1/configure.ac      2016-07-12 00:06:49.000000000 +0200
+++ new/librtas-2.0.2/configure.ac      2018-06-15 01:49:01.000000000 +0200
@@ -1,4 +1,4 @@
-AC_INIT([librtas],[2.0.1],[See README])
+AC_INIT([librtas],[2.0.2],[See README])
 
 AC_CONFIG_AUX_DIR([config])
 AC_CONFIG_MACRO_DIR([m4])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/librtas-2.0.1/librtas_src/librtas.h 
new/librtas-2.0.2/librtas_src/librtas.h
--- old/librtas-2.0.1/librtas_src/librtas.h     2016-07-12 00:06:49.000000000 
+0200
+++ new/librtas-2.0.2/librtas_src/librtas.h     2018-06-15 01:49:01.000000000 
+0200
@@ -105,6 +105,8 @@
 extern int rtas_suspend_me(uint64_t streamid);
 extern int rtas_update_nodes(char *workarea, unsigned int scope);
 extern int rtas_update_properties(char *workarea, unsigned int scope);
+extern int rtas_physical_attestation(char *workarea, int seq_num,
+                                    int *next_seq_num, int *work_area_bytes);
 
 #ifdef __cplusplus
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/librtas-2.0.1/librtas_src/syscall_calls.c 
new/librtas-2.0.2/librtas_src/syscall_calls.c
--- old/librtas-2.0.1/librtas_src/syscall_calls.c       2016-07-12 
00:06:49.000000000 +0200
+++ new/librtas-2.0.2/librtas_src/syscall_calls.c       2018-06-15 
01:49:01.000000000 +0200
@@ -1329,3 +1329,66 @@
        dbg("(%p) %d = %d\n", workarea, scope, rc ? rc : status);
        return rc ? rc : status;
 }
+
+/**
+ * rtas_physical_attestation
+ * @brief Interface for ibm,physical-attestation rtas call.
+ *
+ * @param workarea input/output work area for rtas call
+ * @param seq_num sequence number of the rtas call
+ * @param next_seq_num next sequence number
+ * @param work_area_bytes size of work area
+ * @return 0 on success, !0 on failure
+ */
+int rtas_physical_attestation(char *workarea, int seq_num, int *next_seq_num,
+                             int *work_area_bytes)
+{
+       uint32_t workarea_pa;
+       uint64_t elapsed = 0;
+       void *kernbuf;
+       int kbuf_sz = 4096;
+       int rc, status;
+       int resp_bytes = *work_area_bytes;
+
+       rc = sanity_check();
+       if (rc)
+               return rc;
+
+       /* Caller provided more data than FW can handle */
+       if (*work_area_bytes == 0 ||
+           *work_area_bytes > kbuf_sz)
+               return RTAS_IO_ASSERT;
+
+       rc = rtas_get_rmo_buffer(kbuf_sz, &kernbuf, &workarea_pa);
+       if (rc)
+               return rc;
+       memcpy(kernbuf, workarea, *work_area_bytes);
+
+       do {
+               rc = rtas_call("ibm,physical-attestation", 3, 3,
+                              htobe32(workarea_pa), htobe32(kbuf_sz),
+                              htobe32(seq_num),
+                              &status, next_seq_num, &resp_bytes);
+               if (rc < 0)
+                       break;
+
+               rc = handle_delay(status, &elapsed);
+       } while (rc == CALL_AGAIN);
+
+       *next_seq_num = be32toh(*next_seq_num);
+
+       /* FW returned more data than we can handle */
+       if (be32toh(resp_bytes) > *work_area_bytes) {
+               (void)rtas_free_rmo_buffer(kernbuf, workarea_pa, kbuf_sz);
+               return RTAS_IO_ASSERT;
+       }
+
+       *work_area_bytes = be32toh(resp_bytes);
+
+       if (rc == 0)
+               memcpy(workarea, kernbuf, *work_area_bytes);
+
+       (void)rtas_free_rmo_buffer(kernbuf, workarea_pa, kbuf_sz);
+
+       return rc ? rc : status;
+}


Reply via email to