Coder Social home page Coder Social logo

xcp-ng / uefistored Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 3.0 3.29 MB

Variables store for UEFI guests. Note: in XCP-ng 8.3+, we switched to varstored in order to share a common implementation with XenServer.

License: GNU General Public License v2.0

Makefile 1.78% C 91.66% Shell 1.10% Python 5.46%

uefistored's People

Contributors

benjamreis avatar beshleman avatar stormi avatar wescoeur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uefistored's Issues

scan-build: 7 bugs found.

diff --git a/Makefile b/Makefile
index eb9d46d..3702b58 100644
--- a/Makefile
+++ b/Makefile
@@ -16,8 +16,8 @@ LIBS := $(foreach lib,$(LIB_DEPS),-l$(lib))
 OBJS := $(patsubst %.c,%.o,$(SRCS))
 INC := -Iinc/ -Ilibs/ -I/usr/include/libxml2
 
-CFLAGS += -Wall -Werror -Wextra -fshort-wchar -fstack-protector -O2 \
-                 -fstack-clash-protection
+#CFLAGS += -Wall -Werror -Wextra -fshort-wchar -fstack-protector -O2 \
+#                -fstack-clash-protection
 
 all:        ## Build uefistored (same as uefistored target)
 all: uefistored uefistored-debug
@@ -25,15 +25,15 @@ all: uefistored uefistored-debug
 
 uefistored: ## Build uefistored
 uefistored: src/main.c $(OBJS)
-       gcc -o $@ $< $(LIBS) $(CFLAGS) $(OBJS) $(INC)
+       $(CC) -o $@ $< $(LIBS) $(CFLAGS) $(OBJS) $(INC)
 
 uefistored-debug: CFLAGS += -g -grecord-gcc-switches
 uefistored-debug: ## Build uefistored with debug symbols
 uefistored-debug: src/main.c $(OBJS)
-       gcc -o $@ $< $(LIBS) $(CFLAGS) $(OBJS) $(INC)
+       $(CC) -o $@ $< $(LIBS) $(CFLAGS) $(OBJS) $(INC)
 
 %.o: %.c
-       gcc -o $@ -c $< $(LIBS) $(CFLAGS) $(INC)
+       $(CC) -o $@ -c $< $(LIBS) $(CFLAGS) $(INC)
 
 .PHONY: clean
 clean:
scan-build --status-bugs -analyze-headers make

The bugs found are mostly benign but there is a doublefree. I also saw this while playing with the build settings that might be worth fixing with a 0600 added as third parameter to open:

In file included from /usr/include/fcntl.h:301,
                 from src/main.c:14:
In function ‘open’,
    inlined from ‘write_pidfile’ at src/main.c:144:10,
    inlined from ‘main’ at src/main.c:888:9:
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:4: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments
   50 |    __open_missing_mode ();
      |    ^~~~~~~~~~~~~~~~~~~~~~

Is it possible to replace xenforeignmemory_map with grant table?

I'm asking this in case you already know the answer. Could grant tables be used for shared memory? Is there a particular reason they wouldn't work? Do they get reset when transitioning to booting the OS?

You can restrict access to guest memory with grant tables whereas permission for xenforeignmemory_map allows so much more. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.