Skip to content

Shamore#25177

Merged
trufae merged 3 commits intomasterfrom
shamore
Jan 5, 2026
Merged

Shamore#25177
trufae merged 3 commits intomasterfrom
shamore

Conversation

@trufae
Copy link
Copy Markdown
Collaborator

@trufae trufae commented Jan 5, 2026

  • Mark this if you consider it ready to merge
  • I've added tests (optional)
  • I wrote some lines in the book (optional)

Description

Copilot AI review requested due to automatic review settings January 5, 2026 09:29
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for SHA384 and SHA512 hash algorithms to the radare2 muta plugin system. The changes include new plugin implementations, build system integration, and an unrelated cleanup in the coresymbolication module.

  • Implements SHA384 and SHA512 hash plugins following the existing pattern from SHA1/SHA256
  • Integrates the new plugins into the build system and plugin registry
  • Removes unused r_hash.h include and improves condition check in coresymbolication.c

Reviewed changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
libr/muta/p/muta_sha512.c New SHA512 hash plugin implementation
libr/muta/p/muta_sha384.c New SHA384 hash plugin implementation with missing includes
libr/muta/p/sha512.mk Build configuration for SHA512 plugin with incorrect structure
libr/muta/p/sha384.mk Build configuration for SHA384 plugin with incorrect structure
libr/muta/p/Makefile Adds includes for the new SHA384 and SHA512 makefiles
libr/include/r_muta.h Declares the new plugin extern variables
dist/plugins-cfg/plugins.def.cfg Registers the new plugins in the default configuration
libr/bin/format/mach0/coresymbolication.c Removes unused include and improves condition check

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread libr/muta/p/sha384.mk
Comment on lines +5 to +15
SHARED_SHA384=$(SHLIBDIR)$(LDFLAGS) $(LIBOBJ)

TARGET_SHA384=muta_sha384.${EXT_SO}

all: $(TARGET_SHA384)

$(TARGET_SHA384): $(OBJ_SHA384)
$(CC) $(call libname,muta_sha384) ${LDFLAGS} ${CFLAGS} -o ${TARGET_SHA384} ${OBJ_SHA384}

clean::
rm -f *.o *.${EXT_SO} *.a
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing SRC_SHA384 variable usage and incorrect structure. The new sha384.mk file doesn't follow the established pattern used by other hash plugins. Compared to sha256.mk and sha1.mk, this file includes extra unused lines (lines 2, 5, 9, 14-15) and is missing the ALL_TARGETS variable that is used in all other .mk files to properly register the target.

Suggested change
SHARED_SHA384=$(SHLIBDIR)$(LDFLAGS) $(LIBOBJ)
TARGET_SHA384=muta_sha384.${EXT_SO}
all: $(TARGET_SHA384)
$(TARGET_SHA384): $(OBJ_SHA384)
$(CC) $(call libname,muta_sha384) ${LDFLAGS} ${CFLAGS} -o ${TARGET_SHA384} ${OBJ_SHA384}
clean::
rm -f *.o *.${EXT_SO} *.a
ALL_TARGETS+=muta_sha384.${EXT_SO}

Copilot uses AI. Check for mistakes.
Comment thread libr/muta/p/muta_sha384.c
@@ -0,0 +1,37 @@
/* radare - LGPL - Copyright 2024-2026 - pancake */

Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing required includes. The file uses RHash type and related functions but doesn't include <r_lib.h> and <r_hash.h>. These includes are present in all similar hash plugin implementations (sha1, sha256, md5) and are necessary for the code to compile.

Suggested change
#include <r_lib.h>
#include <r_hash.h>

Copilot uses AI. Check for mistakes.
Comment thread libr/muta/p/muta_sha384.c
Comment thread libr/muta/p/sha512.mk
Comment on lines +2 to +15
SRC_SHA512=muta_sha512.c

STATIC_OBJ+=${OBJ_SHA512}
SHARED_SHA512=$(SHLIBDIR)$(LDFLAGS) $(LIBOBJ)

TARGET_SHA512=muta_sha512.${EXT_SO}

all: $(TARGET_SHA512)

$(TARGET_SHA512): $(OBJ_SHA512)
$(CC) $(call libname,muta_sha512) ${LDFLAGS} ${CFLAGS} -o ${TARGET_SHA512} ${OBJ_SHA512}

clean::
rm -f *.o *.${EXT_SO} *.a
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing SRC_SHA512 variable usage and incorrect structure. The new sha512.mk file doesn't follow the established pattern used by other hash plugins. Compared to sha256.mk and sha1.mk, this file includes extra unused lines (lines 2, 5, 9, 14-15) and is missing the ALL_TARGETS variable that is used in all other .mk files to properly register the target.

Suggested change
SRC_SHA512=muta_sha512.c
STATIC_OBJ+=${OBJ_SHA512}
SHARED_SHA512=$(SHLIBDIR)$(LDFLAGS) $(LIBOBJ)
TARGET_SHA512=muta_sha512.${EXT_SO}
all: $(TARGET_SHA512)
$(TARGET_SHA512): $(OBJ_SHA512)
$(CC) $(call libname,muta_sha512) ${LDFLAGS} ${CFLAGS} -o ${TARGET_SHA512} ${OBJ_SHA512}
clean::
rm -f *.o *.${EXT_SO} *.a
STATIC_OBJ+=${OBJ_SHA512}
TARGET_SHA512=muta_sha512.${EXT_SO}
ALL_TARGETS+=${TARGET_SHA512}
$(TARGET_SHA512): $(OBJ_SHA512)
$(CC) $(call libname,muta_sha512) ${LDFLAGS} ${CFLAGS} -o ${TARGET_SHA512} ${OBJ_SHA512}

Copilot uses AI. Check for mistakes.
@trufae trufae merged commit 76f903f into master Jan 5, 2026
49 checks passed
@trufae trufae deleted the shamore branch January 5, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants