Skip to content

ff_config.c parse pci_whitelist to --allow, so config.ini use pci_whitelist #894

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions adapter/syscall/ff_hook_syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ ff_hook_recv(int fd, void *buf, size_t len, int flags)
}

ssize_t
ff_hook___recv_chk(int fd, void *buf, size_t buflen, size_t len, int flags)
ff_hook___recv_chk(int fd, void *buf, size_t len, size_t buflen, int flags)
{
DEBUG_LOG("ff_hook___recv_chk, fd:%d, buf:%p, len:%lu, flags:%d\n",
fd, buf, len, flags);
Expand Down Expand Up @@ -1430,7 +1430,7 @@ ff_hook___read_chk(int fd, void *buf, size_t nbytes, size_t len)
{
DEBUG_LOG("ff_hook___read_chk, fd:%d, buf:%p, len:%lu\n", fd, buf, len);

if (buflen < nbytes)
if (len < nbytes)
__chk_fail();

if (buf == NULL || len == 0) {
Expand Down
4 changes: 2 additions & 2 deletions config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ symmetric_rss=0

# PCI device enable list.
# And driver options
#allow=02:00.0
#pci_whitelist=02:00.0
# for multiple PCI devices
#allow=02:00.0,03:00.0
#pci_whitelist=02:00.0,03:00.0

# enabled port list
#
Expand Down