https://github.com/Awfa created https://github.com/llvm/llvm-project/pull/88812
This PR adds a check within `PutFile` to exit early when both local and
destination files have matching MD5 hashes. If they differ, or there is trouble
getting the hashes, the regular code path to put the file is ru
@@ -3433,8 +3433,40 @@ bool GDBRemoteCommunicationClient::CalculateMD5(
return false;
if (response.Peek() && *response.Peek() == 'x')
return false;
-low = response.GetHexMaxU64(false, UINT64_MAX);
-high = response.GetHexMaxU64(false, UINT64_MAX);
+
+
@@ -684,6 +684,15 @@ Status PlatformRemoteGDBServer::RunShellCommand(
signo_ptr, command_output, timeout);
}
+bool PlatformRemoteGDBServer::CalculateMD5(const FileSpec &file_spec,
+ uint64_t &l
@@ -684,6 +684,15 @@ Status PlatformRemoteGDBServer::RunShellCommand(
signo_ptr, command_output, timeout);
}
+bool PlatformRemoteGDBServer::CalculateMD5(const FileSpec &file_spec,
+ uint64_t &l
@@ -1184,7 +1184,7 @@ bool Platform::IsCompatibleArchitecture(const ArchSpec
&arch,
Status Platform::PutFile(const FileSpec &source, const FileSpec &destination,
uint32_t uid, uint32_t gid) {
Log *log = GetLog(LLDBLog::Platform);
- LLDB_LOGF(log, "[
@@ -1197,6 +1197,34 @@ Status Platform::PutFile(const FileSpec &source, const
FileSpec &destination,
if (!source_file)
return Status(source_file.takeError());
Status error;
+
+ bool requires_upload = true;
+ {
Awfa wrote:
This is how I write code to
@@ -3433,8 +3433,40 @@ bool GDBRemoteCommunicationClient::CalculateMD5(
return false;
if (response.Peek() && *response.Peek() == 'x')
return false;
-low = response.GetHexMaxU64(false, UINT64_MAX);
-high = response.GetHexMaxU64(false, UINT64_MAX);
+
+
@@ -1197,6 +1197,34 @@ Status Platform::PutFile(const FileSpec &source, const
FileSpec &destination,
if (!source_file)
return Status(source_file.takeError());
Status error;
+
+ bool requires_upload = true;
+ {
+uint64_t dest_md5_low, dest_md5_high;
+bool succ
https://github.com/Awfa updated https://github.com/llvm/llvm-project/pull/88812
>From 095696411172034f80233f1722e293c1f458d67f Mon Sep 17 00:00:00 2001
From: Anthony Ha
Date: Mon, 15 Apr 2024 19:34:19 +
Subject: [PATCH 1/2] [lldb] Skip remote PutFile when MD5 hashes equal
---
.../gdb-serve
@@ -684,6 +684,15 @@ Status PlatformRemoteGDBServer::RunShellCommand(
signo_ptr, command_output, timeout);
}
+bool PlatformRemoteGDBServer::CalculateMD5(const FileSpec &file_spec,
+ uint64_t &l
https://github.com/Awfa created https://github.com/llvm/llvm-project/pull/88845
`lldb-server`'s platform mode seems to have an issue with its
`--min-gdbserver-port` `--max-gdbserver-port` flags (and probably the
`--gdbserver-port` flag, but I didn't test it).
How the platform code seems to wor
https://github.com/Awfa updated https://github.com/llvm/llvm-project/pull/88812
>From 095696411172034f80233f1722e293c1f458d67f Mon Sep 17 00:00:00 2001
From: Anthony Ha
Date: Mon, 15 Apr 2024 19:34:19 +
Subject: [PATCH 1/3] [lldb] Skip remote PutFile when MD5 hashes equal
---
.../gdb-serve
@@ -1184,7 +1184,7 @@ bool Platform::IsCompatibleArchitecture(const ArchSpec
&arch,
Status Platform::PutFile(const FileSpec &source, const FileSpec &destination,
uint32_t uid, uint32_t gid) {
Log *log = GetLog(LLDBLog::Platform);
- LLDB_LOGF(log, "[
@@ -1197,6 +1197,34 @@ Status Platform::PutFile(const FileSpec &source, const
FileSpec &destination,
if (!source_file)
return Status(source_file.takeError());
Status error;
+
+ bool requires_upload = true;
+ {
Awfa wrote:
Just removed the scoping -
https://github.com/Awfa updated https://github.com/llvm/llvm-project/pull/88845
>From 3d75f42b5f61ea126001919491aa09ebd15ba9f8 Mon Sep 17 00:00:00 2001
From: Anthony Ha
Date: Mon, 15 Apr 2024 19:36:34 +
Subject: [PATCH 1/2] [lldb] Have lldb-server assign ports to children in
platform mode
@@ -301,13 +294,31 @@ int main_platform(int argc, char *argv[]) {
exit(socket_error);
}
printf("Connection established.\n");
+
+std::optional port = 0;
if (g_server) {
// Collect child zombie processes.
#if !defined(_WIN32)
- while (waitpid(-
@@ -301,13 +294,31 @@ int main_platform(int argc, char *argv[]) {
exit(socket_error);
}
printf("Connection established.\n");
+
+std::optional port = 0;
if (g_server) {
// Collect child zombie processes.
#if !defined(_WIN32)
- while (waitpid(-
@@ -301,13 +294,31 @@ int main_platform(int argc, char *argv[]) {
exit(socket_error);
}
printf("Connection established.\n");
+
+std::optional port = 0;
Awfa wrote:
I removed the optional port here, and just set the portmap within the
availab
@@ -324,6 +335,10 @@ int main_platform(int argc, char *argv[]) {
// connections while a connection is active.
acceptor_up.reset();
}
+
+GDBRemoteCommunicationServerPlatform::PortMap portmap_for_child;
+portmap_for_child.AllowPort(*port);
Awfa wrote:
> MD5 is insufficient for claiming that files are identical; how do we migrate
> this to a secure hash?
Is there an attack vector you're concerned about?
Or are you wary of workflow friction when a file won't upload to the remote
platform because the hashes accidently collide?
ht
Awfa wrote:
Someone will have to merge for me because it says "Only those with write access
to this repository can merge pull requests."
Am I supposed to request write access somewhere before making these PRs? I
haven't contributed before.
https://github.com/llvm/llvm-project/pull/88812
_
Awfa wrote:
I got an email that the build failed and I should revert because of this:
https://lab.llvm.org/buildbot/#/builders/68/builds/72623
@bulbazord can you or someone with write permissions revert this PR so I have
time to triage the issue?
https://github.com/llvm/llvm-project/pull/8881
Awfa wrote:
Thanks for taking a look at the build. I will do a new PR addressing the issues.
https://github.com/llvm/llvm-project/pull/88812
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-
@@ -429,7 +429,43 @@ incompatible with the flags that gdb specifies.
//
// Response is F, followed by the number of bytes written (base 16)
+//--
+// vFile:MD5:
+//
+// BRIEF
+// Generate an MD5 hash of the
https://github.com/Awfa edited https://github.com/llvm/llvm-project/pull/89357
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/Awfa created https://github.com/llvm/llvm-project/pull/90921
# Overview
In my previous PR: https://github.com/llvm/llvm-project/pull/88812,
@JDevlieghere suggested to match return types of the various calculate md5
functions.
This PR achieves that by changing the various cal
https://github.com/Awfa updated https://github.com/llvm/llvm-project/pull/88845
>From 3d75f42b5f61ea126001919491aa09ebd15ba9f8 Mon Sep 17 00:00:00 2001
From: Anthony Ha
Date: Mon, 15 Apr 2024 19:36:34 +
Subject: [PATCH 1/3] [lldb] Have lldb-server assign ports to children in
platform mode
Awfa wrote:
> Thanks! LGTM.
Cool - can you merge this for me? I don't have write access.
https://github.com/llvm/llvm-project/pull/90921
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-com
https://github.com/Awfa updated https://github.com/llvm/llvm-project/pull/88845
>From 3d75f42b5f61ea126001919491aa09ebd15ba9f8 Mon Sep 17 00:00:00 2001
From: Anthony Ha
Date: Mon, 15 Apr 2024 19:36:34 +
Subject: [PATCH 1/4] [lldb] Have lldb-server assign ports to children in
platform mode
Awfa wrote:
> > And make the note at the end of lldb/docs/use/qemu-testing.rst outdated.
>
> Removing this is the last thing to do here.
Fixed! If this looks good to you, would you also be able to merge it? I don't
have write permissions.
https://github.com/llvm/llvm-project/pull/88845
__
Awfa wrote:
@JDevlieghere sorry for the churn - can I get a revert? BuildBot is showing me
that I didn't check for compile errors in the gdb platform tests.
After revert, I'll go and push a new PR to fix.
https://github.com/llvm/llvm-project/pull/90921
_
Awfa wrote:
Is there a way to invoke BuildBot on this branch before it's merged in by the
way?
I got bit on another PR where it caught some failures I wished were caught
before merge.
https://github.com/llvm/llvm-project/pull/88845
___
lldb-commits
https://github.com/Awfa created https://github.com/llvm/llvm-project/pull/91029
This is a retake of https://github.com/llvm/llvm-project/pull/90921 which got
reverted because I forgot to modify the CalculateMD5 unit test I had added in
https://github.com/llvm/llvm-project/pull/88812
The prior
Awfa wrote:
@JDevlieghere , do you know if there's a way to run buildbot on a merge of this
PR and main branch - just to validate the build/tests work before this merge?
The [llvm contributing
guide](https://llvm.org/docs/MyFirstTypoFix.html#myfirsttypofix-issues-after-landing-your-pr)
says t
https://github.com/Awfa updated https://github.com/llvm/llvm-project/pull/91029
>From 3112e3da309a24001aa610b15f2a23892b660fc8 Mon Sep 17 00:00:00 2001
From: Anthony Ha
Date: Thu, 2 May 2024 23:55:47 +
Subject: [PATCH 1/3] Unify CalculateMD5 return types
---
lldb/include/lldb/Target/Platfo
Awfa wrote:
> ⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️
>
> You can test this locally with the following command:
> View the diff from clang-format here.
This formatter alert is outdated - by the time this arrived, my PR had the
issue fixed already.
https://github.co
Awfa wrote:
> > @JDevlieghere , do you know if there's a way to run buildbot on a merge of
> > this PR and main branch - just to validate the build/tests work before this
> > merge?
>
> Not that I know. When failures are macOS specific I'm happy to apply a PR
> locally and run the test suite
37 matches
Mail list logo