xcp-ng / uefistored Goto Github PK
View Code? Open in Web Editor NEWVariables 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
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
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 ();
| ^~~~~~~~~~~~~~~~~~~~~~
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.
The serialize functions need to be barred from bad compiler optimizations and make appropriate use of READ/WRITE_ONCE, mb(), smp_{w,r,}mb() and friends.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.