Skip to content

cangen: allow to use -m on classical CAN interfaces#599

Closed
marckleinebudde wants to merge 1 commit into
linux-can:masterfrom
marckleinebudde:allow-dash-m-on-classical-CAN-interfaces
Closed

cangen: allow to use -m on classical CAN interfaces#599
marckleinebudde wants to merge 1 commit into
linux-can:masterfrom
marckleinebudde:allow-dash-m-on-classical-CAN-interfaces

Conversation

@marckleinebudde

Copy link
Copy Markdown
Member

The -m option currently only works on CAN FD or CAN XL interfaces. There is a logic to add CAN XL to the mix only if supported but CAN FD is always forced.

Modify the -m logic so that only the options supported by the interface are added to the mix. This way:

  • a Classical CAN interface only mixes -e and -R
  • a CAN FD interface mixes -e, -R, -f, -b and -E
  • a CAN XL interface mixes -e, -R, -f, -b, -E and -X

This provides a better user experience and also makes -m a good default option for fuzzing any type of CAN interface.

The -m option currently only works on CAN FD or CAN XL interfaces.
There is a logic to add CAN XL to the mix only if supported but CAN FD
is always forced.

Modify the -m logic so that only the options supported by the
interface are added to the mix. This way:

  - a Classical CAN interface only mixes -e and -R
  - a CAN FD interface mixes -e, -R, -f, -b and -E
  - a CAN XL interface mixes -e, -R, -f, -b, -E and -X

This provides a better user experience and also makes -m a good
default option for fuzzing any type of CAN interface.

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
Link: https://lore.kernel.org/r/20250907060330.441165-1-mailhol@kernel.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
@marckleinebudde

Copy link
Copy Markdown
Member Author

Cc: @vincent-mailhol

@hartkopp

hartkopp commented Sep 8, 2025

Copy link
Copy Markdown
Member

This concept mixes the actual frame format (canfd canxl) with the
switch whether FD/XL is enabled and operable.

Updated patch: #600

@marckleinebudde

marckleinebudde commented Sep 8, 2025

Copy link
Copy Markdown
Member Author

Please force-push your updated PR over my branch.

@hartkopp

hartkopp commented Sep 8, 2025

Copy link
Copy Markdown
Member

To complex. We continue the discussion better in PR 600

@hartkopp hartkopp closed this Sep 8, 2025
@marckleinebudde

Copy link
Copy Markdown
Member Author

FTR: a git command like this git push github-mkl master:allow-dash-m-on-classical-CAN-interfaces --force-with-lease does the trick

@hartkopp

hartkopp commented Sep 8, 2025

Copy link
Copy Markdown
Member

Ok.
Would likely have cost me 10 minutes of my lifetime ;-)
But I will remember where to find this trick ...
Thanks Marc!

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